@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;700;800&family=Poppins:wght@400;500;600&display=swap');

/* ── CSS Variables ───────────────────────────────────────────── */
:root {
  --banana-yellow:  #FFD700;
  --banana-deep:    #F5A800;
  --banana-orange:  #E8820C;
  --banana-green:   #4CAF50;
  --banana-brown:   #8B5E3C;
  --bg-dark:        #1a1200;
  --bg-card:        #211800;
  --text-main:      #FFF8DC;
  --text-muted:     #C8A96E;
  --glow:           rgba(255,215,0,0.35);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(ellipse at top, #2b1d00 0%, #0e0b00 70%);
  color: var(--text-main);
  min-height: 100vh;
  padding: 1.5rem 1rem 3rem;
  position: relative;
  overflow-x: hidden;
}

/* Subtle banana-skin texture dots */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,215,0,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  background: rgba(30, 20, 0, 0.75);
  border: 1px solid rgba(255,215,0,0.18);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 60px rgba(255,200,0,0.12), 0 8px 40px rgba(0,0,0,0.6);
}

/* ── Logo / Title ────────────────────────────────────────────── */
.site-title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, #FFE033 0%, #FFA500 40%, #FF6B00 80%, #FFE033 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(255,180,0,0.55));
  animation: titlePulse 3s ease-in-out infinite;
}
@keyframes titlePulse {
  0%,100% { filter: drop-shadow(0 0 14px rgba(255,180,0,0.45)); }
  50%      { filter: drop-shadow(0 0 28px rgba(255,200,0,0.80)); }
}

/* ── Header layout ───────────────────────────────────────────── */
header {
  text-align: center;
  margin-bottom: 2rem;
}

.header-media {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.2rem 0 0.8rem;
  flex-wrap: wrap;
}

.minion-gif {
  width: 120px;
  border-radius: 14px;
  animation: bounce 2.4s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(255,215,0,0.25);
  flex-shrink: 0;
}

.hero-banana-img {
  width: 180px;
  max-height: 160px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(255,165,0,0.35);
  border: 2px solid rgba(255,215,0,0.25);
  flex-shrink: 0;
}

@keyframes bounce {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}

.description {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ── Upload / Camera cards ───────────────────────────────────── */
.upload-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.upload-card, .camera-card {
  background: rgba(255,215,0,0.05);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 18px;
  padding: 1.8rem 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.upload-card:hover, .camera-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(255,180,0,0.2);
}

.upload-card h2, .camera-card h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem;
  color: var(--banana-yellow);
  margin-bottom: 1rem;
}

/* ── File drop zone ──────────────────────────────────────────── */
.file-input-wrapper {
  position: relative;
  margin-bottom: 1rem;
}
.file-input-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.file-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.8rem 1rem;
  border: 2px dashed rgba(255,215,0,0.4);
  border-radius: 12px;
  background: rgba(255,215,0,0.04);
  cursor: pointer;
  transition: all 0.3s ease;
}
.file-label:hover, .file-label.drag-over {
  border-color: var(--banana-yellow);
  background: rgba(255,215,0,0.10);
}
.file-label i { font-size: 2rem; color: var(--banana-yellow); }
.file-label span { font-size: 0.88rem; color: var(--text-muted); }

/* ── Confirmation toast ──────────────────────────────────────── */
#confirm-toast {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
  padding: 0.65rem 1rem;
  background: rgba(74,222,128,0.12);
  border: 1px solid #4ade80;
  border-radius: 10px;
  color: #4ade80;
  font-size: 0.88rem;
  animation: fadeIn 0.4s ease;
}
#confirm-toast.visible { display: flex; }

#selected-filename {
  font-weight: 600;
  color: #86efac;
  word-break: break-all;
}

@keyframes fadeIn {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.fun-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #FFD700 0%, #F5A800 60%, #E8820C 100%);
  border: none;
  padding: 0.7rem 1.6rem;
  color: #1a0e00;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 50px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(255,165,0,0.35);
}
.fun-button:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,165,0,0.5);
}
.fun-button:active { transform: scale(0.98); }

/* ── Camera ──────────────────────────────────────────────────── */
.camera-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
#video {
  border-radius: 10px;
  border: 2px solid rgba(255,215,0,0.2);
  background: #111;
  width: 100%;
  max-width: 280px;
}

/* ── Result page ─────────────────────────────────────────────── */
.result-card {
  background: rgba(255,215,0,0.03);
  border: 1px solid rgba(255,215,0,0.14);
  border-radius: 20px;
  overflow: hidden;
  margin: 1.5rem 0;
  padding: 1.8rem;
}

/* ── Stat cards (seed count etc.) ────────────────────────────── */
.stat-card {
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.14);
  border-radius: 14px;
  padding: 1.2rem 1rem;
  text-align: center;
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card .icon { font-size: 1.6rem; margin-bottom: 0.35rem; }
.stat-card .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.stat-card .value {
  font-family: 'Baloo 2', cursive;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--banana-yellow);
  margin-top: 0.2rem;
}

/* ── Back button ─────────────────────────────────────────────── */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-top: 0.5rem;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 680px) {
  .upload-section { grid-template-columns: 1fr; }
  .container { padding: 1.4rem 1rem; }
  .hero-banana-img { width: 140px; }
  .minion-gif { width: 90px; }
}
