/* =========================================================================
   PREMIUM DARK THEME - GEN Z DATING ANALYZER
   ========================================================================= */

:root {
  --bg-deep: #050507;
  --mesh-1: #5f10f0;
  --mesh-2: #e020a6;
  --mesh-3: #23086b;
  
  --surface-main: rgba(22, 22, 28, 0.55);
  --surface-hover: rgba(30, 30, 38, 0.7);
  --surface-glass-border: rgba(255, 255, 255, 0.08);
  --surface-glass-highlight: rgba(255, 255, 255, 0.15);
  --surface-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  --surface-shadow-inner: inset 0 1px 0 rgba(255,255,255,0.06);

  --text-primary: #ffffff;
  --text-muted: #9494a0;
  --text-active: #e2e2ec;

  --accent-pink: #f72585;
  --accent-purple: #7209b7;
  --accent-cyan: #4cc9f0;
  --error: #ff3366;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body.dark-fluid-theme {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Dynamic Mesh Background --- */
.mesh-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  background: var(--bg-deep);
}

.blob {
  position: absolute;
  filter: blur(120px);
  opacity: 0.6;
  border-radius: 50%;
  animation: float-blob 25s infinite alternate ease-in-out;
  will-change: transform;
}

.blob.color-1 {
  top: -10%; left: -10%; width: 50vw; height: 50vw;
  background: var(--mesh-1);
}

.blob.color-2 {
  bottom: -20%; right: -10%; width: 60vw; height: 60vw;
  background: var(--mesh-2);
  animation-delay: -5s;
  animation-duration: 30s;
}

.blob.color-3 {
  top: 40%; left: 40%; width: 40vw; height: 40vw;
  background: var(--mesh-3);
  opacity: 0.4;
  animation-delay: -10s;
}

.noise-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
}

@keyframes float-blob {
  0% { transform: scale(1) translate(0, 0); }
  33% { transform: scale(1.1) translate(8%, 5%); }
  66% { transform: scale(0.9) translate(-5%, 8%); }
  100% { transform: scale(1.2) translate(10%, -10%); }
}

/* --- Layout & Typography --- */
.app-wrapper {
  width: 100%;
  max-width: 740px;
  padding: 3rem 1.5rem 6rem;
  z-index: 1;
  position: relative;
}

.app-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #a8a8c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.8rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* --- Badges --- */
.privacy-badge {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-glass-border);
  padding: 1rem 1.5rem;
  border-radius: 100px;
  margin: 0 auto 2.5rem;
  width: max-content;
  max-width: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.badge-icon { font-size: 1.2rem; }
.badge-text { font-size: 0.9rem; color: var(--text-active); }
.badge-text strong { color: #fff; }

/* --- Forms & Inputs --- */
.glass-surface {
  background: var(--surface-main);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--surface-glass-border);
  border-top-color: var(--surface-glass-highlight);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--surface-shadow), var(--surface-shadow-inner);
}

.input-stack {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.8rem;
}

.input-stack label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: var(--text-active);
  letter-spacing: 0.5px;
}

.sleek-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem;
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.05rem;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.sleek-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 4px rgba(114, 9, 183, 0.2), inset 0 2px 4px rgba(0,0,0,0.5);
}

.sleek-input::placeholder { color: #666677; }

.textarea-tall {
  min-height: 140px;
  resize: vertical;
}

.file-drop-zone {
  position: relative;
  margin-bottom: 2rem;
}

.custom-file-input {
  width: 100%;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.custom-file-input:hover {
  border-color: var(--accent-pink);
  background: rgba(247, 37, 133, 0.05);
  color: #fff;
}

.custom-file-input::file-selector-button {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  margin-right: 1.2rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  transition: all 0.2s ease;
}

.custom-file-input::file-selector-button:hover {
  background: rgba(255,255,255,0.15);
}

.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
}

/* --- Premium Buttons --- */
.premium-button {
  position: relative;
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  border: none;
  border-radius: 14px;
  color: white;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(247, 37, 133, 0.4), inset 0 2px 0 rgba(255,255,255,0.3);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.premium-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(247, 37, 133, 0.5), inset 0 2px 0 rgba(255,255,255,0.4);
}

.premium-button:active {
  transform: translateY(1px);
}

.btn-shimmer {
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

button.loading {
  background: linear-gradient(135deg, var(--accent-purple), var(--error));
}

.btn-loader { display: none; }
button.loading .btn-text { display: none; }
button.loading .btn-loader { display: inline-block; font-weight: 900;}

@keyframes savageShake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-2px, 1px) rotate(-1deg); }
  50% { transform: translate(1px, -1px) rotate(1deg); }
  75% { transform: translate(2px, 2px) rotate(0); }
}

