/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  /* Colors */
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --info-color: #3b82f6;
  /* Grays */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  /* Layout */
  --header-height: 64px;
  --sidebar-width: 280px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}
body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  overflow-x: hidden;
}
/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  margin-right: 32px;
}
.nav-brand i {
  margin-right: 8px;
  font-size: 20px;
}
/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  margin-right: 12px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.mobile-menu-toggle:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}
.mobile-menu-toggle:active {
  transform: scale(0.95);
}
.mobile-menu-toggle i {
  font-size: 18px;
}
/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}
.nav-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius-lg);
  background: var(--gray-50);
  transition: all 0.2s ease;
  font-size: 14px;
}
.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}
.search-icon {
  position: absolute;
  left: 16px;
  color: var(--gray-400);
}
.search-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.search-clear:hover {
  background: var(--gray-200);
  color: var(--gray-600);
}
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 24px;
}
.nav-btn {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  gap: 6px;
}
.nav-btn:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}
.nav-btn.primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.nav-btn.primary:hover {
  background: var(--primary-dark);
}
/* User Section */
.user-section {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}
.user-profile:hover {
  background: var(--gray-100);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
}
.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px 0;
  z-index: 1000;
  display: none;
}
.dropdown-menu.show {
  display: block;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--gray-700);
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
}
.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}
.dropdown-divider {
  height: 1px;
  background: var(--gray-200);
  border: none;
  margin: 8px 0;
}
.notification-badge {
  background: var(--error-color);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 16px;
  text-align: center;
}
#loginBtn {
  background: #1877F2;
  color: white;
  border-color: #1877F2;
}
#loginBtn:hover {
  background: #166FE5;
  border-color: #166FE5;
}
/* Main Layout */
.main-content {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}
/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid var(--gray-200);
  padding: 24px;
  overflow-y: auto;
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
}
/* Mobile Sidebar Enhancements */
@media (max-width: 768px) {
  .sidebar {
    background: white;
    box-shadow: var(--shadow-xl);
    border-right: none;
    max-height: calc(100vh - var(--header-height));
  }
  .sidebar.open {
    transform: translateX(0);
    animation: slideInFromLeft 0.3s ease-out;
  }
}
@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}
.sidebar-section {
  margin-bottom: 32px;
}
.sidebar-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.categories-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.category-item {
  display: flex;
  align-items: baseline;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--gray-700);
  text-decoration: none;
}
.category-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}
.category-item.active {
  background: var(--primary-color);
  color: white;
}
.category-icon {
  margin-right: 12px;
  width: 16px;
  text-align: center;
}
.category-info {
  flex: 1;
}
.category-name {
  font-weight: 500;
  font-size: 14px;
}
.category-count {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-700);
}
.filter-option input {
  margin-right: 8px;
}
/* Content Area */
.content-area {
  flex: 1;
  padding: 24px;
  max-width: calc(100vw - var(--sidebar-width));
}
.section-header {
  margin-bottom: 24px;
}
.section-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header p {
  color: var(--gray-600);
  font-size: 16px;
}
.section-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.view-toggle {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  overflow: hidden;
}
.toggle-btn {
  padding: 8px 12px;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--gray-500);
}
.toggle-btn.active,
.toggle-btn:hover {
  background: var(--primary-color);
  color: white;
}
.sort-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  background: white;
  cursor: pointer;
}
/* Featured Section */
.featured-section {
  margin-bottom: 48px;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}
