/* =========================================
   TPN's Pantry — Design System
   Malaysian Kitchen · Premium Dark Mode
   ========================================= */

/* --- CSS Custom Properties --- */
:root {
  /* Core palette — Cherry Biome (soft pink, warm, blush) */
  --bg-primary: #fdf2f4;
  --bg-secondary: #fae5eb;
  --bg-card: #fff8fa;
  --bg-card-hover: #fceff3;
  --bg-modal: rgba(253, 242, 244, 0.85);
  --bg-glass: rgba(255, 248, 250, 0.82);

  /* Accent colours — petal pinks, cherry blossom */
  --gold: #d4677e;          /* primary rose accent (was gold) */
  --gold-light: #f5a3b9;    /* lighter petal pink */
  --orange: #e8869b;        /* coral-pink */
  --red-spice: #b53d63;     /* deep cherry, warning */
  --green: #79a86a;         /* soft sage — still readable for "have" state */
  --green-dim: #5d8a4f;
  --purple: #c4a3d8;        /* lilac/dusk */
  --purple-dim: #9d80b3;

  /* Text — warm plums on a light bg */
  --text-primary: #3d2935;
  --text-secondary: #7d5a6a;
  --text-dim: #b0919c;
  --text-on-accent: #fff8fa;

  /* Borders & surfaces */
  --border: rgba(189, 124, 153, 0.22);
  --border-hover: rgba(212, 103, 126, 0.45);
  --shadow-sm: 0 2px 8px rgba(189, 124, 153, 0.12);
  --shadow-md: 0 8px 32px rgba(189, 124, 153, 0.18);
  --shadow-lg: 0 16px 48px rgba(189, 124, 153, 0.22);
  --shadow-glow: 0 0 24px rgba(212, 103, 126, 0.25);

  /* Gradients */
  --gradient-gold: linear-gradient(135deg, #e4708d, #b53d63);
  --gradient-card: linear-gradient(145deg, #fff8fa, #fceff3);
  --gradient-hero: linear-gradient(135deg, #fae5eb 0%, #fdf2f4 50%, #f6e0e7 100%);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 100px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* --- App Shell --- */
#app {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 100px;
}

/* --- Header --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) var(--space-lg);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px rgba(212, 103, 126, 0.4));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.search-bar {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.5;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  border-color: var(--gold);
  box-shadow: var(--shadow-glow);
}

.search-bar input::placeholder {
  color: var(--text-dim);
}

/* --- Auth & User Profile --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
  justify-content: flex-end;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 18px;
  background: var(--gradient-gold);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-on-accent);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.user-profile {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  transition: all 0.3s ease;
}

.user-profile:hover .user-avatar {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.user-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  min-width: 150px;
  display: none;
  flex-direction: column;
  gap: var(--space-xs);
  box-shadow: var(--shadow-lg);
  z-index: 101;
  animation: slideInDown 0.2s ease;
}

.user-profile:hover .user-menu,
.user-profile.menu-open .user-menu {
  display: flex;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#userName {
  padding: var(--space-xs) var(--space-sm);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold-light);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.logout-btn {
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(181, 61, 99, 0.1);
  color: var(--red-spice);
}

.hidden {
  display: none !important;
}

/* --- Tab Navigation --- */
.tab-nav {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 75px;
  z-index: 99;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--gradient-gold);
  color: var(--text-on-accent);
  font-weight: 600;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.tab-icon {
  font-size: 1.1rem;
}

/* --- Main Content --- */
.main-content {
  padding: var(--space-lg);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: var(--space-xl);
}

/* --- Category & Method Filters --- */
.category-filters,
.method-filters {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar,
.method-filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.filter-chip.active {
  background: var(--gold);
  color: var(--text-on-accent);
  border-color: var(--gold);
  font-weight: 600;
}

.method-filters .filter-chip.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

/* --- Dish Cards Grid --- */
.dishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.dish-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.dish-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.dish-card-image {
  width: 100%;
  height: 180px;
  background: var(--bg-card);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.dish-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(transparent, var(--bg-card));
}

.dish-card-image .placeholder-emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5rem;
  z-index: 1;
}

.dish-card-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  z-index: 2;
  transition: all 0.25s ease;
}

.dish-card-fav:hover {
  transform: scale(1.15);
}

.dish-card-fav.is-fav {
  background: var(--red-spice);
}

.dish-card-body {
  padding: var(--space-md);
}

.dish-card-name {
  font-weight: 700;
  font-size: 1.08rem;
  margin-bottom: 4px;
  line-height: 1.3;
}

.dish-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.meta-badge {
  padding: 3px 10px;
  background: rgba(212, 103, 126, 0.12);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold-light);
}

.method-badge {
  background: rgba(155, 114, 240, 0.12);
  color: var(--purple);
}

.difficulty-stars {
  font-size: 0.7rem;
  color: var(--gold);
}

/* --- Shop Cards --- */
.shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.shop-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.shop-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.shop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.shop-card-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.shop-card-address {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.shop-rating {
  display: flex;
  gap: 2px;
  font-size: 0.8rem;
}

.shop-card-distance {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.shop-card-distance span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shop-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.shop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-lg);
}

.shop-tag {
  padding: 3px 10px;
  background: rgba(121, 168, 106, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--green);
}

.shop-directions-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  background: var(--gradient-gold);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}