@keyframes popPulse {
  0% { opacity: 0.8; transform: scale(0.95); text-shadow: none; }
  100% { opacity: 1; transform: scale(1.05); text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
}

.loader-hidden { display: none !important; }

/* Errors */
.error-hidden { display: none !important; }

.error-alert {
  margin-top: 1.5rem;
  padding: 1.2rem;
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid rgba(255, 51, 102, 0.4);
  border-radius: 12px;
  color: #ffb3c6;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}
.error-alert::before {
  content: "⚠️";
  margin-right: 0.8rem;
  font-size: 1.2rem;
}

/* --- Dynamic Dashboard Layout --- */
.results-dashboard {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.results-dashboard.hidden { display: none; }

.verdict-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 2.5rem;
  background: linear-gradient(90deg, #fff, #b3b3c3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* CSS Grid Dashboard Layout */
.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.result-panel {
  background: rgba(15, 15, 20, 0.6);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.05);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.diagnosis-panel {
  grid-column: 1 / -1; /* Spans full width */
  text-align: center;
  background: linear-gradient(180deg, rgba(30, 20, 40, 0.8) 0%, rgba(15, 15, 20, 0.8) 100%);
  border-top-color: rgba(247, 37, 133, 0.3);
}

.full-width-panel {
  grid-column: 1 / -1; /* Spans full width */
}

/* Mobile Responsiveness for Grid */
@media (max-width: 600px) {
  .verdict-grid { grid-template-columns: 1fr; }
  .result-panel { padding: 1.5rem; }
  .app-wrapper { padding: 2rem 1rem 4rem; }
  .hero-title { font-size: 2.5rem; }
}

.panel-header {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.text-pink { color: var(--accent-pink); }
.text-purple { color: #b5179e; }
.text-cyan { color: var(--accent-cyan); }

.panel-content {
  font-size: 1.1rem;
  color: var(--text-active);
  line-height: 1.7;
}

.highlighted-text {
  font-size: 1.2rem;
  font-weight: 500;
}

/* 3D Glowing Pill for Diagnosis */
.diagnosis-badge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.diagnosis-badge-text {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.glowing-pill {
  background: linear-gradient(90deg, #ff007f, #7209b7);
  padding: 0.5rem 2.5rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.2rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 0 40px rgba(247, 37, 133, 0.6), inset 0 2px 4px rgba(255,255,255,0.4);
  animation: float-pill 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes float-pill {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); box-shadow: 0 8px 50px rgba(247, 37, 133, 0.8), inset 0 2px 4px rgba(255,255,255,0.5); }
}

.ick-meter-container {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  background: rgba(0, 0, 0, 0.4);
  display: inline-block;
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.ick-label {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ick-score {
  color: var(--error);
  font-weight: 900;
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

.ick-max {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

/* AGE VIOLATION styling */
.violation-panel {
  background: rgba(255, 0, 50, 0.05);
  border: 2px solid var(--error);
  text-align: center;
  padding: 4rem 2rem;
}

.violation-header {
  color: var(--error);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  animation: flashDanger 1.5s infinite alternate;
}

@keyframes flashDanger {
  to { text-shadow: 0 0 20px var(--error); opacity: 0.8; }
}

.violation-content { font-size: 1.4rem; color: #fff; }

/* Custom "hidden" class for standard DOM toggling */
#standardResults.hidden, #ageRoastResult.hidden { display: none; }

/* --- Smooth Entrance Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.fade-in.visible {
  animation: smoothReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-in {
  opacity: 0;
  transform: translateY(20px);
  animation: smoothReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.55s; }

@keyframes smoothReveal {
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.delay-5 { animation-delay: 0.7s; }
.delay-6 { animation-delay: 0.85s; }
.delay-7 { animation-delay: 1.0s; }
.delay-8 { animation-delay: 1.15s; }

/* --- Vibe Check --- */
.vibe-bars-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.vibe-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vibe-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-active);
}

.vibe-track {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
}

.vibe-fill {
  height: 100%;
  width: 0%; /* Intentionally 0 initially for animation */
  border-radius: 10px;
  transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.fill-pink { background: linear-gradient(90deg, #f72585, #b5179e); }
.fill-purple { background: linear-gradient(90deg, #7209b7, #3a0ca3); }
.fill-cyan { background: linear-gradient(90deg, #4cc9f0, #4361ee); }

/* --- Bullet Roasts --- */
.roast-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.roast-list li {
  position: relative;
  padding-left: 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-active);
}

.roast-list li::before {
  content: '🔥';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.2rem;
}

/* --- Future Prediction --- */
.prediction-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  color: #fff;
}

/* --- Action Bar --- */
.action-bar {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(22, 22, 28, 0.8);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.action-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.2);
}

.action-btn .icon {
  font-size: 1.2rem;
}