/* Prompts Grid */
.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.prompts-grid.list-view {
  grid-template-columns: 1fr;
}
/* Prompt Card */
.prompt-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.prompt-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.prompt-card.featured {
  border: 2px solid var(--accent-color);
  background: linear-gradient(135deg, #fffbeb, #fff);
}
.prompt-card.featured::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid var(--accent-color);
  border-bottom: 20px solid transparent;
  border-top: 20px solid var(--accent-color);
}
.prompt-card.featured::after {
  content: '⭐';
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  color: white;
}
.prompt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.prompt-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.4;
}
.prompt-favorite {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.prompt-favorite:hover,
.prompt-favorite.active,
.prompt-favorite.favorited {
  color: var(--error-color);
}
.prompt-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.prompt-category {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  gap: 4px;
  max-width: 50%;
}
.prompt-category,
.prompt-header > h3 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prompt-difficulty {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.prompt-difficulty.beginner {
  background: var(--success-color);
  color: white;
}
.prompt-difficulty.intermediate {
  background: var(--warning-color);
  color: white;
}
.prompt-difficulty.advanced {
  background: var(--error-color);
  color: white;
}
.prompt-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--gray-600);
}
.stars {
  color: var(--accent-color);
}
.prompt-description {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.prompt-card .prompt-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prompt-content-preview {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gray-700);
  margin-bottom: 16px;
}
.prompt-content-preview > div {
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prompt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tag {
  padding: 2px 8px;
  background: var(--gray-200);
  color: var(--gray-700);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}
.prompt-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-500);
}
.usage-count {
  display: flex;
  align-items: center;
  gap: 4px;
}
/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  padding: 24px 0;
}
.pagination-btn {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  gap: 6px;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--gray-100);
  border-color: var(--gray-400);
}
.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-number {
  padding: 8px 12px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}
.page-number:hover {
  background: var(--gray-100);
}
.page-number.active {
  background: var(--primary-color);
  color: white;
}
/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.modal.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal.active .modal-content {
  transform: scale(1);
}
.modal-content.large {
  max-width: 800px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}
.modal-body {
  padding: 0 24px 24px 24px;
}
.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
}
/* Forms */
.prompt-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: all 0.2s ease;
  font-family: inherit;
}
.form-group textarea {
  resize: vertical;
  font-family: var(--font-mono);
  line-height: 1.5;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}
.character-count {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
  text-align: right;
}
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tag-item {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: var(--primary-color);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  gap: 6px;
}
.tag-remove {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  font-size: 10px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}
.btn {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  gap: 6px;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: white;
  color: var(--gray-700);
}
.btn-secondary:hover {
  background: var(--gray-100);
}
/* Loading States */
.loading-skeleton,
.loading-skeleton-card {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--border-radius);
}
.loading-skeleton {
  height: 20px;
  width: 100%;
}
.loading-skeleton-card {
  height: 200px;
  width: 100%;
}
@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  backdrop-filter: blur(2px);
}
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  color: var(--gray-600);
}
.loading-spinner i {
  font-size: 32px;
  color: var(--primary-color);
}
/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  .content-area {
    max-width: calc(100vw - 240px);
  }
  .prompts-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}
