/* ==========================================
   TOP PRZEPISY - Kolorowy Food-Magazine Design
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  /* Core palette */
  --color-coral: #ff6b6b;
  --color-coral-dark: #ee5a5a;
  --color-orange: #ffa502;
  --color-yellow: #ffd93d;
  --color-mint: #2ed8a3;
  --color-teal: #0abda0;
  --color-teal-dark: #099c85;
  --color-lavender: #a78bfa;
  --color-purple: #8b5cf6;
  --color-purple-dark: #7c3aed;

  /* Group palettes */
  --group-standard-start: #ff6b6b;
  --group-standard-end: #ffa502;
  --group-standard-light: #fff1f0;
  --group-standard-accent: #ff6b6b;

  --group-okazje-start: #2ed8a3;
  --group-okazje-end: #0abda0;
  --group-okazje-light: #ecfdf5;
  --group-okazje-accent: #0abda0;

  --group-dietetyczne-start: #a78bfa;
  --group-dietetyczne-end: #8b5cf6;
  --group-dietetyczne-light: #f5f3ff;
  --group-dietetyczne-accent: #8b5cf6;

  /* Neutrals */
  --color-bg: #fafaf8;
  --color-white: #ffffff;
  --color-text: #1a1a2e;
  --color-text-secondary: #4a4a68;
  --color-text-muted: #8888a4;
  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-hover: rgba(0, 0, 0, 0.1);

  /* Functional */
  --color-star: #ff8c42;
  --color-star-empty: #ddd6e1;
  --color-card-shadow: rgba(30, 20, 60, 0.08);
  --color-card-shadow-hover: rgba(30, 20, 60, 0.16);

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing & sizing */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 50px;

  --shadow-sm: 0 2px 8px var(--color-card-shadow);
  --shadow-md: 0 4px 20px var(--color-card-shadow);
  --shadow-lg: 0 8px 40px var(--color-card-shadow);
  --shadow-hover: 0 12px 48px var(--color-card-shadow-hover);

  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1240px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}

/* Subtle gradient splashes on the page background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 600px 600px at 10% 20%, rgba(255, 107, 107, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 90% 50%, rgba(46, 216, 163, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 50% 80%, rgba(167, 139, 250, 0.04) 0%, transparent 70%);
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: var(--color-coral);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-coral-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.2rem; font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ==========================================
   HEADER / NAVIGATION
   ========================================== */
.header {
  background: var(--color-white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 var(--color-border), 0 4px 20px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  text-decoration: none;
}

.logo:hover {
  color: var(--color-text);
  opacity: 0.85;
}

.logo-icon {
  font-size: 2rem;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-subtitle {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  -webkit-text-fill-color: var(--color-text-muted);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--color-text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav a:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.nav a.active {
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  color: var(--color-white);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-border);
  color: var(--color-text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-toggle:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
}

/* ==========================================
   HERO SECTION (index page)
   ========================================== */
.hero {
  background: linear-gradient(135deg, var(--color-coral) 0%, var(--color-orange) 50%, var(--color-yellow) 100%);
  color: var(--color-white);
  text-align: center;
  padding: 96px 28px 88px;
  position: relative;
  overflow: hidden;
}

/* Decorative blobs */
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--color-white);
  font-size: 3.4rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 36px;
  font-weight: 400;
  line-height: 1.7;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 40px;
}

.hero-stat {
  text-align: center;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 20px 28px;
  border-radius: var(--radius-md);
  min-width: 130px;
}

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--color-white);
  display: block;
  line-height: 1.1;
}

.hero-stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.85;
  font-weight: 500;
  margin-top: 4px;
}

/* ==========================================
   CATEGORY HERO (subpages)
   ========================================== */
.category-hero {
  background: linear-gradient(135deg, var(--color-coral) 0%, var(--color-orange) 50%, var(--color-yellow) 100%);
  color: var(--color-white);
  text-align: center;
  padding: 64px 28px 56px;
  position: relative;
  overflow: hidden;
}

.category-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.category-hero h1 {
  color: var(--color-white);
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.category-hero p {
  font-size: 1.08rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.7;
}

.category-hero .category-icon {
  font-size: 3.2rem;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

/* Category Intro (unique content for AdSense) */
.category-intro {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 24px 0;
}

.category-intro p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  text-align: center;
}

/* Breadcrumb */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 28px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-coral);
}

.breadcrumb span {
  margin: 0 8px;
  opacity: 0.4;
}

/* ==========================================
   SECTION TITLES
   ========================================== */
.section-title {
  text-align: center;
  margin-bottom: 52px;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
  font-weight: 700;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-coral), var(--color-orange));
  border-radius: 2px;
}

