/* ==========================================================================
   Prompts App - Official Mobile App Theme Alignment Stylesheet
   Directly synced with Flutter AppColors & AppTheme (Outfit font & Brand Gradient)
   ========================================================================== */

:root {
  /* Official Flutter App Theme Tokens */
  --bg-dark: #09090b;
  --bg-card: #141417;
  --bg-card-hover: #1f1f23;
  --bg-input: #121215;

  /* Official Brand Palette (#B691CA Lavender, #D0849D Mauve, #F9BECC Pink) */
  --brand-purple: #b691ca;
  --brand-rose: #d0849d;
  --brand-pink: #f9becc;
  --brand-gradient: linear-gradient(135deg, #b691ca 0%, #d0849d 50%, #f9becc 100%);
  --brand-gradient-horizontal: linear-gradient(90deg, #b691ca 0%, #d0849d 50%, #f9becc 100%);
  --brand-glow: rgba(182, 145, 202, 0.28);

  /* Accents & Status */
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.25);
  --accent-red: #ef4444;

  /* Glass Borders */
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glass-hover: rgba(255, 255, 255, 0.24);

  /* Typography */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radius Matching Flutter RoundedRectangleBorder */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100vw;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Utility Helpers */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* Header & Nav */
header {
  width: 100%;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.92);
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  box-shadow: 0 4px 14px var(--brand-glow);
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 14px var(--brand-glow);
  flex-shrink: 0;
}

.logo-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-btn-app {
  background: var(--brand-gradient);
  color: #ffffff !important;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px var(--brand-glow);
  transition: transform 0.2s ease, filter 0.2s ease !important;
}

.nav-btn-app:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Hero Section */
.hero {
  padding: 34px 0 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 540px;
  height: 220px;
  background: radial-gradient(circle, rgba(182, 145, 202, 0.2) 0%, rgba(9, 9, 11, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(182, 145, 202, 0.12);
  border: 1px solid rgba(182, 145, 202, 0.35);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  color: #f9becc;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 40%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0 8px;
}

.hero p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 20px;
  padding: 0 12px;
}

/* Search Bar */
.search-wrapper {
  width: 100%;
  max-width: 620px;
  margin: 0 auto 16px;
  padding: 0 4px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 4px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.search-bar:focus-within {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.search-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Discovery Controls (Tabs & Category Scroll) */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.tabs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.filter-tabs {
  display: inline-flex;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 2px 10px var(--brand-glow);
}

.prompts-count-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Category Chips Scroll */
.chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.chips-scroll::-webkit-scrollbar {
  height: 3px;
}

.chips-scroll::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 3px;
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--border-glass-hover);
  color: #fff;
  background: var(--bg-card-hover);
}

.chip.active {
  background: #ffffff;
  color: #09090b;
  border-color: #ffffff;
  font-weight: 700;
}

/* Prompts Grid */
.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
  width: 100%;
}

/* Prompt Card */
.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
  min-width: 0;
  width: 100%;
}

.prompt-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glass-hover);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.card-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #181820;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  z-index: 2;
  flex-wrap: wrap;
}

.badge {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.95);
  color: #000;
}

.badge-free {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
}

.badge-tool {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.fav-icon-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  z-index: 2;
}