/* Tablet Portrait */
@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
  }
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    z-index: 1500;
    width: 300px;
    left: 0;
    top: var(--header-height);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
    background: white;
    border-right: none;
    max-height: calc(100vh - var(--header-height));
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  .content-area {
    max-width: 100vw;
    padding: 20px;
  }
  .navbar {
    padding: 0 20px;
    justify-content: flex-start;
  }
  .nav-search {
    flex: 1;
    max-width: none;
    margin: 0 20px;
  }
  .nav-actions {
    gap: 8px;
    margin-left: auto;
  }
  .prompts-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }
}
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    z-index: 1500;
    width: 280px;
    left: 0;
    top: var(--header-height);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
    background: white;
    border-right: none;
    max-height: calc(100vh - var(--header-height));
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  .content-area {
    max-width: 100vw;
    padding: 16px;
  }
  .navbar {
    padding: 0 16px;
    justify-content: flex-start;
  }
  .nav-search {
    flex: 1;
    max-width: none;
    margin: 0 16px;
  }
  .nav-actions {
    gap: 4px;
    margin-left: auto;
  }
  .nav-btn span {
    display: none;
  }
  .prompts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .modal-content {
    width: 95%;
    margin: 0 16px;
  }
}
@media (max-width: 480px) {
  .section-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .prompt-card {
    padding: 16px;
  }
  .modal-header,
  .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .action-btn {
    min-width: auto;
    width: 100%;
  }
  .content-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .copy-btn {
    align-self: flex-end;
    min-width: auto;
  }
}
/* Settings Modal Styles */
.settings-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}
.settings-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.settings-section h4 {
  color: var(--gray-900);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.setting-item label {
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.setting-item select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  background: white;
  color: var(--gray-900);
  min-width: 120px;
}
.setting-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}
/* Dark Theme Support */
body.dark-theme {
  --gray-50: #0f172a;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-400: #64748b;
  --gray-500: #94a3b8;
  --gray-600: #cbd5e1;
  --gray-700: #e2e8f0;
  --gray-800: #f1f5f9;
  --gray-900: #f8fafc;
}
body.dark-theme .setting-item select {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-900);
}
body.dark-theme .settings-section {
  border-bottom-color: var(--gray-200);
}
/* Difficulty Styles Fix */
.prompt-difficulty.expert {
  background: var(--gray-800);
  color: white;
}
.prompt-difficulty.advanced {
  background: var(--error-color);
  color: white;
}
body.dark-theme .prompt-difficulty.expert {
  background: var(--gray-200);
  color: var(--gray-900);
}
/* Prompt Detail Modal Styles */
.prompt-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.prompt-content-section {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  padding: 20px;
}
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}
.content-header h4 {
  color: var(--gray-900);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.copy-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.copy-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.copy-btn:active {
  transform: translateY(0);
}
.copy-btn.success {
  background: var(--success-color);
  border-color: var(--success-color);
}
.copy-btn.success i {
  animation: checkmark 0.3s ease;
}
@keyframes checkmark {
  0%, 50% {
    transform: scale(0.8);
  }
  100% {
    transform: scale(1);
  }
}
.prompt-content {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  white-space: pre-wrap;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 16px;
  margin-top: 8px;
  resize: vertical;
  min-height: 200px;
  width: 100%;
}
.prompt-content:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.content-help {
  margin-top: 8px;
  color: var(--gray-500);
  font-size: 12px;
}
.content-help i {
  margin-right: 4px;
  color: var(--primary-color);
}
.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  color: var(--gray-700);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 120px;
  justify-content: center;
}
.action-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  transform: translateY(-1px);
}
.action-btn:active {
  transform: translateY(0);
}
.action-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.action-btn.favorite-btn:hover {
  background: var(--error-color);
  color: white;
  border-color: var(--error-color);
}
.action-btn.favorite-btn.active {
  background: var(--error-color);
  color: white;
  border-color: var(--error-color);
}
.action-btn.rate-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}
.action-btn.copy-url-btn:hover {
  background: var(--info-color);
  color: white;
  border-color: var(--info-color);
}
.action-btn.share-btn:hover {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}
.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--gray-200);
}
/* Dark theme for prompt detail */
body.dark-theme .prompt-content-section {
  background: var(--gray-100);
  border-color: var(--gray-200);
}
body.dark-theme .content-header {
  border-bottom-color: var(--gray-200);
}
body.dark-theme .prompt-content {
  background: var(--gray-50);
  border-color: var(--gray-200);
  color: var(--gray-900);
}
body.dark-theme .prompt-content:focus {
  border-color: var(--primary-color);
}
body.dark-theme .action-btn {
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--gray-800);
}
body.dark-theme .action-btn:hover {
  background: var(--gray-200);
}
/* Rating Modal Styles */
.rating-section {
  text-align: center;
  padding: 20px 0;
}
.rating-section h4 {
  color: var(--gray-900);
  margin-bottom: 24px;
  font-size: 18px;
}
.rating-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
}
.rating-star {
  cursor: pointer;
  font-size: 32px;
  color: var(--gray-300);
  transition: all 0.2s ease;
}
.rating-star:hover i,
.rating-star.active i {
  color: var(--accent-color);
  transform: scale(1.1);
}
.rating-text {
  color: var(--gray-600);
  font-size: 14px;
  margin-top: 16px;
}
/* Dark theme for rating */
body.dark-theme .rating-section h4 {
  color: var(--gray-900);
}
body.dark-theme .rating-text {
  color: var(--gray-700);
}
/* Form Styles */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-700);
  font-weight: 500;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}
