:root {
    --primary: #00e676; /* Verde Neón */
    --primary-dark: #00a854;
    --secondary: #651fff; /* Morado Vibrante para contraste */
    --dark-bg: #09090b;
    --card-bg: #18181b;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --gold: #ffd700;
    --danger: #ff4444;
    --glass: rgba(24, 24, 27, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }
body { background-color: var(--dark-bg); color: var(--text-main); overflow-x: hidden; }

/* --- HEADER --- */
header { position: fixed; width: 100%; top: 0; z-index: 1000; background: var(--glass); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.1); padding: 15px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 900; letter-spacing: 1px; }
.highlight { color: var(--primary); }
.nav-links { display: flex; gap: 25px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-main); font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--primary); }
.btn-nav { border: 1px solid var(--primary); padding: 8px 20px; border-radius: 50px; color: var(--primary) !important; }
.btn-nav:hover { background: var(--primary); color: #000 !important; box-shadow: 0 0 15px var(--primary); }

/* --- HERO --- */
.hero { height: 90vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, #1a2e25 0%, var(--dark-bg) 70%);
    z-index: -1;
}
.hero h1 { font-size: 4.5rem; line-height: 1.1; margin: 20px 0; font-weight: 900; }
.text-gradient { background: linear-gradient(135deg, #fff 30%, var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.badge-new { background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; letter-spacing: 2px; border: 1px solid rgba(255,255,255,0.2); }
.hero p { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 30px; }

/* Animaciones de Entrada */
.animate-text { opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.btn-primary { background: var(--primary); color: #000; padding: 15px 40px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 1.1rem; border: none; cursor: pointer; transition: 0.3s; display: inline-block; }
.glow-effect:hover { box-shadow: 0 0 30px rgba(0, 230, 118, 0.6); transform: scale(1.05); }

/* --- SORTEOS CARDS --- */
.section-padding { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; }
.grid-sorteos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }

.card-sorteo {
    background: var(--card-bg); border-radius: 24px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05); position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.card-sorteo:hover { transform: translateY(-10px); border-color: var(--primary); }

.card-header { padding: 30px; text-align: center; background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent); position: relative; }
.icon-bg { font-size: 3rem; margin-bottom: 15px; background: -webkit-linear-gradient(45deg, var(--primary), #fff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.precio-ticket { font-size: 2rem; font-weight: 900; color: var(--text-main); margin-top: 10px; }
.mxn { font-size: 1rem; color: var(--text-muted); font-weight: 400; }

.card-body { padding: 30px; }
.premio-list { margin-bottom: 25px; }
.premio-item { display: flex; justify-content: space-between; margin-bottom: 12px; padding: 10px; background: rgba(255,255,255,0.03); border-radius: 10px; font-size: 0.95rem; }
.premio-item.gold { border-left: 3px solid var(--gold); }
.premio-item.silver { border-left: 3px solid #c0c0c0; }
.premio-item.bronze { border-left: 3px solid #cd7f32; }
.place { font-weight: bold; color: var(--text-muted); }
.prize { font-weight: 700; color: #fff; }

.btn-block { display: block; width: 100%; text-align: center; padding: 14px; border-radius: 12px; text-decoration: none; font-weight: 800; transition: 0.3s; }
.btn-cash { background: rgba(0, 230, 118, 0.1); color: var(--primary); border: 1px solid var(--primary); }
.btn-cash:hover { background: var(--primary); color: #000; }
.btn-iphone { background: linear-gradient(45deg, #2563eb, #9333ea); color: white; border: none; }
.btn-iphone:hover { box-shadow: 0 0 20px rgba(37, 99, 235, 0.5); }

/* --- UI COMPRA (Ruleta y Grid) --- */
.game-area { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 30px; }
.game-col-left { flex: 1; min-width: 300px; display: flex; flex-direction: column; align-items: center; }
.game-col-right { flex: 2; min-width: 300px; }

/* Ruleta Visualmente Mejorada */
.wheel-container {
    position: relative; width: 320px; height: 320px;
    border-radius: 50%; border: 8px solid #222;
    box-shadow: 0 0 40px rgba(0, 230, 118, 0.15);
    margin-bottom: 20px;
}
.wheel {
    width: 100%; height: 100%; border-radius: 50%;
    background: conic-gradient(
        var(--primary) 0deg 45deg, #111 45deg 90deg,
        var(--primary) 90deg 135deg, #111 135deg 180deg,
        var(--primary) 180deg 225deg, #111 225deg 270deg,
        var(--primary) 270deg 315deg, #111 315deg 360deg
    );
    transition: transform 5s cubic-bezier(0.25, 1, 0.5, 1); /* Curva de frenado física */
    position: relative;
}
/* Decoración interna de la ruleta */
.wheel::after {
    content: ''; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px;
    border-radius: 50%; border: 2px dashed rgba(255,255,255,0.2);
}

.wheel-arrow {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; 
    border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 30px solid var(--gold);
    z-index: 10; filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
}
.wheel-center {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 70px; height: 70px; background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #000; box-shadow: 0 0 15px rgba(0,0,0,0.5); z-index: 5;
}

.controls-box { background: var(--card-bg); padding: 20px; border-radius: 15px; width: 100%; text-align: center; border: 1px solid rgba(255,255,255,0.05); }
.input-spin { background: #000; border: 1px solid #333; color: white; padding: 10px; border-radius: 8px; width: 80px; text-align: center; margin: 0 10px; font-weight: bold; }

/* Grid de Boletos */
.boletos-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(55px, 1fr)); gap: 8px;
    max-height: 500px; overflow-y: auto; padding-right: 5px;
}
.boletos-grid::-webkit-scrollbar { width: 6px; }
.boletos-grid::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.boleto-btn {
    aspect-ratio: 1; background: #27272a; border: 1px solid #3f3f46; border-radius: 8px;
    color: #71717a; font-weight: 700; cursor: pointer; transition: 0.1s; font-size: 0.8rem;
}
.boleto-btn:hover:not(:disabled) { background: #3f3f46; color: white; transform: scale(1.1); }
.boleto-btn.selected { background: var(--primary); color: #000; border-color: var(--primary); box-shadow: 0 0 10px var(--primary); font-weight: 900; }
.boleto-btn.taken { background: #3f1a1a; color: #7f1d1d; border-color: #7f1d1d; cursor: not-allowed; opacity: 0.6; }

/* Sticky Footer de Pago */
.sticky-pay {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); border-top: 1px solid #333;
    padding: 15px 20px; display: flex; justify-content: space-between; align-items: center;
    transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 999;
}
.sticky-pay.active { transform: translateY(0); }
.pay-info h4 { font-size: 0.9rem; color: var(--text-muted); }
.pay-total { font-size: 1.5rem; font-weight: bold; color: var(--primary); }
.btn-whatsapp {
    background: #25D366; color: white; padding: 12px 30px; border-radius: 50px; text-decoration: none; font-weight: bold; display: flex; align-items: center; gap: 10px;
}
.btn-whatsapp:hover { background: #1ebe57; box-shadow: 0 0 20px rgba(37, 211, 102, 0.4); }

@media (max-width: 768px) {
    .hero h1 { font-size: 3rem; }
    .sticky-pay { flex-direction: column; gap: 15px; text-align: center; }
    .game-col-left { order: -1; }
}

.boletos-manuales {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 8px;
    margin: 30px 0 100px 0; /* Espacio para la barra de pago */
}

.btn-boleto {
    aspect-ratio: 1/1;
    border: 1px solid #ccc;
    background: #fff;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-boleto.ocupado {
    background: #222 !important;
    color: #555 !important;
    text-decoration: line-through;
    cursor: not-allowed;
}

.btn-boleto.seleccionado {
    background: #ffcc00 !important;
    color: #000 !important;
    border-color: #000;
    transform: scale(1.1);
}

/* Barra de Pago Flotante */
.barra-pago {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
    transition: 0.4s;
    z-index: 9999;
}

.barra-pago.active { bottom: 0; }

.btn-confirmar {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* Ruleta Visual */
.ruleta-container { position: relative; margin: 20px auto; width: 200px; height: 200px; }
.ruleta { 
    width: 100%; height: 100%; border-radius: 50%; border: 5px solid #333; 
    position: relative; overflow: hidden; background: #eee;
}
.segmento {
    position: absolute; width: 50%; height: 50%; background: #007b4d;
    transform-origin: 100% 100%; border: 1px solid #fff;
}
.segmento:nth-child(even) { background: #ffcc00; }
.btn-girar {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 10; padding: 10px; border-radius: 50%; cursor: pointer;
}
.btn-boleto.ocupado {
    background-color: #333 !important; /* Color oscuro */
    color: #666 !important;            /* Texto gris */
    text-decoration: line-through;     /* Rayado */
    cursor: not-allowed !important;    /* Icono de prohibido */
    opacity: 0.6;
}