:root {
    --neon-cyan: #00f5ff;
    --neon-magenta: #ff00ff;
    --neon-green: #00ff88;
    --neon-red: #ff3366;
    --glitch-color: #f0f;
    
    /* Premium Palette (Trust & Exclusivity) */
    --gold: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --navy-deep: #0a192f;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

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

body {
    background-color: #020617;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(0, 245, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(255, 0, 255, 0.05) 0%, transparent 50%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Luxury Elements */
.premium-border {
    position: relative;
    padding: 2px;
    background: linear-gradient(135deg, var(--gold), transparent, var(--gold));
    border-radius: 26px;
}

.btn-premium {
    background: linear-gradient(135deg, var(--gold) 0%, #b8860b 100%);
    color: #000;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--gold-glow);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-premium:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px var(--gold-glow);
    filter: brightness(1.1);
}

/* Ticket Grid */
.boletos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 12px;
    margin: 2rem 0;
}

.boleto {
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ── Formularios Globales ─────────────────────────────────────────────────── */
input, textarea {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: .75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    transition: border-color .2s;
    width: 100%;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255,255,255,.07);
}

/* Select — fondo oscuro para dropdown nativo */
select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #0f172a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: .75rem 2.5rem .75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    cursor: pointer;
    width: 100%;
    transition: border-color .2s, background-color .2s;
}

select:hover {
    border-color: rgba(255,255,255,.2);
    background-color: #1e293b;
}

/* Las <option> del SO nativo */
select option {
    background-color: #0f172a;
    color: #f8fafc;
    padding: .5rem;
}

select option:checked,
select option:focus,
select option:hover {
    background-color: #1e3a5f;
    color: #fff;
}

.boleto:hover:not(.vendido) {
    background: rgba(255,255,255,0.08);
    transform: scale(1.1);
    color: #fff;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

.boleto.seleccionado {
    background: var(--neon-cyan);
    color: #000;
    border-color: transparent;
    box-shadow: 0 0 20px var(--neon-cyan);
    transform: scale(1.1);
}

.boleto.vendido {
    background: rgba(255, 255, 255, 0.01);
    color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: transparent;
}

/* Animations & Effects */
.urgency-badge {
    background: var(--neon-red);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.live-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.live-progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    box-shadow: 0 0 15px var(--neon-cyan);
    transition: width 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

/* Boleto reservado (estado intermedio — Gold) */
.boleto.reservado {
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold);
    border-color: rgba(212, 175, 55, 0.3);
    cursor: not-allowed;
    animation: pulse-gold 2.5s infinite;
}

@keyframes pulse-gold {
    0%, 100% { border-color: rgba(212, 175, 55, 0.2); }
    50%       { border-color: rgba(212, 175, 55, 0.6); }
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.05) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

/* ── TABLET (769px – 1024px) ────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
    .container { padding: 1.5rem; }
    .glass-card { padding: 1.5rem; }
}

/* ── MOBILE (≤ 768px) ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .container { padding: 1rem; }
    /* Admin layout: sidebar collapses off-screen, content takes full width */
    .admin-layout .main-content {
        max-width: 100vw !important;
        padding: 1rem !important;
        padding-top: 4rem !important;
    }
    .glass-card { padding: 1.5rem; }
    .boletos-grid { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 8px; }
    .boleto { font-size: .75rem; }
    .btn-premium { padding: .8rem 1.2rem; font-size: .85rem; }
}

/* ── SMALL PHONES (≤ 480px) ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .container { padding: .75rem; }
    .glass-card { padding: 1rem; border-radius: 16px; }
    .boletos-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
    .boleto { font-size: .7rem; border-radius: 8px; }
    .btn-premium { padding: .75rem 1rem; font-size: .8rem; width: 100%; justify-content: center; }
    /* Prevent iOS zoom on input focus */
    input, textarea, select { font-size: 16px !important; }
}