.form-text {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--gray-500);
}
/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-facebook {
  background: #1877F2;
  color: white;
}
.btn-facebook:hover {
  background: #166FE5;
}
.divider {
  text-align: center;
  margin: 16px 0;
  position: relative;
  color: var(--gray-500);
}
.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-300);
  z-index: 1;
}
.divider::after {
  content: "หรือ";
  background: white;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}
/* Error and Success Messages */
.error-message {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 8px;
  display: none;
}
.success-message {
  color: var(--success-color);
  font-size: 14px;
  margin-top: 8px;
  display: none;
}
.error-message.show,
.success-message.show {
  display: block;
}
/* Loading States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* Notification Styles */
.notifications-list {
  max-height: 400px;
  overflow-y: auto;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
}
.notification-item:hover {
  background-color: var(--gray-50);
}
.notification-item.unread {
  background-color: #f0f9ff;
  border-left: 3px solid var(--primary-color);
}
.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notification-content {
  flex: 1;
  min-width: 0;
}
.notification-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 14px;
}
.notification-message {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 4px;
}
.notification-time {
  color: var(--text-muted);
  font-size: 12px;
}
.notification-unread-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
}
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}
.notification-badge.hidden {
  display: none;
}
.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-actions .btn {
  padding: 6px 12px;
  font-size: 13px;
}
/* Empty state for notifications */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state h4 {
  margin: 16px 0 8px 0;
  color: var(--text-secondary);
}
/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}
.toast {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  padding: 16px 20px;
  min-width: 320px;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gray-300);
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
/* Toast Types with Enhanced Styling */
.toast-success {
  border-left: 4px solid var(--success-color);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}
