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

:root {
  --gold: #D4AF37;
  --gold-light: #F0D060;
  --gold-dim: #8B7320;
  --amber: #FF8C00;
  --deep-bg: #050510;
  --card-bg: rgba(10, 8, 30, 0.92);
  --card-border: rgba(212, 175, 55, 0.3);
  --text-primary: #F0E8D0;
  --text-secondary: #A89060;
  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Crimson Pro', serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--deep-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== STARFIELD ===== */
.starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.star {
  position: absolute; border-radius: 50%; background: white;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes twinkle {
  0%, 100% { opacity: var(--min-op, 0.2); transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}
.nebula-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(80,20,160,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 80% 70%, rgba(20,60,160,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 50% 50%, rgba(160,80,20,0.08) 0%, transparent 70%);
}

/* ===== HEADER ===== */
.site-header {
  position: relative; z-index: 10;
  text-align: center; padding: 3rem 1rem 2rem;
  border-bottom: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(5,5,20,0.95) 0%, transparent 100%);
}
.header-ornament {
  display: flex; align-items: center; gap: 1rem;
  justify-content: center; margin: 0.5rem 0;
}
.ornament-line {
  flex: 1; max-width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.ornament-symbol {
  font-family: var(--font-heading);
  color: var(--gold-dim); font-size: 0.85rem; letter-spacing: 0.3em;
}
.cricket-icon {
  font-size: 3.5rem; margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.6));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.site-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, var(--amber) 70%, var(--gold-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: 0.05em; margin-bottom: 0.4rem;
  filter: drop-shadow(0 0 30px rgba(212,175,55,0.4));
}
.site-subtitle {
  font-family: var(--font-body); font-style: italic;
  color: var(--text-secondary); font-size: 1.05rem; letter-spacing: 0.05em;
}

/* ===== MAIN ===== */
.main-content {
  position: relative; z-index: 5;
  max-width: 720px; margin: 0 auto;
  padding: 2.5rem 1.2rem 4rem;
}

/* ===== FORM CARD ===== */
.form-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 2.5rem 2rem;
  box-shadow: 0 0 60px rgba(212,175,55,0.08), 0 0 120px rgba(80,20,160,0.12),
    inset 0 1px 0 rgba(212,175,55,0.15);
  backdrop-filter: blur(20px);
}
.form-card-header { text-align: center; margin-bottom: 2rem; }
.card-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 15px rgba(212,175,55,0.5)); }
.form-card-header h2 {
  font-family: var(--font-heading); font-size: 1.6rem; color: var(--gold);
  letter-spacing: 0.1em; margin-bottom: 0.3rem;
}
.form-card-header p { color: var(--text-secondary); font-style: italic; font-size: 0.95rem; }

/* ===== FORM GROUPS ===== */
.form-group { margin-bottom: 1.6rem; }
.form-group label {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-heading); font-size: 0.85rem; letter-spacing: 0.12em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 0.5rem;
}
.label-icon { font-size: 1rem; }
.input-wrapper { position: relative; }
.input-wrapper input, .input-wrapper select {
  width: 100%; background: rgba(5,5,20,0.8);
  border: 1px solid rgba(212,175,55,0.25); border-radius: 8px;
  color: var(--text-primary); font-family: var(--font-body); font-size: 1rem;
  padding: 0.75rem 1rem; outline: none;
  transition: border-color 0.3s, box-shadow 0.3s; appearance: none;
}
.input-wrapper input::placeholder { color: rgba(168,144,96,0.5); }
.input-wrapper input:focus, .input-wrapper select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12), 0 0 20px rgba(212,175,55,0.1);
}
.input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7) sepia(1) saturate(2) hue-rotate(5deg); cursor: pointer;
}
.select-wrapper::after {
  content: '▾'; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--gold); pointer-events: none; font-size: 1rem;
}
.field-hint { display: block; margin-top: 0.3rem; font-size: 0.8rem; color: rgba(168,144,96,0.6); font-style: italic; }