.shop-directions-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* =========================================
   Dashboard
   ========================================= */
.dash-gift-banner {
  background: var(--gradient-gold);
  color: var(--text-on-accent);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s ease;
}
.dash-gift-banner:hover { transform: translateY(-2px); }

.dash-hero {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
}
.dash-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
}
.dash-hi {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.dash-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 4px 0 0;
}
.dash-level {
  text-align: right;
  flex-shrink: 0;
}
.dash-level-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
}
.dash-level-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.dash-xpbar {
  width: 100%;
  height: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border);
}
.dash-xpbar-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.dash-xpbar-label {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.dash-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}
.dash-stat:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.dash-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.dash-stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.dash-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

/* 30-day streak journey */
.dash-streak-grid {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 6px;
}
.dash-streak-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 2px;
}
.dash-streak-cell:hover {
  transform: scale(1.15);
  z-index: 2;
}
.dash-streak-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  line-height: 1;
}
.dash-streak-reward {
  font-size: 1.05rem;
  line-height: 1;
  margin-top: 1px;
}
.dash-streak-cell.has-reward {
  border-color: var(--gold);
  background: var(--bg-card);
}
.dash-streak-cell.has-reward .dash-streak-num {
  color: var(--gold);
  font-weight: 700;
}
.dash-streak-cell.reached {
  background: var(--gradient-gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212, 103, 126, 0.35);
}
.dash-streak-cell.reached .dash-streak-num {
  color: var(--text-on-accent);
  font-weight: 700;
}
.dash-streak-cell.is-current {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  z-index: 1;
}
.dash-streak-cell.is-next {
  border: 2px dashed var(--gold);
  animation: pulseNext 2s ease-in-out infinite;
}
@keyframes pulseNext {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 103, 126, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(212, 103, 126, 0); }
}
.dash-streak-legend {
  margin-top: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* Achievements grid */
.dash-pill {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: var(--radius-full);
  margin-left: var(--space-sm);
  border: 1px solid var(--border);
}
.dash-achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-sm);
}
.dash-achievement {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
  opacity: 0.45;
  filter: grayscale(0.6);
  transition: all 0.3s ease;
}
.dash-achievement:hover {
  transform: translateY(-2px);
}
.dash-achievement.earned {
  opacity: 1;
  filter: none;
  border-color: var(--gold);
  background: var(--bg-card);
  box-shadow: var(--shadow-glow);
}
.dash-achievement-emoji {
  font-size: 2rem;
  margin-bottom: 6px;
  line-height: 1;
}
.dash-achievement-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.dash-achievement-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

@media (max-width: 600px) {
  .dash-achievements { grid-template-columns: repeat(2, 1fr); }
}

