/* ==========================================================================
   0. ANTI MODO OSCURO (Compatibilidad total Samsung Internet / Android)
   ========================================================================== */
:root {
  color-scheme: light !important;
  supported-color-schemes: light !important;
}

html, body {
  /* Usamos un degradado lineal imperceptible para evitar que Samsung Internet invierta los tonos */
  background: linear-gradient(0deg, #F4C2D0 0%, #F4C2D0 100%) !important;
  background-color: #F4C2D0 !important;
  color: #3E1E19 !important;
  -webkit-filter: none !important;
  filter: none !important;
}

@media (prefers-color-scheme: dark) {
  html, body {
    background: linear-gradient(0deg, #F4C2D0 0%, #F4C2D0 100%) !important;
    background-color: #F4C2D0 !important;
    color: #3E1E19 !important;
    filter: none !important;
  }
}

/* ==========================================================================
   PALETA Y VARIABLES GLOBALES (Identidad DameOtro)
   ========================================================================== */
:root {
  --bg-pink: #F4C2D0;          /* Rosa pastel premium */
  --bg-pink-light: #F9D8E2;
  --chocolate-dark: #3E1E19;   /* Chocolate profundo */
  --chocolate-light: #522A23;
  --gold-primary: #D4AF37;     /* Dorado elegante */
  --gold-light: #F3E5AB;
  --gold-gradient: linear-gradient(135deg, #FFE28A 0%, #B8860B 100%);
  --white: #FFFFFF;
  --shadow-soft: 0 10px 30px rgba(62, 30, 25, 0.15);
  --shadow-card: 0 15px 35px rgba(62, 30, 25, 0.25);
  --radius-lg: 24px;
  --radius-md: 16px;
  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & CONFIGURACIÓN BASE
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.app-wrapper {
  width: 100%;
  max-width: 430px; /* Tamaño mockup teléfono */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px;
  position: relative;
}

/* ==========================================================================
   HEADER / LOGO
   ========================================================================== */
.app-header {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--chocolate-dark);
  letter-spacing: -1px;
  position: relative;
  display: inline-block;
}

.gold-line {
  height: 2px;
  width: 140px;
  background: var(--gold-gradient);
  margin: 4px auto 6px auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tagline {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--chocolate-dark);
  opacity: 0.9;
  text-transform: lowercase;
}

/* ==========================================================================
   PANTALLAS (SWITCHER)
   ========================================================================== */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  width: 100%;
  animation: fadeIn 0.4s ease forwards;
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PANTALLA BIENVENIDA
   ========================================================================== */
.welcome-card {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  padding: 35px 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  width: 100%;
}

.dice-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.main-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--chocolate-dark);
  letter-spacing: 1px;
}

.subtitle-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--chocolate-dark);
  margin-top: 4px;
  margin-bottom: 20px;
}

.welcome-desc {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 30px;
  color: var(--chocolate-dark);
}

/* ==========================================================================
   RULETA INTERACTIVA
   ========================================================================== */
.wheel-container {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.pointer-arrow {
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid #B8860B;
  filter: drop-shadow(0 4px 5px rgba(62, 30, 25, 0.4));
}

.wheel-frame {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 8px;
  background: var(--gold-gradient);
  box-shadow: var(--shadow-card);
  position: relative;
}

#wheelCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  transform: rotate(0deg);
  transition: transform 0s cubic-bezier(0.15, 0.85, 0.35, 1);
}

.gold-center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--white);
  background: var(--gold-gradient);
  color: var(--chocolate-dark);
  font-weight: 900;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
  z-index: 5;
  transition: transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gold-center-btn:active {
  transform: translate(-50%, -50%) scale(0.92);
}

/* ==========================================================================
   COLECCIÓN TRACKER
   ========================================================================== */
.collection-tracker {
  margin-top: 25px;
  width: 100%;
  text-align: center;
}

.tracker-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--chocolate-dark);
  opacity: 0.8;
}

.tracker-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--chocolate-dark);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--chocolate-dark);
  transition: all 0.3s ease;
}

.dot.unlocked {
  background: var(--chocolate-dark);
  color: var(--gold-light);
  border-color: var(--chocolate-dark);
  box-shadow: 0 4px 8px rgba(62, 30, 25, 0.3);
  transform: scale(1.08);
}

/* ==========================================================================
   BOTONES E INTERACTIVOS
   ========================================================================== */
.btn-primary {
  width: 100%;
  background: var(--chocolate-dark);
  color: var(--white);
  border: none;
  padding: 16px 24px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(62, 30, 25, 0.3);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: var(--chocolate-light);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.8);
  color: var(--chocolate-dark);
  border: 1.5px solid var(--chocolate-dark);
  padding: 12px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-whatsapp {
  flex: 1;
  background: #25D366;
  color: var(--white);
  border: none;
  padding: 12px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

/* ==========================================================================
   MODALES Y TARJETAS PREMIUM
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(62, 30, 25, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-pink-light);
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--chocolate-dark);
  opacity: 0.7;
}

.card-collection {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold-primary);
  margin: 4px 0 12px 0;
  text-transform: uppercase;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--chocolate-dark);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--chocolate-dark);
  line-height: 1.4;
  margin-bottom: 16px;
}

.random-quote-box {
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--chocolate-dark);
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-row {
  display: flex;
  gap: 10px;
}

/* Modal Final */
.celebration-emoji { font-size: 3.5rem; margin-bottom: 8px; }
.final-title { font-size: 1.6rem; font-weight: 900; }
.final-desc { font-size: 0.95rem; margin-top: 4px; }
.final-highlight { font-size: 1rem; margin: 15px 0; }
.final-box {
  background: rgba(255, 255, 255, 0.5);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 20px;
}
.gold-glow {
  background: var(--gold-gradient);
  color: var(--chocolate-dark);
}

/* Vibración de detención de ruleta */
.vibrate {
  animation: vibrateAnim 0.15s ease infinite;
}

@keyframes vibrateAnim {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-2px, 2px); }
  100% { transform: translate(0, 0); }
}