.section-title p {
  color: var(--color-text-muted);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* ==========================================
   CATEGORY GRID (Main Page)
   ========================================== */
.categories-section {
  padding: 72px 0 40px;
}

.category-group {
  margin-bottom: 64px;
}

.category-group:last-child {
  margin-bottom: 0;
}

.category-group-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

/* Category card - base */
.category-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 32px 20px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-hover);
  color: var(--color-text);
}

.category-card-icon {
  font-size: 2.6rem;
  margin-bottom: 14px;
  display: block;
  transition: var(--transition-fast);
}

.category-card:hover .category-card-icon {
  transform: scale(1.15);
}

.category-card-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.category-card-count {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ---- Group-specific category card colors ---- */

/* Standardowy zestaw -- coral/orange */
#standardowe .category-group-title {
  border-bottom-color: var(--group-standard-accent);
}

#standardowe .category-card {
  background: linear-gradient(160deg, var(--color-white) 60%, var(--group-standard-light) 100%);
  border-color: rgba(255, 107, 107, 0.12);
}

#standardowe .category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--group-standard-start), var(--group-standard-end));
  opacity: 0;
  transition: opacity 0.3s ease;
}

#standardowe .category-card:hover {
  border-color: rgba(255, 107, 107, 0.25);
  box-shadow: 0 12px 48px rgba(255, 107, 107, 0.15);
}

#standardowe .category-card:hover::before {
  opacity: 1;
}

/* Na okazje -- mint/teal */
#okazje .category-group-title {
  border-bottom-color: var(--group-okazje-accent);
}

#okazje .category-card {
  background: linear-gradient(160deg, var(--color-white) 60%, var(--group-okazje-light) 100%);
  border-color: rgba(10, 189, 160, 0.12);
}

#okazje .category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--group-okazje-start), var(--group-okazje-end));
  opacity: 0;
  transition: opacity 0.3s ease;
}

#okazje .category-card:hover {
  border-color: rgba(10, 189, 160, 0.25);
  box-shadow: 0 12px 48px rgba(10, 189, 160, 0.15);
}

#okazje .category-card:hover::before {
  opacity: 1;
}

/* Dietetyczne -- lavender/purple */
#dietetyczne .category-group-title {
  border-bottom-color: var(--group-dietetyczne-accent);
}

#dietetyczne .category-card {
  background: linear-gradient(160deg, var(--color-white) 60%, var(--group-dietetyczne-light) 100%);
  border-color: rgba(139, 92, 246, 0.12);
}

#dietetyczne .category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--group-dietetyczne-start), var(--group-dietetyczne-end));
  opacity: 0;
  transition: opacity 0.3s ease;
}

#dietetyczne .category-card:hover {
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 12px 48px rgba(139, 92, 246, 0.15);
}

#dietetyczne .category-card:hover::before {
  opacity: 1;
}

/* ==========================================
   RECIPE CARDS GRID (Category page)
   ========================================== */
.recipes-section {
  padding: 40px 0 96px;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.recipe-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Recipe card image */
.recipe-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f0e8 0%, #ece5d8 100%);
}

.recipe-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recipe-card:hover .recipe-card-image img {
  transform: scale(1.05);
}

.recipe-card-image .recipe-card-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.recipe-card-image .recipe-card-rank.top3 {
  box-shadow: 0 4px 16px rgba(243, 156, 18, 0.4);
}

/* Recipe card header */
.recipe-card-header {
  padding: 16px 26px 14px;
  position: relative;
  background: var(--color-white);
}

/* Rank badges */
.recipe-card-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
  border: 2px solid var(--color-border);
}

