/* ==========================================================================
   DESIGN SYSTEM & PASTEL COLOR PALETTE
   ========================================================================== */
:root {
  --bg-main: #FAF5EF;
  --bg-alt: #F4EAD5;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-solid: #FFFFFF;
  
  --primary: #E07A5F;
  --primary-hover: #D6684C;
  --primary-light: #FCEBE6;
  
  --secondary: #F4A261;
  --secondary-hover: #E7914D;
  --secondary-light: #FEF3E7;
  
  --accent-sage: #81B29A;
  --accent-blue: #70A288;
  --accent-yellow: #E9C46A;
  
  --text-dark: #2B2D42;
  --text-muted: #6C757D;
  --text-light: #FFFFFF;
  
  --border-light: rgba(224, 122, 95, 0.15);
  --glass-border: rgba(255, 255, 255, 0.6);
  
  --shadow-sm: 0 4px 12px rgba(43, 45, 66, 0.05);
  --shadow-md: 0 10px 25px rgba(224, 122, 95, 0.12);
  --shadow-lg: 0 20px 40px rgba(224, 122, 95, 0.18);
  --shadow-glow: 0 0 25px rgba(224, 122, 95, 0.35);
  
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-full: 9999px;

  --font-heading: 'Comfortaa', cursive, sans-serif;
  --font-body: 'Nunito', sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-hover);
  border-radius: var(--radius-full);
}

/* Background Particle Canvas */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* Container Utility */
.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Section Header Styling */
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 48px auto;
}

.section-badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-fast);
  user-select: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 8px 20px rgba(224, 122, 95, 0.35);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 25px rgba(224, 122, 95, 0.45);
}
.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
  background-color: var(--surface-solid);
  color: var(--text-dark);
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-bounce {
  animation: pulseButton 3s infinite ease-in-out;
}

@keyframes pulseButton {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1100px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 10px 24px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-dark);
}

.logo-icon {
  font-size: 1.6rem;
  transform: rotate(-8deg);
  transition: transform var(--transition-normal);
}
.nav-logo:hover .logo-icon {
  transform: rotate(12deg) scale(1.2);
}

.nav-happiness {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background-color: var(--primary-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  transition: transform var(--transition-normal);
}
.nav-happiness:hover {
  transform: scale(1.05);
}

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

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: width var(--transition-fast);
}

.nav-links a:hover {
  color: var(--primary);
}
.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}
.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 3px;
  transition: all var(--transition-fast);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 140px 24px 80px 24px;
  position: relative;
  z-index: 1;
}

.hero-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}

/* Avatar Box */
.hero-avatar-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-glow-ring {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  animation: morphShape 8s ease-in-out infinite alternate;
  filter: blur(10px);
  z-index: 0;
}

@keyframes morphShape {
  0% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; transform: rotate(0deg); }
  50% { border-radius: 65% 35% 38% 62% / 60% 30% 70% 40%; transform: rotate(180deg); }
  100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; transform: rotate(360deg); }
}

.avatar-card {
  position: relative;
  z-index: 1;
  width: 290px;
  height: 350px;
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--surface-solid);
  background-color: var(--surface-solid);
  transition: transform var(--transition-normal);
}

.avatar-card:hover {
  transform: translateY(-8px) rotate(1deg);
}

.hero-dog-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 4px);
  transition: transform var(--transition-smooth);
}

.avatar-badge {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: #52B788;
  border-radius: 50%;
  box-shadow: 0 0 8px #52B788;
  animation: blinkDot 1.8s infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Speech Bubble over Dog */
.speech-bubble {
  position: absolute;
  top: -65px;
  right: -40px;
  background: var(--surface-solid);
  padding: 12px 20px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--primary);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary-hover);
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.5) translateY(20px);
  transition: all var(--transition-normal);
  pointer-events: none;
  z-index: 10;
}

.speech-bubble.active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.bubble-arrow {
  position: absolute;
  bottom: -10px;
  left: 30px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--primary);
}

/* Hero Info Content */
.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--secondary-light);
  color: var(--secondary-hover);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 16px;
}

.highlight-text {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.highlight-text::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: rgba(224, 122, 95, 0.2);
  border-radius: 4px;
  z-index: -1;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 520px;
}

/* Happiness Card inside Hero */
.happiness-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.happiness-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 700;
}

.hap-label {
  font-size: 0.95rem;
  color: var(--text-dark);
}

.hap-percentage {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 800;
}

.progress-bar-bg {
  width: 100%;
  height: 14px;
  background-color: var(--bg-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hap-status-text {
  font-size: 0.88rem;
  color: var(--accent-sage);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   FEED SECTION
   ========================================================================== */
.feed-section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.feed-interactive-card {
  padding: 40px;
  text-align: center;
}

.treat-selector {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.treat-option {
  background: var(--surface-solid);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-normal);
  min-width: 100px;
}

.treat-option:hover {
  transform: translateY(-4px);
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

.treat-option.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
  transform: translateY(-6px) scale(1.05);
  box-shadow: var(--shadow-md);
}

.treat-emoji {
  font-size: 2.2rem;
  transition: transform var(--transition-normal);
}
.treat-option:hover .treat-emoji {
  transform: scale(1.2) rotate(10deg);
}

.treat-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
}

.feed-action-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.btn-feed {
  position: relative;
  padding: 20px 48px;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  box-shadow: 0 12px 30px rgba(224, 122, 95, 0.4);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.btn-feed:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 16px 35px rgba(224, 122, 95, 0.5);
}
.btn-feed:active {
  transform: scale(0.96);
}

.feed-icon-anim {
  font-size: 1.8rem;
  display: inline-block;
  transition: transform 0.3s ease;
}
.btn-feed:hover .feed-icon-anim {
  animation: shakeIcon 0.4s infinite alternate;
}

@keyframes shakeIcon {
  0% { transform: rotate(-15deg) scale(1.1); }
  100% { transform: rotate(15deg) scale(1.1); }
}

.feed-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--surface-solid);
  padding: 12px 28px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 30px;
  background-color: var(--border-light);
}

