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

:root {
  --white: #FFFFFF;
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #1E40AF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: var(--transition);
}

nav.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

.nav-logo svg {
  width: 32px;
  height: 32px;
}

.nav-logo span {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray-500);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--blue-600);
  background: var(--blue-50);
}

.nav-links a.active {
  color: var(--blue-600);
  background: var(--blue-50);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--gray-700);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 40%, var(--blue-50) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  position: relative;
  z-index: 1;
}



.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--blue-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 68px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  color: var(--gray-900);
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 20px;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
  animation: fadeUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}

.btn-primary:hover {
  background: var(--blue-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37,99,235,0.35);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}

.btn-secondary:hover {
  border-color: var(--blue-500);
  color: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 500;
  animation: fadeUp 0.8s ease 1s forwards, float 3s ease-in-out infinite 2s;
  opacity: 0;
  cursor: pointer;
}

.hero-scroll svg {
  width: 20px;
  height: 20px;
  animation: bounce 2s infinite;
}

/* Floating food decorations */
.hero-floating {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
  font-size: 64px;
  animation: float 6s ease-in-out infinite;
}

.hero-floating:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; }
.hero-floating:nth-child(2) { top: 20%; right: 10%; animation-delay: 1.5s; font-size: 48px; }
.hero-floating:nth-child(3) { bottom: 25%; left: 12%; animation-delay: 3s; font-size: 40px; }
.hero-floating:nth-child(4) { bottom: 30%; right: 8%; animation-delay: 0.8s; font-size: 52px; }

/* Section Styles */
.section {
  padding: 100px 24px;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--gray-500);
  line-height: 1.7;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Featured Recipes */
.featured {
  background: var(--white);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.recipe-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-100);
}

.recipe-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--gray-100);
}

.recipe-card-img-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
}

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

.recipe-card-category {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue-500);
  margin-bottom: 8px;
}

.recipe-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.3;
}

.recipe-card p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--gray-400);
}

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

.recipe-card-meta svg {
  width: 14px;
  height: 14px;
}

.rating-stars {
  color: #FBBF24;
  font-weight: 600;
}

/* Categories Section */
.categories-section {
  background: var(--gray-50);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 16px;
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--gray-100);
  text-decoration: none;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
  background: var(--blue-50);
}

.category-icon {
  font-size: 36px;
  line-height: 1;
}

.category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

/* About Section */
.about-section {
  background: linear-gradient(135deg, var(--blue-50), var(--white), var(--blue-50));
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.about-text p {
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 32px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--blue-600);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--gray-500);
}

/* Footer */
footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 80px 24px 32px;
  position: relative;
  z-index: 20;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand h3 span {
  color: var(--blue-400);
}

.footer-brand p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-400);
}

.footer h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  margin-bottom: 16px;
}

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

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

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 15px;
  transition: var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 14px;
  color: var(--gray-500);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-social a:hover {
  color: var(--blue-400);
}

/* Ad Spaces */
.ad-space {
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--gray-500);
  font-size: 14px;
  text-align: center;
}

.ad-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.footer-ads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.footer-ads .ad-space {
  min-height: 120px;
}

/* ===== RECIPES PAGE ===== */
.recipes-page {
  padding-top: 64px;
  min-height: 100vh;
  background: var(--gray-50);
}

.recipes-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Sidebar */
.recipes-sidebar {
  position: sticky;
  top: 88px;
  height: fit-content;
}

.search-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.search-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-800);
  transition: var(--transition);
  outline: none;
}

.search-input::placeholder {
  color: var(--gray-400);
}

.search-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.categories-list {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.categories-list-header {
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  border-bottom: 1px solid var(--gray-100);
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-600);
}

.category-item:hover {
  background: var(--blue-50);
  color: var(--blue-600);
}

.category-item.active {
  background: var(--blue-50);
  color: var(--blue-600);
  font-weight: 600;
}

.category-count {
  font-size: 13px;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 2px 10px;
  border-radius: 100px;
}

.category-item.active .category-count {
  background: var(--blue-100);
  color: var(--blue-600);
}

/* Recipe Grid on Recipes Page */
.recipes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.recipes-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
}

.recipes-header .recipe-count {
  font-size: 15px;
  color: var(--gray-400);
  font-weight: 400;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.recipes-grid .recipe-card-img {
  height: 200px;
}

/* Recipe Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.3s ease;
}

.modal-header {
  position: relative;
}

.modal-header img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  background: var(--gray-100);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-700);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--white);
  transform: scale(1.05);
}

.modal-body {
  padding: 32px;
}

.modal-body .recipe-card-category {
  font-size: 13px;
}

.modal-body h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.modal-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--gray-500);
}

.modal-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-description {
  font-size: 16px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.ingredients-list {
  list-style: none;
}

.ingredients-list li {
  padding: 8px 0;
  font-size: 15px;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-50);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ingredients-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--blue-400);
  border-radius: 50%;
  flex-shrink: 0;
}

.instructions-list {
  list-style: none;
  counter-reset: step;
}

.instructions-list li {
  counter-increment: step;
  padding: 12px 0 12px 48px;
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
  border-bottom: 1px solid var(--gray-50);
  position: relative;
}

.instructions-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 32px;
  height: 32px;
  background: var(--blue-50);
  color: var(--blue-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Page transition */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

/* Responsive */
@media (max-width: 1024px) {
  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 40px;
    letter-spacing: -1px;
  }
  .hero p {
    font-size: 17px;
  }
  .section-header h2 {
    font-size: 32px;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .recipes-grid {
    grid-template-columns: 1fr;
  }
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-ads {
    grid-template-columns: 1fr;
  }
  .recipes-layout {
    grid-template-columns: 1fr;
  }
  .recipes-sidebar {
    position: static;
  }
  .modal-body {
    padding: 24px;
  }
  .modal-header img {
    height: 220px;
  }
}

/* Auth Modal */
.auth-tab.active {
  background: var(--white) !important;
  color: var(--gray-900) !important;
  box-shadow: var(--shadow-sm) !important;
}
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
}