/* ===== PREDICT BUTTON ===== */
.predict-btn {
  width: 100%; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1a1000 0%, #2d1f00 50%, #1a1000 100%);
  border: 1px solid var(--gold); border-radius: 10px;
  cursor: pointer; padding: 1rem; margin-top: 0.5rem;
  transition: transform 0.2s, box-shadow 0.3s;
}
.predict-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(212,175,55,0.3), 0 0 60px rgba(212,175,55,0.15);
}
.predict-btn:active { transform: translateY(0); }
.btn-inner { display: flex; align-items: center; justify-content: center; gap: 0.8rem; position: relative; z-index: 2; }
.btn-text { font-family: var(--font-heading); font-size: 1rem; letter-spacing: 0.15em; color: var(--gold-light); text-transform: uppercase; }
.btn-icon { font-size: 1.1rem; }
.btn-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(212,175,55,0.15) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform 0.6s;
}
.predict-btn:hover .btn-shimmer { transform: translateX(100%); }

/* ===== LOADING ===== */
.loading-section { text-align: center; padding: 4rem 1rem; }
.loading-card { display: inline-flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.crystal-ball { position: relative; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; }
.crystal-inner {
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(180,140,255,0.4), rgba(40,20,80,0.9));
  border: 2px solid rgba(212,175,55,0.4);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
  box-shadow: 0 0 30px rgba(120,60,200,0.5), inset 0 0 20px rgba(212,175,55,0.1);
  animation: pulse-ball 2s ease-in-out infinite;
}
@keyframes pulse-ball {
  0%,100% { box-shadow: 0 0 30px rgba(120,60,200,0.5), inset 0 0 20px rgba(212,175,55,0.1); }
  50% { box-shadow: 0 0 60px rgba(120,60,200,0.8), inset 0 0 30px rgba(212,175,55,0.2); }
}
.crystal-symbol { font-size: 2rem; }
.crystal-glow {
  position: absolute; inset: -5px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.2), transparent 70%);
  animation: glow-pulse 2s ease-in-out infinite;
}
@keyframes glow-pulse { 0%,100%{opacity:0.5;} 50%{opacity:1;} }
.crystal-ring {
  position: absolute; border-radius: 50%; border: 1px solid rgba(212,175,55,0.2);
  animation: ring-spin linear infinite;
}
.ring-1 { width: 90px; height: 90px; animation-duration: 4s; }
.ring-2 { width: 100px; height: 100px; animation-duration: 6s; animation-direction: reverse; border-color: rgba(120,60,200,0.2); }
.ring-3 { width: 110px; height: 110px; animation-duration: 8s; border-color: rgba(40,80,200,0.15); }
@keyframes ring-spin { from{transform:rotate(0deg);} to{transform:rotate(360deg);} }
.loading-text { font-family: var(--font-heading); color: var(--gold); font-size: 1rem; letter-spacing: 0.1em; }
.loading-dots { display: flex; gap: 0.4rem; }
.loading-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  animation: dot-bounce 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce { 0%,80%,100%{transform:scale(0.6);opacity:0.4;} 40%{transform:scale(1);opacity:1;} }