/* Flying Treat Animation element injected via JS */
.flying-treat-el {
  position: fixed;
  font-size: 2.8rem;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease;
}

/* Floating Hearts / Particle Burst */
.burst-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 1.5rem;
  animation: particleFade 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes particleFade {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(1.4) rotate(var(--rot));
  }
}

/* ==========================================================================
   DINO RUNNER GAME SECTION
   ========================================================================== */
.runner-section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.game-wrapper {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
}

.game-hud {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--bg-main);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
}

.hud-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
}

.hud-title {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hud-val {
  color: var(--primary);
  font-family: var(--font-heading);
}

.hud-box.highlight .hud-val {
  color: var(--secondary-hover);
}

.canvas-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 350px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #FAF5EF;
  border: 3px solid var(--primary-light);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

#dinoCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(43, 45, 66, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: opacity var(--transition-fast);
}

.game-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  background: var(--surface-solid);
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: popOverlay 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popOverlay {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.overlay-icon {
  font-size: 3.5rem;
  margin-bottom: 8px;
}

.overlay-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.overlay-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.4;
}

.btn-game-start {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
}

.game-controls {
  margin-top: 16px;
  text-align: center;
  display: none; /* Shows on mobile viewports */
}

.btn-jump-touch {
  width: 100%;
  padding: 18px;
  font-size: 1.2rem;
  background-color: var(--secondary);
  color: var(--text-light);
  border-radius: var(--radius-md);
}
.btn-jump-touch:active {
  background-color: var(--secondary-hover);
}

/* ==========================================================================
   PHOTO GALLERY SECTION
   ========================================================================== */
.gallery-section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.auto-gallery-hint {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 18px;
  background: var(--secondary-light);
  border: 1px dashed var(--secondary);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--text-dark);
}
.auto-gallery-hint code {
  background: var(--surface-solid);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  color: var(--primary);
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  background: var(--surface-solid);
  border: 1px solid var(--border-light);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background-color: var(--primary);
  color: var(--text-light);
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(224, 122, 95, 0.3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.gallery-card {
  background: var(--surface-solid);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), opacity 0.4s ease;
  cursor: pointer;
}

.gallery-card.hidden-card {
  display: none;
  opacity: 0;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background-color: var(--bg-alt);
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.gallery-card:hover .card-img-wrapper img {
  transform: scale(1.08);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(43, 45, 66, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.gallery-card:hover .card-overlay {
  opacity: 1;
}

.card-tag {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--primary-hover);
}

.card-zoom-icon {
  align-self: center;
  background: var(--surface-solid);
  color: var(--text-dark);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  transform: translateY(10px);
  transition: transform var(--transition-fast);
}

.gallery-card:hover .card-zoom-icon {
  transform: translateY(0);
}

.card-caption {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-caption h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-dark);
}

.btn-boop {
  background: var(--primary-light);
  border: none;
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.btn-boop:hover {
  background-color: var(--primary);
  color: var(--text-light);
  transform: scale(1.08);
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 31, 43, 0.85);
  backdrop-filter: blur(12px);
}

.lightbox-content {
  position: relative;
  z-index: 1001;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  background: var(--surface-solid);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: lightboxZoom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxZoom {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-light);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 1005;
  transition: background-color var(--transition-fast);
}
.lightbox-close:hover {
  background: var(--primary);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-dark);
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1005;
  box-shadow: var(--shadow-md);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.lightbox-nav:hover {
  background: var(--primary);
  color: var(--text-light);
  transform: translateY(-50%) scale(1.1);
}
.nav-prev { left: 16px; }
.nav-next { right: 16px; }

.lightbox-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  max-height: 80vh;
}

.lightbox-img-container {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-img-container img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-details {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lightbox-details h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.lightbox-details p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.footer {
  padding: 60px 24px;
  text-align: center;
  background: var(--bg-alt);
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-light);
}

.footer-paw {
  font-size: 2.5rem;
  margin-bottom: 12px;
  animation: floatPaw 3s ease-in-out infinite alternate;
}

@keyframes floatPaw {
  0% { transform: translateY(0) rotate(-5deg); }
  100% { transform: translateY(-8px) rotate(5deg); }
}

.footer-text {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.footer-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.snoot-boop-easteregg {
  background: var(--surface-solid);
  border: 2px dashed var(--primary);
  color: var(--primary);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.snoot-boop-easteregg:hover {
  background: var(--primary);
  color: var(--text-light);
  border-style: solid;
  transform: scale(1.1) rotate(-2deg);
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-avatar-wrapper {
    margin-bottom: 20px;
  }
  
  .speech-bubble {
    right: 0;
    top: -55px;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }

  .lightbox-body {
    grid-template-columns: 1fr;
  }
  
  .lightbox-details {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Add mobile drawer logic in JS if needed */
  }

  .section-title {
    font-size: 1.8rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .feed-interactive-card {
    padding: 24px 16px;
  }

  .game-hud {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  .game-controls {
    display: block;
  }

  .canvas-container {
    height: 280px;
  }
  
  .lightbox-nav {
    display: none;
  }
}