/* Gift tier row */
.dash-gifts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}
.dash-gift {
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  opacity: 0.5;
  transition: all 0.3s;
}
.dash-gift.earned {
  opacity: 1;
  border-color: var(--gold);
  box-shadow: var(--shadow-glow);
}
.dash-gift.claimed {
  opacity: 1;
  border-color: var(--green);
  background: rgba(121, 168, 106, 0.08);
}
.dash-gift-emoji { font-size: 1.8rem; margin-bottom: 4px; }
.dash-gift-days  { font-weight: 700; color: var(--text-primary); font-size: 0.9rem; }
.dash-gift-label { font-size: 0.72rem; color: var(--text-secondary); }
.dash-gifts-note {
  margin-top: var(--space-md);
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
}

/* Today's pick */
.dash-pick-row {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}
.dash-pick-img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.dash-pick-name {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.dash-pick-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}
.dash-pick-btn {
  background: var(--gradient-gold);
  color: var(--text-on-accent);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform 0.15s, box-shadow 0.3s;
}
.dash-pick-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

@media (max-width: 600px) {
  .dash-streak-grid { grid-template-columns: repeat(10, 1fr); }
  .dash-gifts { grid-template-columns: repeat(2, 1fr); }
  .dash-pick-row { flex-direction: column; align-items: flex-start; }
  .dash-pick-img { width: 100%; height: 140px; }
}

/* =========================================
   Locked dish state
   ========================================= */
.dish-card.is-locked .dish-card-image {
  filter: grayscale(0.6) brightness(0.7);
}
.dish-card.is-locked .dish-card-name::after {
  content: '  🔒';
}
.dish-card-lock {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(45, 25, 35, 0.85);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 2;
}
.dish-card-cooked {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(121, 168, 106, 0.9);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 2;
}

/* =========================================
   Mark-as-Cooked button (in modal)
   ========================================= */
.cook-btn {
  display: block;
  width: 100%;
  margin: var(--space-md) 0 var(--space-sm);
  padding: 12px 20px;
  background: var(--gradient-gold);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.3s;
}
.cook-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}
.cook-btn:disabled,
.cook-btn.cooked-today {
  background: rgba(121, 168, 106, 0.18);
  color: var(--green);
  border: 1px solid var(--green);
  cursor: default;
}
.cook-history {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: var(--space-md);
  font-style: italic;
}

/* =========================================
   Gift modal
   ========================================= */
.gift-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(45, 25, 35, 0.6);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.gift-modal-overlay.open { display: flex; }
.gift-modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--gradient-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(212, 103, 126, 0.4);
  animation: paywallFadeIn 0.4s ease;
}
.gift-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.gift-modal-close:hover { background: var(--bg-secondary); }
.gift-modal-emoji {
  font-size: 4rem;
  margin-bottom: var(--space-sm);
  animation: float 3s ease-in-out infinite;
}
.gift-modal-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}
.gift-modal-tier {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: var(--space-md);
}
.gift-modal-msg {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}
.gift-modal-code {
  background: var(--bg-secondary);
  border: 1px dashed var(--gold);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.05em;
  word-break: break-all;
}
.gift-modal-btn {
  display: block;
  width: 100%;
  background: var(--gradient-gold);
  color: var(--text-on-accent);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  transition: transform 0.15s, box-shadow 0.3s;
}
.gift-modal-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}
.gift-modal-claim {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.gift-modal-claim:hover {
  border-color: var(--green);
  color: var(--green);
}

/* --- Pantry sections (Have vs Shopping) --- */
.pantry-section {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

.pantry-section.pantry-have {
  border-top: 3px solid var(--green);
}

.pantry-section.pantry-shop {
  border-top: 3px solid var(--gold);
}

.pantry-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pantry-section-count {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.pantry-have .pantry-section-count {
  background: rgba(121, 168, 106, 0.15);
  color: var(--green);
}

.pantry-shop .pantry-section-count {
  background: rgba(212, 103, 126, 0.15);
  color: var(--gold);
}

.pantry-empty {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  padding: var(--space-md) 0 var(--space-sm);
}

/* --- Pantry --- */
.pantry-search {
  margin-bottom: var(--space-lg);
}

.pantry-search input {
  width: 100%;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}

.pantry-search input:focus {
  border-color: var(--gold);
}

.pantry-search input::placeholder {
  color: var(--text-dim);
}

.pantry-category {
  margin-bottom: var(--space-xl);
}

.pantry-category-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-md);
  color: var(--gold-light);
  text-transform: capitalize;
}

.pantry-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-sm);
}

