/* ==========================================================================
   LA MÁQUINA DE FEMFUTURO - MANUAL DE IDENTIDAD VISUAL 2026 & FINE-TUNING
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&family=Poppins:wght@400;600;700&display=swap');

/* MODO OSCURO (Default) */
:root {
  --bg-dark: #03151D;
  --bg-surface: rgba(9, 36, 48, 0.90);
  --bg-card: rgba(16, 54, 70, 0.8);
  --primary-blue: #0072CE;
  --primary-teal: #00B074;
  --primary-glow: rgba(0, 114, 206, 0.4);
  --accent-gold: #FFC72C;
  --accent-gold-glow: rgba(255, 199, 44, 0.5);
  --gold-gradient: linear-gradient(135deg, #FFE066 0%, #F5B000 50%, #B87C00 100%);
  --blue-gradient: linear-gradient(135deg, #0088EC 0%, #0059A3 100%);
  --teal-gradient: linear-gradient(135deg, #00E699 0%, #009966 100%);
  --danger-red: #FF4757;
  --danger-gradient: linear-gradient(135deg, #FF6B81 0%, #D63031 100%);
  --text-main: #FFFFFF;
  --text-muted: #A0C2CE;
  --border-glass: rgba(255, 255, 255, 0.14);
  --border-gold: rgba(255, 199, 44, 0.4);
  --input-bg: rgba(0, 0, 0, 0.35);
  --input-border: rgba(255, 255, 255, 0.2);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-main: 0 12px 36px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(0, 114, 206, 0.35);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* MODO CLARO */
:root[data-theme="light"] {
  --bg-dark: #F2F7FA;
  --bg-surface: #FFFFFF;
  --bg-card: #F8FAFC;
  --primary-blue: #0072CE;
  --primary-teal: #008855;
  --primary-glow: rgba(0, 114, 206, 0.2);
  --accent-gold: #D99B00;
  --accent-gold-glow: rgba(217, 155, 0, 0.3);
  --gold-gradient: linear-gradient(135deg, #FFC72C 0%, #E69900 100%);
  --blue-gradient: linear-gradient(135deg, #0072CE 0%, #004D8C 100%);
  --teal-gradient: linear-gradient(135deg, #00B074 0%, #007A52 100%);
  --danger-red: #D63031;
  --text-main: #0F172A;
  --text-muted: #475569;
  --border-glass: rgba(15, 23, 42, 0.12);
  --border-gold: rgba(217, 155, 0, 0.4);
  --input-bg: #FFFFFF;
  --input-border: #CBD5E1;
  --shadow-main: 0 10px 30px rgba(0, 114, 206, 0.08);
  --shadow-glow: 0 4px 20px rgba(0, 114, 206, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 114, 206, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 85% 90%, rgba(255, 199, 44, 0.10) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.theme-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-glass);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: var(--shadow-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
}

.app-container {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  position: relative;
}

.header-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-main);
}

.header-bar.visible {
  display: flex;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-header {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.user-status-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}

.points-pill {
  background: rgba(255, 199, 44, 0.15);
  border: 1px solid var(--border-gold);
  border-radius: 30px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-gold);
  font-weight: 800;
  font-size: 0.95rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.view-screen {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: fadeIn 0.4s ease-out forwards;
}

.view-screen.active {
  display: flex;
}

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

.login-hero-banner {
  background: linear-gradient(180deg, #0072CE 0%, #0059A3 100%);
  border-radius: 24px 24px 0 0;
  padding: 32px 20px 24px 20px;
  text-align: center;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.login-hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  pointer-events: none;
}

.anniversary-title-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 2px;
}

.anniversary-big-number {
  font-size: 4rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -2px;
  margin-bottom: 4px;
}

.anniversary-subtitle-copy {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dots-indicator {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}
.dot.active { background: #00E699; }
.dot.gold { background: #FFC72C; }

.welcome-card-redesigned {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  box-shadow: var(--shadow-main);
  overflow: hidden;
  margin: auto 0;
}

.login-content-body {
  padding: 28px 24px;
}

.brand-main-logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 16px;
}

.welcome-title-bold {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.welcome-desc-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 24px;
}

.input-label-styled {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 16px;
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input-styled {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.form-input-styled:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 15px var(--primary-glow);
}

.input-helper-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 20px;
}

.btn-submit-blue {
  width: 100%;
  padding: 16px;
  background: var(--blue-gradient);
  border: none;
  border-radius: 30px;
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit-blue:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.disclaimer-notice-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 18px;
  line-height: 1.35;
}

/* TRIVIA REDISEÑADA */
.trivia-container { display: flex; flex-direction: column; gap: 16px; }

.trivia-header-card {
  background: var(--bg-surface);
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-main);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trivia-header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-tag {
  background: rgba(0, 114, 206, 0.15);
  border: 1px solid rgba(0, 114, 206, 0.3);
  color: var(--primary-blue);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
}

.trivia-explanatory-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
  font-weight: 500;
  margin-top: 2px;
  border-top: 1px dashed var(--border-glass);
  padding-top: 8px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--blue-gradient);
  width: 0%;
  transition: width 0.4s ease;
}

.question-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-main);
}

.question-text {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 20px;
  color: var(--text-main);
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  background: var(--input-bg);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--primary-blue);
}

.option-btn.selected {
  background: rgba(0, 114, 206, 0.2);
  border-color: var(--primary-blue);
}

.option-btn.correct-feedback {
  background: rgba(0, 176, 116, 0.2) !important;
  border-color: var(--primary-teal) !important;
  color: var(--primary-teal) !important;
}

.option-btn.correct-feedback .option-letter {
  background: var(--primary-teal) !important;
  color: #FFF !important;
}

.option-btn.wrong-feedback {
  background: rgba(255, 71, 87, 0.2) !important;
  border-color: var(--danger-red) !important;
  color: var(--danger-red) !important;
}

.option-btn.wrong-feedback .option-letter {
  background: var(--danger-red) !important;
  color: #FFF !important;
}

.option-letter {
  background: rgba(0, 0, 0, 0.15);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.explanation-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  animation: fadeIn 0.3s ease-out forwards;
}

.explanation-box.correct {
  background: rgba(0, 176, 116, 0.12);
  border-color: var(--primary-teal);
}

.explanation-box.incorrect {
  background: rgba(255, 71, 87, 0.12);
  border-color: var(--danger-red);
}

.explanation-header {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.explanation-header.correct { color: var(--primary-teal); }
.explanation-header.incorrect { color: var(--danger-red); }

.explanation-body-text {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.4;
}

/* BANNER INFORMATIVO DE LA MÁQUINA TRAGAMONEDAS */
.slot-machine-wrapper {
  background: var(--bg-surface);
  border: 2px solid var(--border-gold);
  border-radius: 24px;
  padding: 20px 16px;
  box-shadow: var(--shadow-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.slot-info-banner {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.slot-info-header {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 4px;
}

.slot-info-body {
  font-size: 0.83rem;
  color: var(--text-main);
  line-height: 1.4;
}

.slot-scoring-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.scoring-pill {
  background: var(--input-bg);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  font-size: 0.74rem;
}

.scoring-pill span { color: var(--text-muted); font-weight: 600; }
.scoring-pill strong { color: var(--text-main); font-size: 0.88rem; margin-top: 2px; }

.scoring-pill.jackpot { border-color: #FFC72C; background: rgba(255, 199, 44, 0.12); }
.scoring-pill.jackpot strong { color: #FFC72C; }
.scoring-pill.trio { border-color: var(--primary-blue); background: rgba(0, 114, 206, 0.12); }
.scoring-pill.trio strong { color: var(--primary-blue); }

.spins-counter-badge {
  background: var(--gold-gradient);
  color: #111;
  font-weight: 900;
  font-size: 1rem;
  padding: 6px 18px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.slot-machine-frame {
  width: 100%;
  max-width: 440px;
  background: #020D12;
  border: 4px solid #FFC72C;
  border-radius: 18px;
  padding: 10px;
  position: relative;
  overflow: hidden;
}

.center-row-highlight {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 110px;
  transform: translateY(-50%);
  border-top: 3px solid #FFC72C;
  border-bottom: 3px solid #FFC72C;
  background: rgba(255, 199, 44, 0.12);
  pointer-events: none;
  z-index: 10;
}

.reels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.reel-column {
  background: rgba(12, 42, 54, 0.9);
  border-radius: 12px;
  height: 330px;
  overflow: hidden;
  position: relative;
}

.reel-strip {
  display: flex;
  flex-direction: column;
}

.slot-item {
  height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.item-aniversario-special {
  background: rgba(255, 199, 44, 0.15) !important;
  border-left: 2px solid #FFC72C;
  border-right: 2px solid #FFC72C;
}

.slot-item-icon-img {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.slot-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(255, 199, 44, 0.5));
}

.special-name {
  font-weight: 900 !important;
  color: #FFC72C !important;
  font-size: 0.82rem !important;
  line-height: 1.15;
}

.slot-item-icon {
  font-size: 2.1rem;
  line-height: 1;
  margin-bottom: 2px;
}

.slot-item-family {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 2px;
}

.slot-item-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: #FFF;
  line-height: 1.15;
  max-width: 120px;
  white-space: normal;
  text-align: center;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-spin-lever {
  width: 100%;
  max-width: 320px;
  padding: 18px;
  background: var(--gold-gradient);
  border: none;
  border-radius: 40px;
  color: #111;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 199, 44, 0.4);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-transform: uppercase;
}

.btn-spin-lever:hover {
  transform: scale(1.03);
}

/* Modales */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(8px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.win-modal-card { background: var(--bg-surface); border: 2px solid var(--accent-gold); border-radius: 24px; padding: 30px 24px; width: 100%; max-width: 440px; text-align: center; box-shadow: var(--shadow-main); }
.win-badge-icon { font-size: 4rem; margin-bottom: 10px; }
.win-points-tag { font-size: 2.8rem; font-weight: 900; color: var(--accent-gold); margin: 10px 0; }

.history-card { background: var(--bg-surface); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border-glass); }
.history-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.9rem; }
.history-table th { text-align: left; padding: 10px; color: var(--text-muted); border-bottom: 1px solid var(--border-glass); }
.history-table td { padding: 12px 10px; border-bottom: 1px solid var(--border-glass); }

.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--bg-surface); border: 1px solid var(--primary-blue); color: var(--text-main); padding: 12px 20px; border-radius: 30px; font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-main); }
