@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

:root {
  --bg-dark: #0a0d14;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-light: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --simpson-yellow: #FED41D;
  --simpson-blue: #3E8EDE;
  --donut-pink: #FF69B4;
  --donut-brown: #C68E5A;
  --accent-glow: rgba(254, 212, 29, 0.15);
  --font-display: 'Fredoka', sans-serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Background floating donuts */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-donut {
  position: absolute;
  opacity: 0.15;
  animation: float 25s infinite linear;
}

.donut-1 {
  top: 15%;
  left: 10%;
  width: 80px;
  animation-duration: 20s;
}

.donut-2 {
  top: 60%;
  right: 8%;
  width: 120px;
  animation-duration: 28s;
  animation-delay: -5s;
}

.donut-3 {
  bottom: 10%;
  left: 25%;
  width: 60px;
  animation-duration: 18s;
  animation-delay: -10s;
}

.donut-4 {
  top: 30%;
  right: 30%;
  width: 70px;
  animation-duration: 22s;
  animation-delay: -15s;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg) scale(0.8);
  }
  100% {
    transform: translateY(-120px) rotate(360deg) scale(1.1);
  }
}

/* Grid & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Navigation Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 3rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--simpson-yellow), var(--donut-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-donut {
  animation: rotateDonut 10s infinite linear;
}

@keyframes rotateDonut {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dedication-badge {
  background: rgba(254, 212, 29, 0.1);
  border: 1px solid rgba(254, 212, 29, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--simpson-yellow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 0 15px rgba(254, 212, 29, 0.05);
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .hero-visual {
    order: -1;
  }
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-content h1 span.yellow {
  color: var(--simpson-yellow);
  text-shadow: 0 0 30px rgba(254, 212, 29, 0.2);
}

.hero-content h1 span.pink {
  color: var(--donut-pink);
  text-shadow: 0 0 30px rgba(255, 105, 180, 0.2);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.cta-group {
  display: flex;
  gap: 1rem;
}

@media (max-width: 900px) {
  .cta-group {
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--simpson-yellow);
  color: #000;
  border: none;
  box-shadow: 0 4px 20px rgba(254, 212, 29, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(254, 212, 29, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

/* Glass Card Component */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

/* Hero Homer SVG Illustration */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.homer-frame {
  width: 320px;
  height: 320px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.homer-glow {
  position: absolute;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: 0;
  animation: pulseGlow 4s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

.interactive-donut-svg {
  width: 100%;
  height: 100%;
  z-index: 1;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.5));
  cursor: pointer;
  transition: var(--transition-smooth);
}

.interactive-donut-svg:hover {
  transform: scale(1.08) rotate(15deg);
}

.interactive-donut-svg:active {
  transform: scale(0.95) rotate(-5deg);
}

/* Section: Interactive Quote Generator */
.quote-section {
  margin-bottom: 5rem;
}

.quote-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  color: var(--simpson-yellow);
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
}

.quote-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 250px;
  justify-content: center;
}

.quote-bubble {
  position: relative;
  font-size: 1.5rem;
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 2rem;
  color: var(--text-primary);
  max-width: 800px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.quote-bubble.fade-out {
  opacity: 0;
}

.quote-bubble::before {
  content: "“";
  font-size: 4rem;
  position: absolute;
  left: -2.5rem;
  top: -2rem;
  color: var(--simpson-yellow);
  opacity: 0.3;
  font-family: serif;
}

.quote-bubble::after {
  content: "”";
  font-size: 4rem;
  position: absolute;
  right: -2.5rem;
  bottom: -3.5rem;
  color: var(--simpson-yellow);
  opacity: 0.3;
  font-family: serif;
}

.quote-author {
  font-family: var(--font-display);
  color: var(--simpson-yellow);
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.donut-refresh-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  transition: var(--transition-smooth);
}

.donut-refresh-btn:hover {
  transform: scale(1.1);
}

.donut-refresh-btn:hover .donut-btn-svg {
  animation: rotateDonut 1.5s infinite linear;
}

.donut-refresh-btn span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 1px;
}

/* Feature Cards Grid (Homer Facets) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.feature-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--simpson-yellow);
  margin-bottom: 0.5rem;
}

.feature-card.yellow-hover:hover {
  border-color: rgba(254, 212, 29, 0.3);
  box-shadow: 0 10px 30px rgba(254, 212, 29, 0.1);
}

.feature-card.pink-hover:hover {
  border-color: rgba(255, 105, 180, 0.3);
  box-shadow: 0 10px 30px rgba(255, 105, 180, 0.1);
}

.feature-card.blue-hover:hover {
  border-color: rgba(62, 142, 222, 0.3);
  box-shadow: 0 10px 30px rgba(62, 142, 222, 0.1);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Interactive Donut Feeding Section */
.game-section {
  margin-bottom: 5rem;
}

.game-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .game-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.game-info h2 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

.game-instructions {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.stats-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  padding: 1.25rem;
  border-radius: 16px;
  text-align: center;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--donut-pink);
  margin-bottom: 0.25rem;
  transition: scale 0.1s ease;
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--simpson-yellow), var(--donut-pink));
  border-radius: 6px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
}

.homer-status-msg {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--simpson-yellow);
  min-height: 24px;
}

.game-arena {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 350px;
}

.giant-donut-container {
  width: 250px;
  height: 250px;
  position: relative;
  cursor: pointer;
  z-index: 10;
}

.giant-donut-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.4));
  transition: transform 0.1s ease;
}

.giant-donut-container:hover .giant-donut-svg {
  transform: scale(1.05);
}

.giant-donut-container.wiggle .giant-donut-svg {
  animation: donutWiggle 0.4s ease-in-out;
}

@keyframes donutWiggle {
  0% { transform: scale(1.05) rotate(0deg); }
  20% { transform: scale(1.1) rotate(-8deg); }
  40% { transform: scale(1.1) rotate(6deg); }
  60% { transform: scale(1.1) rotate(-4deg); }
  80% { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1.05) rotate(0deg); }
}

/* Sprinkles explosion particles */
.sprinkle-particle {
  position: absolute;
  width: 12px;
  height: 6px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 100;
  animation: explode 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes explode {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--tr)) scale(0);
    opacity: 0;
  }
}

/* Donut Counter pop effect */
.counter-pop {
  animation: counterPop 0.3s ease-out;
}

@keyframes counterPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); color: var(--simpson-yellow); }
  100% { transform: scale(1); }
}

/* Footer */
footer {
  border-top: 1px solid var(--border-light);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 5rem;
}

.footer-credit span {
  color: var(--simpson-yellow);
  font-weight: 600;
}

.footer-tagline {
  font-style: italic;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* CSS Sprinkles Background Details */
.sprinkles-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