/* Favorite Button (circular on card image) */
.recipe-card-img-wrap {
  position: relative;
  overflow: hidden;
}
.recipe-card-img-wrap .recipe-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--gray-100);
}
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.fav-btn:hover {
  transform: scale(1.1);
  background: white;
}
.fav-btn.active {
  color: #EF4444;
  background: rgba(255,255,255,0.95);
}
.fav-btn svg {
  width: 18px;
  height: 18px;
}

/* Favorite button in modal */
.fav-btn-big {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--transition);
}
.fav-btn-big:hover {
  border-color: var(--blue-300);
  color: var(--blue-500);
  background: var(--blue-50);
}
.fav-btn-big.active {
  color: #EF4444;
  border-color: #FCA5A5;
  background: #FEF2F2;
}

/* ===== DASHBOARD ===== */
.dash-layout {
  display: flex;
  min-height: calc(100vh - 64px);
  padding-top: 64px;
}
.dash-sidebar {
  width: 240px;
  min-width: 240px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-100);
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 10;
}
.dash-sidebar-inner {
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-user-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.dash-av-wrap {
  position: relative;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
}
.dash-av {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gray-100);
  border: 3px solid var(--blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dash-av-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: white;
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transition: var(--transition);
}
.dash-av-wrap:hover .dash-av-overlay {
  opacity: 1;
}
.dash-user-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}
.dash-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  color: var(--gray-500);
  transition: var(--transition);
  text-align: left;
  width: 100%;
}
.dash-nav-item:hover {
  background: var(--blue-50);
  color: var(--blue-600);
}
.dash-nav-item.active {
  background: var(--blue-50);
  color: var(--blue-600);
  font-weight: 600;
}
.dash-nav-ico {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  color: inherit;
}
.dash-main {
  flex: 1;
  margin-left: 240px;
  padding: 40px;
  background: var(--gray-50);
  min-height: calc(100vh - 64px);
}
.dash-section {
  display: none;
}
.dash-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
.dash-sec-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.dash-sec-top h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-900);
}
.dash-sec-sub {
  color: var(--gray-500);
  margin-top: 4px;
}

/* Collections Grid */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.collection-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
}
.collection-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}
.collection-card h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.collection-card p {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 12px;
}
.collection-card .collection-count {
  font-size: 13px;
  color: var(--blue-500);
  font-weight: 600;
}
.collection-del-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 12px;
  transition: var(--transition);
  opacity: 0;
}
.collection-card:hover .collection-del-btn {
  opacity: 1;
}
.collection-del-btn:hover {
  background: #FEE2E2;
  color: #EF4444;
}

/* Collection recipe view (sub-view) */
.collection-recipes-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
}
.collection-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: var(--transition);
  flex-shrink: 0;
}
.collection-back-btn:hover {
  border-color: var(--blue-300);
  color: var(--blue-500);
}

/* Nav Profile Avatar (top nav) */
.nav-profile-link {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px !important;
}
.nav-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gray-100);
  border: 2px solid var(--blue-100);
  flex-shrink: 0;
}
.nav-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-av.default {
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 14px;
}

@media (max-width: 768px) {
  .dash-sidebar {
    width: 200px;
    min-width: 200px;
  }
  .dash-main {
    margin-left: 200px;
    padding: 24px 16px;
  }
  .dash-sidebar-inner {
    padding: 24px 12px;
    gap: 6px;
  }
  .dash-av {
    width: 56px;
    height: 56px;
  }
  .dash-user-header h3 {
    font-size: 15px;
  }
  .dash-nav-item {
    padding: 10px 12px;
    font-size: 13px;
  }
  .dash-nav-ico {
    font-size: 16px;
    width: 20px;
  }
  .dash-sec-top {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-sec-top h2 {
    font-size: 22px;
  }
  .collections-grid {
    grid-template-columns: 1fr;
  }
  #dash-fav-grid {
    grid-template-columns: 1fr !important;
  }
  #dash-sec-add-recipe > div:last-child {
    max-width: 100% !important;
    padding: 24px 16px !important;
  }
  .nav-links.open .nav-profile-link {
    padding: 8px 18px !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 32px;
  }
  .btn {
    padding: 14px 24px;
    font-size: 15px;
  }
  .section {
    padding: 60px 16px;
  }
}