/* Top 3 get large gold/silver/bronze circles */
.recipe-card-rank.top3 {
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  border: none;
  box-shadow: 0 4px 16px rgba(243, 156, 18, 0.3);
  background: linear-gradient(145deg, #ffd93d, #ffa502);
}

/* Override for individual podium colors via nth-child */
.recipe-card:nth-child(1) .recipe-card-rank.top3 {
  background: linear-gradient(145deg, #ffd93d, #f0a500);
  box-shadow: 0 4px 20px rgba(240, 165, 0, 0.35);
}

.recipe-card:nth-child(2) .recipe-card-rank.top3 {
  background: linear-gradient(145deg, #e8e8e8, #b0b0b0);
  box-shadow: 0 4px 16px rgba(160, 160, 160, 0.3);
}

.recipe-card:nth-child(3) .recipe-card-rank.top3 {
  background: linear-gradient(145deg, #e8a87c, #c77b4a);
  box-shadow: 0 4px 16px rgba(199, 123, 74, 0.3);
}

.recipe-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.recipe-card-source {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.recipe-card-body {
  padding: 18px 26px;
  flex: 1;
}

.recipe-card-desc {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.recipe-card-meta {
  display: flex;
  gap: 18px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.recipe-card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.recipe-card-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ==========================================
   STAR RATING
   ========================================== */
.star-rating {
  display: flex;
  align-items: center;
  gap: 2px;
}

.star-rating .star {
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-star-empty);
  transition: color 0.15s ease, transform 0.15s ease;
  background: none;
  border: none;
  padding: 2px;
  line-height: 1;
}

.star-rating .star:hover,
.star-rating .star.active {
  color: var(--color-star);
}

.star-rating .star:hover {
  transform: scale(1.25);
}

.star-rating-text {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-left: 8px;
  min-width: 60px;
  font-weight: 500;
}

/* ==========================================
   RECIPE LINK BUTTON (pill shape)
   ========================================== */
.recipe-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  color: var(--color-white);
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.recipe-link:hover {
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.35);
}

/* ==========================================
   VOTING SUMMARY BAR
   ========================================== */
.voting-summary {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 22px 30px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid var(--color-border);
}

.voting-summary-text {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
}

.voting-summary-text strong {
  color: var(--color-text);
  font-weight: 600;
}

.voting-summary-reset {
  background: none;
  border: 1.5px solid var(--color-border-hover);
  color: var(--color-text-muted);
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-body);
}

.voting-summary-reset:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
  background: rgba(255, 107, 107, 0.04);
}

/* ==========================================
   TOOLBAR (Sort/Filter)
   ========================================== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px 22px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.toolbar-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.toolbar-buttons {
  display: flex;
  gap: 6px;
}

.toolbar-btn {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-body);
}

.toolbar-btn:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
  background: rgba(255, 107, 107, 0.04);
}

.toolbar-btn.active {
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  color: var(--color-white);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(255, 107, 107, 0.2);
}

/* ==========================================
   TOAST NOTIFICATION
   ========================================== */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--color-text);
  color: var(--color-white);
  padding: 14px 26px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================
   SCROLL TO TOP
   ========================================== */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(255, 107, 107, 0.4);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 28px 36px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer h4 {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 18px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.footer p {
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  font-weight: 400;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 36px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.45;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.recipe-card:nth-child(1) { animation-delay: 0.04s; }
.recipe-card:nth-child(2) { animation-delay: 0.08s; }
.recipe-card:nth-child(3) { animation-delay: 0.12s; }
.recipe-card:nth-child(4) { animation-delay: 0.16s; }
.recipe-card:nth-child(5) { animation-delay: 0.20s; }
.recipe-card:nth-child(6) { animation-delay: 0.24s; }
.recipe-card:nth-child(7) { animation-delay: 0.28s; }
.recipe-card:nth-child(8) { animation-delay: 0.32s; }
.recipe-card:nth-child(9) { animation-delay: 0.36s; }
.recipe-card:nth-child(10) { animation-delay: 0.40s; }

/* Smooth fade-in for category cards too */
.category-card {
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.category-card:nth-child(1) { animation-delay: 0.03s; }
.category-card:nth-child(2) { animation-delay: 0.06s; }
.category-card:nth-child(3) { animation-delay: 0.09s; }
.category-card:nth-child(4) { animation-delay: 0.12s; }
.category-card:nth-child(5) { animation-delay: 0.15s; }
.category-card:nth-child(6) { animation-delay: 0.18s; }
.category-card:nth-child(7) { animation-delay: 0.21s; }
.category-card:nth-child(8) { animation-delay: 0.24s; }
.category-card:nth-child(9) { animation-delay: 0.27s; }
.category-card:nth-child(10) { animation-delay: 0.30s; }

/* ==========================================
   RESPONSIVE - Mobile First
   ========================================== */
@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }

  .container {
    padding: 0 18px;
  }

  /* Header */
  .header-inner {
    padding: 12px 18px;
    flex-wrap: wrap;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
    margin-top: 14px;
    gap: 4px;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-sm);
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Hero */
  .hero {
    padding: 56px 18px 48px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-stat {
    padding: 14px 20px;
    min-width: 100px;
  }

  .hero-stat-number {
    font-size: 2rem;
  }

  /* Category hero */
  .category-hero {
    padding: 44px 18px 40px;
  }

  .category-hero h1 {
    font-size: 2rem;
  }

  /* Categories */
  .categories-section {
    padding: 48px 0 24px;
  }

  .category-group {
    margin-bottom: 44px;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .category-card {
    padding: 22px 14px 20px;
  }

  .category-card-icon {
    font-size: 2.2rem;
  }

  .category-card-name {
    font-size: 0.95rem;
  }

  /* Recipe grid */
  .recipes-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* Footer */
  .footer {
    padding: 40px 18px 28px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Toolbar */
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 18px;
  }

  .toolbar-buttons {
    flex-wrap: wrap;
  }

  /* Voting summary */
  .voting-summary {
    flex-direction: column;
    text-align: center;
    padding: 18px 20px;
  }

  /* Breadcrumb */
  .breadcrumb {
    padding: 12px 18px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.9rem;
  }

  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .hero-stat {
    width: 100%;
    max-width: 200px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .category-card {
    padding: 18px 10px 16px;
  }

  .category-card-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .category-card-name {
    font-size: 0.88rem;
  }

  .recipe-card-header {
    padding: 18px 20px 14px;
  }

  .recipe-card-body {
    padding: 14px 20px;
  }

  .recipe-card-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 20px;
    gap: 14px;
  }

  .recipe-link {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   LARGE SCREENS
   ========================================== */
@media (min-width: 1400px) {
  .category-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .recipes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================
   PRINT
   ========================================== */
@media print {
  .header, .footer, .star-rating, .toolbar,
  .scroll-top, .voting-summary, .nav-toggle {
    display: none;
  }

  .recipe-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  body {
    background: #fff;
  }

  body::before {
    display: none;
  }

  .hero, .category-hero {
    background: #f5f5f5;
    color: #333;
  }

  .hero h1, .category-hero h1 {
    color: #333;
  }
}

/* ==========================================
   VIDEO THUMBNAILS & RANK REASONS
   ========================================== */
.video-thumbnail {
  position: relative;
  max-width: 240px;
  aspect-ratio: 16 / 9;
  background: #f0ede6;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  float: right;
  margin: 0 0 10px 16px;
  border: 1px solid var(--color-border);
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
  transform: scale(1.05);
}

.video-thumbnail .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.65);
  border: 2px solid var(--color-coral);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(255,107,107,0.3);
}

.video-thumbnail .play-btn::after {
  content: '';
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent white;
  margin-left: 2px;
}

.video-thumbnail:hover .play-btn {
  background: var(--color-coral);
  box-shadow: 0 4px 16px rgba(255,107,107,0.5);
}

.video-thumbnail iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.rank-reason {
  padding: 8px 26px 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  font-style: italic;
  border-left: 3px solid var(--color-border);
  margin: 0;
}

/* Top 3 rank reason colors */
.recipe-card:nth-child(1) .rank-reason {
  color: var(--color-coral);
  border-left-color: var(--color-coral);
  font-weight: 600;
  font-style: normal;
}

.recipe-card:nth-child(2) .rank-reason {
  color: var(--color-text-secondary);
  border-left-color: #b0b0b0;
}

.recipe-card:nth-child(3) .rank-reason {
  color: var(--color-text-secondary);
  border-left-color: #cd7f32;
}

/* Video thumbnail in cards removed — videos are in separate section */

/* ==========================================
   VIDEOS SECTION
   ========================================== */
.videos-section {
  padding: 48px 0 32px;
  background: linear-gradient(180deg, var(--color-bg) 0%, #f0ede6 100%);
  margin-top: 16px;
}

.videos-section-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.videos-section-subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.video-card .video-thumbnail {
  float: none;
  max-width: 100%;
  margin: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
}

.video-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-info strong {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.3;
}

.video-info span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .videos-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
}

/* ==========================================
   AD SLOTS & AFFILIATE
   ========================================== */
.ad-slot {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 28px;
  min-height: 90px;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f3 0%, #eeeee8 100%);
  border: 1.5px dashed var(--color-border-hover);
  border-radius: var(--radius-md);
  min-height: 90px;
  margin-left: auto;
  margin-right: auto;
  max-width: calc(var(--max-width) - 56px);
}

.ad-placeholder-text {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* In-feed ad between recipe cards */
.recipes-grid .ad-slot {
  grid-column: 1 / -1;
  padding: 0;
  margin: 8px 0;
}

.recipes-grid .ad-placeholder {
  max-width: 100%;
  min-height: 120px;
  border-radius: var(--radius-lg);
}

/* Affiliate section */
.affiliate-section {
  margin: 48px 0 32px;
  padding: 32px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.affiliate-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--color-text);
}

.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.affiliate-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: var(--transition-fast);
}

.affiliate-card:hover {
  border-color: var(--color-coral);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.1);
}

.affiliate-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.affiliate-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.affiliate-info strong {
  font-size: 0.9rem;
  color: var(--color-text);
}

.affiliate-info span {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.affiliate-link {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  color: var(--color-white);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.affiliate-link:hover {
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.affiliate-disclaimer {
  margin-top: 16px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  opacity: 0.7;
  font-style: italic;
}

@media (max-width: 768px) {
  .ad-slot { padding: 0 18px; margin: 16px auto; }
  .affiliate-section { padding: 22px 18px; margin: 32px 0 24px; }
  .affiliate-grid { grid-template-columns: 1fr; }
  .affiliate-card { flex-wrap: wrap; }
  .affiliate-link { width: 100%; text-align: center; margin-top: 8px; }
}

/* ==========================================
   PRO FEATURES
   ========================================== */

/* --- PRO Nav --- */
.nav-separator {
  width: 1px;
  height: 20px;
  background: var(--color-border);
  margin: 0 4px;
}

.nav-pro-link {
  opacity: 0.7;
}

.pro-badge-nav {
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange)) !important;
  color: var(--color-white) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pro-badge-nav.active {
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.4);
}

/* --- PRO Active: hide ads --- */
body.pro-active .ad-slot,
body.pro-active .ad-placeholder,
body.pro-active .affiliate-section {
  display: none !important;
}

/* --- PRO Page --- */
.pro-hero {
  background: linear-gradient(135deg, #ff6b6b 0%, #ffa502 40%, #ffd93d 100%);
}

.pro-page {
  padding: 48px 0 64px;
}

.pro-status-card {
  text-align: center;
  margin-bottom: 40px;
}

.pro-status-active {
  display: inline-block;
  padding: 10px 28px;
  background: linear-gradient(135deg, #2ed8a3, #0abda0);
  color: white;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
}

.pro-status-inactive {
  display: inline-block;
  padding: 10px 28px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  border: 1.5px solid var(--color-border);
}

.pro-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.pro-benefit-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.pro-benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.pro-benefit-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 14px;
}

.pro-benefit-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.pro-benefit-card p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.pro-activate-section {
  text-align: center;
  padding: 40px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(255, 107, 107, 0.15);
}

.pro-price {
  margin-bottom: 24px;
}

.pro-price-amount {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pro-price-period {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

.pro-price-or {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.btn-pro {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  color: var(--color-white);
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.25);
  font-family: var(--font-body);
}

.btn-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 107, 107, 0.35);
}

.btn-pro-large {
  padding: 16px 48px;
  font-size: 1.1rem;
}

.btn-pro-deactivate {
  background: var(--color-bg);
  color: var(--color-text-muted);
  box-shadow: none;
  border: 1.5px solid var(--color-border);
  margin-top: 12px;
  font-weight: 500;
  font-size: 0.82rem;
  padding: 8px 20px;
}

.btn-pro-deactivate:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
  box-shadow: none;
}

.pro-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.pro-note a {
  color: var(--color-coral);
}

.pro-active-badge {
  display: inline-block;
  padding: 12px 36px;
  background: linear-gradient(135deg, #2ed8a3, #0abda0);
  color: white;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.pro-status-msg {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 24px;
}

.pro-status-msg.success {
  background: rgba(46, 216, 163, 0.1);
  color: var(--color-teal-dark);
  border: 1px solid rgba(46, 216, 163, 0.3);
}

.pro-status-msg.cancel {
  background: rgba(255, 165, 2, 0.08);
  color: #b37400;
  border: 1px solid rgba(255, 165, 2, 0.2);
}

.pro-status-msg.error {
  background: rgba(255, 107, 107, 0.08);
  color: var(--color-coral-dark);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.pro-product-description {
  text-align: center;
  margin-bottom: 36px;
}

.pro-product-description h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.pro-product-description p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Payment methods */
.pro-payment-methods {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.payment-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.payment-cards {
  display: flex;
  gap: 6px;
}

.payment-card {
  display: inline-block;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  letter-spacing: 0.3px;
}

/* Security info */
.pro-security {
  margin-top: 20px;
}

.pro-security p {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Legal links */
.pro-legal-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.pro-legal-links a {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.pro-legal-links a:hover {
  color: var(--color-coral);
}

/* --- Toolbar PRO buttons --- */
.toolbar-pro-buttons {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.toolbar-btn-pro {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(255, 165, 2, 0.08));
  border-color: rgba(255, 107, 107, 0.2);
  color: var(--color-coral);
}

.toolbar-btn-pro:hover {
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  color: var(--color-white);
  border-color: transparent;
}

/* ==========================================
   PLANNER
   ========================================== */
.planner-hero {
  background: linear-gradient(135deg, #2ed8a3 0%, #0abda0 50%, #088f7d 100%);
}

.planner-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 32px 0 64px;
}

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

.planner-nav h2 {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

.btn-planner-nav {
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn-planner-nav:hover {
  border-color: var(--color-teal);
  color: var(--color-teal);
}

.planner-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 2px;
  background: var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.planner-header-cell {
  background: var(--color-text);
  color: var(--color-white);
  padding: 10px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.planner-meal-label {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: var(--color-teal-dark);
  padding: 12px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.planner-cell {
  background: var(--color-white);
  padding: 8px;
  min-height: 70px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.planner-cell:hover {
  background: rgba(46, 216, 163, 0.06);
}

.planner-cell.filled {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.planner-cell-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}

.planner-cell-empty {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  opacity: 0.4;
}

.planner-cell-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(255, 107, 107, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.planner-cell:hover .planner-cell-remove {
  display: flex;
}

.planner-actions {
  margin-top: 20px;
  text-align: center;
}

/* Planner Sidebar */
.planner-sidebar {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  position: sticky;
  top: 80px;
}

.planner-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.planner-search,
.planner-filter {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-body);
  margin-bottom: 8px;
  transition: var(--transition-fast);
}

.planner-search:focus,
.planner-filter:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(46, 216, 163, 0.15);
}

.planner-recipe-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.planner-recipe-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1.5px solid transparent;
}

.planner-recipe-item:hover {
  background: var(--color-bg);
  border-color: var(--color-border);
}

.planner-recipe-item.selected {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-color: var(--color-teal);
}

.planner-recipe-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.planner-recipe-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.planner-recipe-info strong {
  font-size: 0.82rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-recipe-info small {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.planner-no-results {
  text-align: center;
  padding: 20px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ==========================================
   BOOKMARK & COLLECTIONS
   ========================================== */
.recipe-card-pro-actions {
  display: flex;
  gap: 4px;
  position: relative;
}

.recipe-card-footer {
  overflow: visible;
}


.bookmark-btn,
.note-btn {
  background: none;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  position: relative;
}

.bookmark-btn:hover {
  border-color: var(--color-purple);
  color: var(--color-purple);
  background: rgba(139, 92, 246, 0.06);
}

.bookmark-btn.bookmarked {
  background: linear-gradient(135deg, var(--color-lavender), var(--color-purple));
  color: white;
  border-color: transparent;
}

.note-btn:hover {
  border-color: var(--color-teal);
  color: var(--color-teal);
  background: rgba(46, 216, 163, 0.06);
}

.note-btn.has-note {
  background: linear-gradient(135deg, var(--color-mint), var(--color-teal));
  color: white;
  border-color: transparent;
}

/* Bookmark Dropdown - centered overlay */
.bookmark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bookmark-dropdown {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: 20px;
  min-width: 280px;
  max-width: 340px;
  width: 100%;
}

.bookmark-dropdown-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.bookmark-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.bookmark-option:hover {
  background: var(--color-bg);
}

.bookmark-option input[type="checkbox"] {
  accent-color: var(--color-purple);
}

.bookmark-new {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.bookmark-new-btn {
  background: none;
  border: none;
  color: var(--color-purple);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  font-family: var(--font-body);
}

.bookmark-new-btn:hover {
  text-decoration: underline;
}

/* Note Editor - centered overlay */
.note-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.note-editor {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: 20px;
  min-width: 300px;
  max-width: 400px;
  width: 100%;
}

.note-editor-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.note-editor textarea {
  width: 100%;
  padding: 8px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-body);
  resize: vertical;
  min-height: 60px;
}

.note-editor textarea:focus {
  outline: none;
  border-color: var(--color-teal);
}

.note-editor-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.note-save {
  background: linear-gradient(135deg, var(--color-mint), var(--color-teal));
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}

.note-cancel {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-body);
}

/* Note Tag on recipe card */
.recipe-note-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(46, 216, 163, 0.1), rgba(10, 189, 160, 0.1));
  color: var(--color-teal-dark);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-top: 6px;
  border: 1px solid rgba(46, 216, 163, 0.2);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================
   COLLECTIONS PAGE
   ========================================== */
.collections-hero {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
}

#collections-page {
  padding: 32px 0 64px;
}

.collection-block {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.collection-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.collection-block-header h2 {
  font-size: 1.3rem;
}

.collection-count {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.collection-delete-btn {
  background: none;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.collection-delete-btn:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
  background: rgba(255, 107, 107, 0.06);
}

.collection-empty-text {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-style: italic;
}

.collection-recipes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collection-recipe-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  gap: 12px;
  flex-wrap: wrap;
}

.collection-recipe-info {
  flex: 1;
  min-width: 0;
}

.collection-recipe-info strong {
  display: block;
  font-size: 0.92rem;
  color: var(--color-text);
}

.collection-recipe-info small {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.collection-note {
  font-size: 0.75rem;
  color: var(--color-teal-dark);
  background: rgba(46, 216, 163, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-top: 4px;
  display: inline-block;
}

.collection-recipe-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn-small {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-lavender), var(--color-purple));
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-small:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.collection-remove-btn {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.collection-remove-btn:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
}

.collection-add-block {
  text-align: center;
  margin-top: 24px;
}

/* ==========================================
   KITCHEN MODE
   ========================================== */
body.kitchen-mode {
  font-size: 20px;
  background: #1a1a2e;
  color: #f0f0f0;
}

body.kitchen-mode .header {
  background: #1a1a2e;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.kitchen-mode .header,
body.kitchen-mode .header * {
  color: #f0f0f0;
  -webkit-text-fill-color: #f0f0f0;
}

body.kitchen-mode .recipe-card {
  background: #252542;
  border-color: rgba(255,255,255,0.1);
}

body.kitchen-mode .recipe-card-title {
  font-size: 1.5rem;
  color: #fff;
}

body.kitchen-mode .recipe-card-desc {
  font-size: 1.1rem;
  color: #ccc;
}

body.kitchen-mode .recipe-card-header,
body.kitchen-mode .recipe-card-body,
body.kitchen-mode .recipe-card-footer {
  background: transparent;
}

body.kitchen-mode .recipe-card-footer {
  border-top-color: rgba(255,255,255,0.1);
}

body.kitchen-mode .recipe-card-source,
body.kitchen-mode .recipe-card-meta,
body.kitchen-mode .rank-reason {
  color: #999;
}

body.kitchen-mode .toolbar,
body.kitchen-mode .voting-summary {
  background: #252542;
  border-color: rgba(255,255,255,0.1);
}

body.kitchen-mode .toolbar-label,
body.kitchen-mode .voting-summary-text {
  color: #ccc;
}

body.kitchen-mode .category-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #252542 100%);
}

body.kitchen-mode::before {
  display: none;
}

/* ==========================================
   MODAL (Shopping List)
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
  flex: 1;
  font-size: 1.3rem;
}

.modal-week {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
}

.shopping-list-body {
  padding: 20px 28px;
}

.shopping-day {
  margin-bottom: 20px;
}

.shopping-day h3 {
  font-size: 1rem;
  color: var(--color-teal-dark);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
}

.shopping-day ul {
  list-style: none;
  padding: 0;
}

.shopping-day li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.shopping-day li strong {
  color: var(--color-text);
}

.shopping-day li a {
  color: var(--color-teal);
}

.shopping-day li small {
  color: var(--color-text-muted);
}

/* --- Shopping Plan Summary (collapsible) --- */
.shopping-plan-summary {
  border-bottom: 1px solid var(--color-border);
}

.shopping-plan-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
}

.shopping-plan-toggle:hover {
  background: var(--color-bg);
}

.toggle-arrow {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.shopping-plan-details {
  display: none;
  padding: 0 28px 16px;
}

.shopping-plan-details.open {
  display: block;
}

.shopping-plan-day {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  padding: 4px 0;
  line-height: 1.6;
}

.shopping-plan-day strong {
  color: var(--color-text);
}

.shopping-plan-day a {
  color: var(--color-teal);
}

/* --- Shopping Items --- */
.shopping-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.shopping-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.shopping-input:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(46, 216, 163, 0.15);
}

.btn-shopping-add {
  background: linear-gradient(135deg, var(--color-mint), var(--color-teal));
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: var(--transition-fast);
}

.btn-shopping-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 216, 163, 0.3);
}

.shopping-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shopping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  background: var(--color-bg);
  border: 1px solid transparent;
}

.shopping-item:hover {
  border-color: var(--color-border);
}

.shopping-item.checked {
  opacity: 0.5;
}

.shopping-item.checked .shopping-item-text {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.shopping-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.shopping-item-check {
  accent-color: var(--color-teal);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.shopping-item-text {
  font-size: 0.9rem;
  color: var(--color-text);
}

.shopping-item-delete {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  opacity: 0;
  transition: var(--transition-fast);
}

.shopping-item:hover .shopping-item-delete {
  opacity: 1;
}

.shopping-item-delete:hover {
  color: var(--color-coral);
  background: rgba(255, 107, 107, 0.08);
}

.shopping-stats {
  margin-top: 14px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.shopping-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-teal-dark);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
}

.shopping-section-extras {
  margin-top: 20px;
  color: var(--color-text-muted);
}

.shopping-item.user-extra {
  background: rgba(167, 139, 250, 0.06);
}

.shopping-item-source {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 400;
}

.shopping-item-variants {
  color: var(--color-teal-dark);
  font-size: 0.72rem;
  font-weight: 400;
}

.shopping-item-text strong {
  text-transform: capitalize;
}

.shopping-empty-hint {
  text-align: center;
  padding: 24px 12px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.btn-shopping-clear {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition-fast);
  margin-left: 8px;
}

.btn-shopping-clear:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
}

.modal-actions {
  padding: 16px 28px 24px;
  text-align: center;
}

/* ==========================================
   PRINT - enhanced for PRO
   ========================================== */
@media print {
  /* Hide everything except modal */
  body > *:not(.modal-overlay) { display: none !important; }
  body::before { display: none !important; }
  .modal-overlay { position: static; background: none; padding: 0; }
  .modal-content { max-width: 100%; max-height: none; box-shadow: none; border: none; }
  .modal-close, .modal-actions, .shopping-add-row, .shopping-item-delete { display: none !important; }
  .shopping-plan-summary { display: none !important; }
  .shopping-section-extras { display: none !important; }
  .shopping-items:last-of-type:empty { display: none !important; }
  .shopping-item { background: none !important; padding: 4px 0; }
  .shopping-item-check { display: none !important; }
  .shopping-item-text { font-size: 11pt; }
  .shopping-item.checked .shopping-item-text { text-decoration: line-through; opacity: 0.4; }
  .modal-header { padding: 10px 0; border-bottom: 2px solid #000; }
  .modal-header h2 { font-size: 16pt; }
  .shopping-section-label { font-size: 10pt; margin-top: 12px; border-bottom: 1px solid #ccc; }
  .shopping-list-body { padding: 10px 0; }
  /* Hide non-modal PRO stuff */
  .planner-sidebar, .planner-nav, .planner-actions { display: none; }
  .planner-layout { grid-template-columns: 1fr; }
  .recipe-card-pro-actions, .bookmark-dropdown, .note-editor { display: none; }
}

/* ==========================================
   RESPONSIVE - PRO features
   ========================================== */
@media (max-width: 768px) {
  .planner-layout {
    grid-template-columns: 1fr;
  }

  .planner-sidebar {
    position: static;
    max-height: 300px;
  }

  .planner-grid {
    font-size: 0.7rem;
    overflow-x: auto;
  }

  .planner-header-cell {
    font-size: 0.6rem;
    padding: 6px 2px;
  }

  .planner-cell {
    min-height: 50px;
    padding: 4px;
  }

  .planner-cell-name {
    font-size: 0.6rem;
  }

  .planner-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pro-benefits {
    grid-template-columns: 1fr;
  }

  .toolbar-pro-buttons {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }

  .collection-recipe-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .collection-recipe-actions {
    width: 100%;
  }

  .nav-separator {
    display: none;
  }

}

/* ==========================================
   AUTH PAGES
   ========================================== */
.auth-form-wrap {
  max-width: 420px;
  margin: 48px auto 64px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.auth-form input {
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--color-coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

.auth-error {
  background: rgba(255, 107, 107, 0.08);
  color: var(--color-coral-dark);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.auth-switch a {
  color: var(--color-coral);
  font-weight: 600;
}

/* Nav user */
.nav-user {
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
}

.nav-link-muted {
  color: var(--color-text-muted) !important;
  font-size: 0.82rem !important;
}

/* ==========================================
   LEGAL PAGES
   ========================================== */
.legal-page {
  max-width: 800px;
  margin: 48px auto 64px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.legal-page h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
}

.legal-page h3 {
  font-size: 1.1rem;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--color-text);
}

.legal-page p {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-page ul {
  margin: 8px 0 16px 20px;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.legal-page a {
  color: var(--color-coral);
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.contact-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--color-border);
}

.contact-card h3 {
  margin-top: 0;
  font-size: 1rem;
}

/* Nav admin link */
.nav-admin-link {
  background: var(--color-text) !important;
  color: var(--color-white) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  letter-spacing: 0.5px;
}

/* ==========================================
   ADMIN PANEL
   ========================================== */
.admin-page {
  padding: 32px 0 64px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.admin-stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-text);
}

.admin-stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.admin-table-wrap {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  background: var(--color-bg);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.admin-table tbody tr:hover {
  background: rgba(255, 107, 107, 0.03);
}

.admin-row { background: rgba(26, 26, 46, 0.03); }
.pro-row td:first-child { border-left: 3px solid var(--color-teal); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-admin {
  background: var(--color-text);
  color: var(--color-white);
}

.badge-pro {
  background: linear-gradient(135deg, var(--color-mint), var(--color-teal));
  color: var(--color-white);
}

.admin-actions {
  white-space: nowrap;
  display: flex;
  gap: 4px;
}

.btn-admin {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.btn-admin:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.btn-admin-success {
  border-color: rgba(46, 216, 163, 0.3);
  color: var(--color-teal-dark);
}

.btn-admin-success:hover {
  background: var(--color-teal);
  color: white;
  border-color: var(--color-teal);
}

.btn-admin-danger {
  border-color: rgba(255, 107, 107, 0.3);
  color: var(--color-coral);
}

.btn-admin-danger:hover {
  background: var(--color-coral);
  color: white;
  border-color: var(--color-coral);
}

@media (max-width: 768px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-table { font-size: 0.78rem; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
}

@media (max-width: 768px) {
  .legal-page { padding: 28px 20px; margin: 24px auto 40px; }
  .auth-form-wrap { margin: 24px auto 40px; padding: 28px 20px; }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