.pantry-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pantry-item:hover {
  border-color: var(--border-hover);
}

.pantry-item.has-item {
  border-color: var(--green-dim);
  background: rgba(121, 168, 106, 0.05);
}

.pantry-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.pantry-item.has-item .pantry-checkbox {
  background: var(--green);
  border-color: var(--green);
}

.pantry-item-name {
  font-size: 0.88rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.pantry-item-qty {
  width: 90px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  outline: none;
  cursor: text;
  transition: border-color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.pantry-item-qty::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.pantry-item-qty:focus {
  border-color: var(--gold);
  background: var(--bg-primary);
}

.pantry-item.has-item .pantry-item-qty:not(:placeholder-shown) {
  border-color: var(--green-dim);
  color: var(--green);
  font-weight: 600;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-modal);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-md);
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--red-spice);
}

.modal-image {
  width: 100%;
  height: 220px;
  background: var(--bg-card);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.modal-body {
  padding: var(--space-lg);
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-malay {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 500;
  margin-top: 4px;
}

.fav-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.fav-btn:hover {
  transform: scale(1.2);
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.modal-meta {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
}

/* --- Method Tabs (inside modal) --- */
.method-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.method-tab {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.method-tab:hover {
  border-color: var(--border-hover);
}

.method-tab.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.method-instructions {
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  border-left: 3px solid var(--purple);
}

.modal-section-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

/* --- Ingredient List (in modal) --- */
.ingredients-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.ingredient-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.ingredient-row:hover {
  border-color: var(--border-hover);
}

.ingredient-row.have {
  border-color: var(--green-dim);
  background: rgba(121, 168, 106, 0.05);
}

.ingredient-row.missing {
  border-color: rgba(181, 61, 99, 0.3);
  background: rgba(181, 61, 99, 0.04);
}

.ingredient-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.ingredient-row.have .ingredient-check {
  background: var(--green);
  border-color: var(--green);
}

.ingredient-info {
  flex: 1;
}

.ingredient-name {
  font-size: 0.88rem;
  font-weight: 500;
}

.ingredient-amount {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.ingredient-have-qty {
  font-size: 0.72rem;
  color: var(--green);
  font-weight: 600;
  margin-top: 2px;
}

.ingredient-essential {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.ingredient-essential.required {
  background: rgba(212, 103, 126, 0.15);
  color: var(--gold);
}

.ingredient-essential.optional {
  background: rgba(107, 101, 128, 0.15);
  color: var(--text-dim);
}

.ingredient-shop-link {
  font-size: 0.75rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: color 0.2s;
}

.ingredient-shop-link:hover {
  color: var(--gold);
}

/* Missing summary bar */
.missing-summary {
  padding: var(--space-md);
  background: rgba(181, 61, 99, 0.08);
  border: 1px solid rgba(181, 61, 99, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  display: none;
}

.missing-summary.show {
  display: block;
}

.missing-summary p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.missing-summary strong {
  color: var(--orange);
}

.missing-shop-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.missing-shop-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--gradient-gold);
  color: var(--text-on-accent);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.missing-shop-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* --- YouTube Links --- */
.youtube-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.youtube-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}

.youtube-link:hover {
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.05);
}

.yt-icon {
  width: 36px;
  height: 36px;
  background: #ff0000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.yt-title {
  font-size: 0.88rem;
  font-weight: 500;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-md);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: var(--space-md);
  }

  .search-bar {
    max-width: 100%;
  }

  .main-content {
    padding: var(--space-md);
  }

  .dishes-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .shops-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .tab-nav {
    top: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: space-around;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    border-bottom: none;
    z-index: 200;
  }

  .tab-btn {
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    font-size: 0.72rem;
  }

  .section-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .dishes-grid {
    grid-template-columns: 1fr;
  }

  .logo-text {
    font-size: 1.2rem;
  }

  .pantry-items {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Gate overlays — shared
   ========================================= */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: paywallFadeIn 0.6s ease;
}

.gate-overlay.gate-hidden {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* =========================================
   Stage 1: Landing
   ========================================= */
.landing-overlay {
  background: radial-gradient(ellipse at center top, #fae5eb 0%, #fdf2f4 60%);
  overflow-y: auto;
  align-items: flex-start;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.landing-content {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

.landing-logo {
  display: inline-block;
  font-size: 4rem;
  margin-bottom: var(--space-md);
  animation: float 3s ease-in-out infinite;
}

.landing-title {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.landing-tagline {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: var(--space-2xl);
  font-style: italic;
}

.landing-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  text-align: left;
}

.landing-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  transition: border-color 0.3s, transform 0.3s;
}

.landing-feature:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.landing-feature-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.landing-feature h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.landing-feature p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.landing-cta {
  background: var(--gradient-gold);
  color: var(--text-on-accent);
  border: none;
  padding: 16px 48px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}

.landing-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow), 0 8px 24px rgba(212, 103, 126, 0.3);
}

/* =========================================
   Stage 3: Login Gate
   ========================================= */
.login-gate-overlay {
  background: radial-gradient(ellipse at center, #fff8fa 0%, #fae5eb 100%);
}

.login-gate-card {
  width: 100%;
  max-width: 440px;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(212, 103, 126, 0.12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-gate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-gold);
}

.login-gate-logo {
  display: inline-block;
  font-size: 2.6rem;
  margin-bottom: var(--space-md);
}

.login-gate-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.login-gate-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.login-gate-btn {
  width: 100%;
  background: #fff;
  color: #1f1f1f;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}

.login-gate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.12);
}

.login-gate-note {
  margin-top: var(--space-md);
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* =========================================
   Paywall Gate
   ========================================= */
.paywall-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(ellipse at center, #fff8fa 0%, #fae5eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: paywallFadeIn 0.6s ease;
}

.paywall-overlay.paywall-hidden {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

@keyframes paywallFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.paywall-card {
  width: 100%;
  max-width: 520px;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(212, 103, 126, 0.15);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.paywall-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-gold);
}

.paywall-header {
  margin-bottom: var(--space-xl);
}

.paywall-logo {
  display: inline-block;
  font-size: 3.2rem;
  margin-bottom: var(--space-sm);
  animation: float 3s ease-in-out infinite;
}

.paywall-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.paywall-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-style: italic;
}

.paywall-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.paywall-option {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.paywall-option:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.paywall-option-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-xs);
}

.paywall-price {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.paywall-price-alt {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-xs);
}

.paywall-option-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
}

.paywall-pay-btn,
.paywall-code-btn {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}

.paywall-pay-btn {
  background: rgba(181, 61, 99, 0.18);
  border: 1px solid rgba(181, 61, 99, 0.4);
  color: #ffb3b3;
}

.paywall-pay-btn:hover {
  background: rgba(181, 61, 99, 0.28);
  transform: translateY(-1px);
}

.paywall-divider {
  position: relative;
  text-align: center;
  margin: var(--space-sm) 0;
}

.paywall-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}

.paywall-divider span {
  position: relative;
  background: var(--bg-secondary);
  padding: 0 var(--space-md);
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  font-weight: 600;
}

.paywall-code-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.paywall-code-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  text-align: center;
  letter-spacing: 0.1em;
}

.paywall-code-input::placeholder {
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.paywall-code-input:focus {
  border-color: var(--gold);
  background: var(--bg-primary);
}

.paywall-code-input.paywall-shake {
  animation: paywallShake 0.4s ease;
  border-color: var(--red-spice);
}

@keyframes paywallShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.paywall-code-btn {
  background: var(--gradient-gold);
  color: var(--text-on-accent);
}

.paywall-code-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.paywall-feedback {
  min-height: 1.4em;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.paywall-feedback.paywall-error {
  color: #ffb3b3;
}

.paywall-feedback.paywall-success {
  color: var(--green);
  font-weight: 600;
}

.paywall-footer {
  margin-top: var(--space-xl);
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}