.fav-icon-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.fav-icon-btn.favorited {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.card-prompt-preview {
  position: relative;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
  height: 34px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.prompt-blurred p {
  filter: blur(4px);
  user-select: none;
  opacity: 0.4;
}

.blur-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(18, 18, 22, 0.75);
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
}

.card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag-pill {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.card-footer {
  margin-top: auto;
  width: 100%;
}

.action-btn {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  box-sizing: border-box;
}

.btn-copy {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-copy:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #fff;
}

.btn-copy.copied {
  background: #10b981 !important;
  color: #fff !important;
}

.btn-unlock {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-md);
  width: 100%;
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.empty-state h3 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 4px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 16px var(--brand-glow);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-success {
  background: #10b981;
  color: #fff;
}

/* App Banner Card */
.app-banner-card {
  background: linear-gradient(135deg, rgba(182, 145, 202, 0.12), rgba(249, 190, 204, 0.08));
  border: 1px solid rgba(182, 145, 202, 0.25);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 36px;
  width: 100%;
}

.app-banner-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.app-banner-card p {
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 18px;
  font-size: 14px;
}

/* Quick Modal */
.modal-wrapper {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-wrapper.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  background: #141417;
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  display: grid;
  grid-template-columns: 1fr 1fr;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-drag-handle {
  display: none;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(14, 14, 18, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
}

.modal-media {
  background: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.modal-content {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  flex: 1;
}

.modal-fav-btn {
  position: static;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-fav-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transform: scale(1.05);
}

.modal-fav-btn.favorited {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

.modal-meta-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.meta-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.modal-prompt-box {
  background: #0d0d12;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
  position: relative;
  word-break: break-word;
}

.prompt-text-blur-wrapper {
  position: relative;
}

.blurred-text {
  filter: blur(5px);
  user-select: none;
  opacity: 0.4;
}

.modal-blur-banner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}

.lock-circle {
  font-size: 22px;
  margin-bottom: 4px;
}

.modal-blur-banner h4 {
  font-size: 15px;
  color: #fbbf24;
  margin-bottom: 2px;
}

.modal-blur-banner p {
  font-size: 11px;
  color: var(--text-secondary);
  max-width: 260px;
}

.modal-actions {
  margin-top: auto;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #18181f;
  border: 1px solid var(--border-glass-hover);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.toast-info {
  border-color: rgba(182, 145, 202, 0.5);
  color: #b691ca;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-glass);
  padding: 30px 0 40px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  width: 100%;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

footer a:hover {
  color: #fff;
}

/* ==========================================================================
   Mobile Bottom Navigation & Fully Responsive Breakpoints
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: rgba(14, 14, 18, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 10px));
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
  width: 100%;
  box-sizing: border-box;
}

.mobile-bottom-nav .nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  flex: 1;
  max-width: 70px;
}

.mobile-bottom-nav .nav-item:active {
  transform: scale(0.92);
}

.mobile-bottom-nav .nav-item.active {
  color: var(--brand-purple);
}

.mobile-bottom-nav .nav-item.active svg {
  stroke: var(--brand-purple);
}

.mobile-bottom-nav .nav-item-download {
  color: var(--accent-gold);
}

/* Tablet & Mobile Screens (< 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 12px));
    -webkit-tap-highlight-color: transparent;
  }

  .container {
    padding: 0 12px;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 20px 0 14px;
  }

  .hero-badge {
    font-size: 10px;
    padding: 3px 10px;
    margin-bottom: 8px;
  }

  .hero h1 {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 6px;
    padding: 0 4px;
  }

  .hero p {
    font-size: 13px;
    margin-bottom: 14px;
    padding: 0 4px;
  }

  .search-wrapper {
    margin-bottom: 12px;
    padding: 0;
  }

  .search-bar {
    padding: 3px 12px;
  }

  .search-input {
    font-size: 13px;
    padding: 7px 8px;
  }

  .controls-bar {
    gap: 10px;
    margin-bottom: 14px;
  }

  .filter-tabs {
    display: none;
  }

  .tabs-row {
    justify-content: flex-end;
  }

  .chips-scroll {
    gap: 6px;
  }

  .chip {
    padding: 5px 12px;
    font-size: 11px;
  }

  /* 2-Column Pinterest/Wallpaper Grid */
  .prompts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
  }

  .prompt-card {
    border-radius: var(--radius-sm);
  }

  .card-body {
    padding: 8px;
  }

  .card-title {
    font-size: 12px;
    margin-bottom: 3px;
  }

  .card-prompt-preview {
    height: 30px;
    font-size: 10.5px;
    line-height: 1.35;
    margin-bottom: 6px;
  }

  .card-tags {
    display: none;
  }

  .action-btn {
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 6px;
  }

  .card-badges .badge {
    font-size: 8.5px;
    padding: 2px 4px;
  }

  .fav-icon-btn {
    width: 26px;
    height: 26px;
    top: 6px;
    right: 6px;
  }

  .fav-icon-btn svg {
    width: 13px;
    height: 13px;
  }

  .app-banner-card {
    padding: 20px 14px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
  }

  .app-banner-card h3 {
    font-size: 17px;
  }

  .app-banner-card p {
    font-size: 12px;
    margin-bottom: 14px;
  }

  /* Mobile Slide-Up Bottom Sheet Modal */
  .modal-wrapper {
    padding: 0;
    align-items: flex-end;
  }

  .modal-drag-handle {
    display: block;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-full);
    z-index: 35;
    pointer-events: none;
  }

  .modal-card {
    grid-template-columns: 1fr;
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    border-bottom: none;
    background: #141418;
    position: relative;
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: slideUpMobile 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .modal-close-btn {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(14, 14, 18, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    z-index: 36;
  }

  .modal-media {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 46vh;
    min-height: 240px;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
    background: #09090c;
  }

  .modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .modal-content {
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 16px));
  }

  .modal-header h2 {
    font-size: 18px;
    line-height: 1.3;
  }

  .modal-prompt-box {
    padding: 12px;
    font-size: 12.5px;
    margin-bottom: 14px;
    max-height: 160px;
    border-radius: var(--radius-md);
  }

  .toast {
    bottom: calc(68px + env(safe-area-inset-bottom, 10px));
    font-size: 12px;
    padding: 8px 16px;
  }
}

/* Small Phones (< 360px, e.g. iPhone SE) */
@media (max-width: 360px) {
  .container {
    padding: 0 8px;
  }

  .prompts-grid {
    gap: 6px;
  }

  .card-body {
    padding: 6px;
  }

  .card-title {
    font-size: 11px;
  }

  .action-btn {
    padding: 5px 6px;
    font-size: 10px;
  }
}