/* ===== TAROT CARD ===== */
.tarot-reveal { display: flex; justify-content: center; margin-bottom: 2rem; perspective: 1000px; }
.tarot-card {
  width: 160px; height: 260px; cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.tarot-card.flipped { transform: rotateY(180deg); }
.tarot-card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.tarot-card-back, .tarot-card-front {
  position: absolute; inset: 0; border-radius: 12px;
  backface-visibility: hidden; border: 2px solid var(--gold-dim); overflow: hidden;
}
.tarot-card-back {
  background: linear-gradient(135deg, #0a0520 0%, #1a0a40 50%, #0a0520 100%);
  display: flex; align-items: center; justify-content: center;
}
.card-back-pattern { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; padding: 1rem; text-align: center; }
.card-back-pattern span { font-size: 1.2rem; color: var(--gold-dim); opacity: 0.7; }
.tarot-card-front {
  background: linear-gradient(160deg, #0d0820 0%, #1a1040 100%);
  transform: rotateY(180deg);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 1rem; text-align: center;
}
.tarot-card-front .card-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.tarot-card-front .card-title { font-family: var(--font-heading); color: var(--gold); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.3rem; }
.tarot-card-front .card-number { font-family: var(--font-display); color: var(--gold-dim); font-size: 1.2rem; }
.tarot-card-front .card-meaning { font-size: 0.7rem; color: var(--text-secondary); font-style: italic; margin-top: 0.5rem; line-height: 1.4; }

/* ===== RESULT CARD ===== */
.result-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 2rem 1.8rem;
  box-shadow: 0 0 80px rgba(212,175,55,0.08), 0 0 160px rgba(80,20,160,0.1);
  backdrop-filter: blur(20px);
  animation: card-appear 0.6s ease-out;
}
@keyframes card-appear { from{opacity:0;transform:translateY(20px);} to{opacity:1;transform:translateY(0);} }
.result-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--card-border); flex-wrap: wrap; gap: 1rem;
}
.result-player-info { display: flex; align-items: center; gap: 1rem; }
.player-avatar {
  font-size: 2.5rem; width: 60px; height: 60px;
  background: rgba(212,175,55,0.1); border: 1px solid var(--card-border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.player-details h2 { font-family: var(--font-heading); color: var(--gold-light); font-size: 1.3rem; letter-spacing: 0.05em; }
.player-details p { color: var(--text-secondary); font-size: 0.9rem; font-style: italic; }
.cosmic-badge {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(212,175,55,0.08); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 0.6rem 1rem; min-width: 70px;
}
.cosmic-badge span { font-size: 1.8rem; line-height: 1; }
.cosmic-badge small { font-family: var(--font-heading); color: var(--gold-dim); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.2rem; }

/* ===== NAKSHATRA ===== */
.nakshatra-section { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.8rem; margin-bottom: 1.8rem; }
.nakshatra-card {
  background: rgba(212,175,55,0.05); border: 1px solid rgba(212,175,55,0.15);
  border-radius: 10px; padding: 0.8rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
}
.nakshatra-icon { font-size: 1.4rem; }
.nakshatra-card small { display: block; font-size: 0.7rem; color: var(--text-secondary); font-family: var(--font-heading); letter-spacing: 0.08em; text-transform: uppercase; }
.nakshatra-card strong { display: block; font-family: var(--font-heading); color: var(--gold); font-size: 0.85rem; letter-spacing: 0.05em; }

/* ===== PREDICTION NUMBERS ===== */
.prediction-numbers { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 1rem; margin-bottom: 1.8rem; }
.pred-box {
  background: linear-gradient(135deg, rgba(212,175,55,0.08) 0%, rgba(80,20,160,0.1) 100%);
  border: 1px solid rgba(212,175,55,0.2); border-radius: 12px; padding: 1.2rem 1rem; text-align: center;
  position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
}
.pred-box:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(212,175,55,0.15); }
.pred-box::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:linear-gradient(90deg,transparent,var(--gold),transparent); }
.pred-box-icon { font-size: 1.8rem; margin-bottom: 0.4rem; display: block; }
.pred-box-label { font-family: var(--font-heading); font-size: 0.7rem; color: var(--text-secondary); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.3rem; }
.pred-box-value { font-family: var(--font-display); font-size: 2rem; color: var(--gold-light); line-height: 1; text-shadow: 0 0 20px rgba(212,175,55,0.4); }
.pred-box-range { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.3rem; font-style: italic; }

/* ===== ENERGY BAR ===== */
.energy-section { margin-bottom: 1.8rem; }
.section-title { font-family: var(--font-heading); color: var(--gold); font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem; }
.energy-bar { height: 24px; background: rgba(5,5,20,0.8); border: 1px solid rgba(212,175,55,0.2); border-radius: 12px; overflow: hidden; position: relative; margin-bottom: 0.8rem; }
.energy-fill {
  height: 100%; border-radius: 12px;
  background: linear-gradient(90deg, #8B4513, #D4AF37, #FFD700);
  transition: width 1.5s cubic-bezier(0.4,0,0.2,1); position: relative;
}
.energy-fill::after {
  content:''; position:absolute; inset:0;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.2),transparent);
  animation: shimmer-bar 2s linear infinite;
}
@keyframes shimmer-bar { from{transform:translateX(-100%);} to{transform:translateX(100%);} }
.energy-label { position:absolute; right:8px; top:50%; transform:translateY(-50%); font-family:var(--font-heading); font-size:0.75rem; color:var(--deep-bg); font-weight:700; z-index:2; }
.energy-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.energy-tag { background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.2); border-radius: 20px; padding: 0.2rem 0.7rem; font-size: 0.75rem; color: var(--text-secondary); font-family: var(--font-heading); letter-spacing: 0.05em; }