.toast-success::before {
  background: var(--success-color);
}
.toast-success .toast-icon {
  color: var(--success-color);
}
.toast-error {
  border-left: 4px solid var(--error-color);
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}
.toast-error::before {
  background: var(--error-color);
}
.toast-error .toast-icon {
  color: var(--error-color);
}
.toast-warning {
  border-left: 4px solid var(--warning-color);
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}
.toast-warning::before {
  background: var(--warning-color);
}
.toast-warning .toast-icon {
  color: var(--warning-color);
}
.toast-info {
  border-left: 4px solid var(--primary-color);
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}
.toast-info::before {
  background: var(--primary-color);
}
.toast-info .toast-icon {
  color: var(--primary-color);
}
/* Toast Icon */
.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
/* Toast Content */
.toast-content {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-900);
  margin-bottom: 4px;
  line-height: 1.3;
}
.toast-message {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.4;
  word-wrap: break-word;
}
/* Toast Close Button */
.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin-top: -2px;
}
.toast-close:hover {
  color: var(--gray-600);
  background: var(--gray-100);
}
.toast-close:active {
  transform: scale(0.95);
}
/* Progress Bar for Auto-dismiss */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.3;
  animation: toastProgress 5s linear forwards;
}
@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
/* Animation Keyframes */
@keyframes slideInToast {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideOutToast {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
@keyframes bounceIn {
  0% {
    transform: translateX(100%) scale(0.3);
    opacity: 0;
  }
  50% {
    transform: translateX(-10px) scale(1.05);
  }
  70% {
    transform: translateX(5px) scale(0.98);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}
@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-3px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(3px);
  }
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
/* Enhanced Toast Animations */
.toast {
  animation: slideInToast 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast:hover {
  transform: translateX(-5px);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(59, 130, 246, 0.1);
}
/* Special animations for different types */
.toast-success {
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.toast-error {
  animation: slideInToast 0.4s ease-out, shake 0.5s ease-in-out 0.4s;
}
.toast-warning {
  animation: slideInToast 0.4s ease-out, pulse 1s ease-in-out infinite 0.5s;
}
.toast-info .toast-icon {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}
/* Progress bar animation variants */
.toast-success .toast-progress {
  animation: toastProgress 5s linear forwards;
}
.toast-error .toast-progress {
  animation: toastProgress 7s linear forwards;
}
.toast-warning .toast-progress {
  animation: toastProgress 6s linear forwards;
}
.toast-info .toast-progress {
  animation: toastProgress 5s linear forwards;
}
/* Responsive Design */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
  .toast-title,
  .toast-message {
    font-size: 13px;
  }
}
/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .toast {
    background: var(--gray-800);
    border-color: var(--gray-700);
    color: var(--gray-100);
  }
  .toast-title {
    color: var(--gray-100);
  }
  .toast-message {
    color: var(--gray-300);
  }
  .toast-success {
    background: linear-gradient(135deg, #064e3b 0%, var(--gray-800) 100%);
  }
  .toast-error {
    background: linear-gradient(135deg, #7f1d1d 0%, var(--gray-800) 100%);
  }
  .toast-warning {
    background: linear-gradient(135deg, #78350f 0%, var(--gray-800) 100%);
  }
  .toast-info {
    background: linear-gradient(135deg, #1e3a8a 0%, var(--gray-800) 100%);
  }
}
/* High Contrast Mode */
@media (prefers-contrast: high) {
  .toast {
    border-width: 2px;
    border-left-width: 6px;
  }
  .toast-close {
    border: 1px solid currentColor;
  }
}
/* Prompt actions (favorite + edit) */
.prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}
.prompt-edit {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.prompt-edit:hover {
  color: var(--primary-color);
}
/* Notifications Modal */
.notifications-container {
  max-height: 60vh;
  overflow-y: auto;
}
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
}
.notification-item:hover {
  background: var(--gray-50);
}
.notification-item.unread {
  background: #eff6ff;
  border-left: 4px solid var(--primary-color);
}
.notification-item.unread:hover {
  background: #dbeafe;
}
.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.notification-content {
  flex: 1;
  min-width: 0;
}
.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
  gap: 12px;
}
.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.4;
}
.notification-time {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
  flex-shrink: 0;
}
.notification-message {
  font-size: 13px;
  color: var(--gray-700);
  margin: 0 0 8px 0;
  line-height: 1.4;
}
.notification-prompt {
  display: inline-block;
  padding: 2px 8px;
  background: var(--primary-color);
  color: white;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 4px;
}
.notification-rating {
  color: var(--accent-color);
  font-size: 12px;
  margin-bottom: 4px;
}
.notification-comment {
  font-style: italic;
  color: var(--gray-600);
  font-size: 12px;
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: 8px;
  border-left: 3px solid var(--info-color);
}
.notification-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
}
.notification-badge.hidden {
  display: none;
}
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
}
.empty-state h4 {
  margin: 8px 0;
  color: var(--gray-700);
}
.empty-state p {
  margin: 0;
  font-size: 14px;
}
.loading-placeholder {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
}
.loading-placeholder i {
  margin-right: 8px;
}
/* Dark mode for notifications */
.dark-theme .notification-item {
  border-bottom-color: var(--gray-700);
}
.dark-theme .notification-item:hover {
  background: var(--gray-800);
}
.dark-theme .notification-item.unread {
  background: rgba(37, 99, 235, 0.1);
  border-left-color: var(--primary-light);
}
.dark-theme .notification-item.unread:hover {
  background: rgba(37, 99, 235, 0.15);
}
.dark-theme .notification-icon {
  background: var(--gray-700);
}
.dark-theme .notification-title {
  color: var(--gray-100);
}
.dark-theme .notification-message {
  color: var(--gray-300);
}
.dark-theme .notification-comment {
  background: var(--gray-800);
  color: var(--gray-400);
  border-left-color: var(--info-color);
}
.dark-theme .empty-state {
  color: var(--gray-400);
}
.dark-theme .empty-state h4 {
  color: var(--gray-200);
}