/* ===== COSMIC MESSAGE ===== */
.cosmic-message-section {
  text-align: center; padding: 1.5rem;
  background: rgba(212,175,55,0.04); border: 1px solid rgba(212,175,55,0.12);
  border-radius: 12px; margin-bottom: 1.8rem;
}
.message-ornament { color: var(--gold-dim); font-size: 0.85rem; letter-spacing: 0.3em; margin: 0.5rem 0; }
.cosmic-message-section h3 { font-family: var(--font-heading); color: var(--gold); font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.8rem; }
.cosmic-message { font-style: italic; color: var(--text-primary); font-size: 1.05rem; line-height: 1.8; }

/* ===== PLANETS ===== */
.planets-section { margin-bottom: 1.8rem; }
.planets-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: 0.8rem; }
.planet-item { background: rgba(5,5,20,0.6); border: 1px solid rgba(212,175,55,0.12); border-radius: 10px; padding: 0.8rem; text-align: center; }
.planet-symbol { font-size: 1.5rem; display: block; margin-bottom: 0.3rem; }
.planet-name { font-family: var(--font-heading); color: var(--gold); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 0.2rem; }
.planet-effect { font-size: 0.75rem; color: var(--text-secondary); font-style: italic; }
.planet-strength { display: flex; gap: 2px; justify-content: center; margin-top: 0.4rem; }
.strength-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(212,175,55,0.2); }
.strength-dot.active { background: var(--gold); }

/* ===== LUCKY ===== */
.lucky-section { margin-bottom: 1.8rem; }
.lucky-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.8rem; }
.lucky-item { display: flex; align-items: center; gap: 0.7rem; background: rgba(212,175,55,0.05); border: 1px solid rgba(212,175,55,0.12); border-radius: 10px; padding: 0.7rem 1rem; }
.lucky-icon { font-size: 1.3rem; flex-shrink: 0; }
.lucky-label { font-family: var(--font-heading); color: var(--text-secondary); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; display: block; }
.lucky-value { font-family: var(--font-heading); color: var(--gold-light); font-size: 0.9rem; }

/* ===== DISCLAIMER ===== */
.disclaimer { display: flex; gap: 0.8rem; align-items: flex-start; background: rgba(255,100,0,0.06); border: 1px solid rgba(255,100,0,0.2); border-radius: 10px; padding: 1rem; margin-bottom: 1.5rem; }
.disclaimer span { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.disclaimer p { font-size: 0.82rem; color: rgba(255,180,100,0.8); line-height: 1.5; }

/* ===== NEW PREDICTION BTN ===== */
.new-prediction-btn {
  width: 100%; background: transparent; border: 1px solid var(--card-border); border-radius: 10px;
  color: var(--text-secondary); font-family: var(--font-heading); font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 0.8rem; cursor: pointer; transition: all 0.3s;
}
.new-prediction-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,0.05); }

/* ===== FOOTER ===== */
.site-footer { position: relative; z-index: 5; text-align: center; padding: 2rem 1rem; border-top: 1px solid var(--card-border); color: var(--text-secondary); font-size: 0.85rem; }
.footer-ornament { color: var(--gold-dim); letter-spacing: 0.3em; margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-note { font-size: 0.75rem; opacity: 0.6; margin-top: 0.3rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .form-card { padding: 1.5rem 1rem; }
  .result-card { padding: 1.5rem 1rem; }
  .nakshatra-section { grid-template-columns: repeat(3,1fr); gap: 0.5rem; }
  .lucky-grid { grid-template-columns: 1fr; }
  .planets-grid { grid-template-columns: repeat(2,1fr); }
  .site-title { font-size: 1.6rem; }
  .prediction-numbers { grid-template-columns: repeat(2,1fr); }
}