:root {
    --magic-purple: #4a148c;
    --magic-violet: #7b1fa2;
    --magic-accent: #e040fb;
    --magic-gold: #ffd700;
    --glass: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at center, #2e003e 0%, #0d001a 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- EFECTO DE BRILLITOS --- */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
    animation: twinkle var(--duration) infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); box-shadow: 0 0 10px white; }
}

/* --- PANTALLA DE LOGIN --- */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #2e003e 20%, #05000a 100%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.login-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(224, 64, 251, 0.3);
    border-radius: 25px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 0 40px rgba(74, 20, 140, 0.6);
    text-align: center;
}

/* --- INTERFAZ PRINCIPAL (OCULTA INICIALMENTE) --- */
#main-content {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#main-content.authorized {
    display: block;
    opacity: 1;
}

/* --- NAVBAR MÁGICA --- */
.navbar-magic {
    background: rgba(74, 20, 140, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--magic-accent);
    padding: 1rem 0;
}

.navbar-brand-magic {
    font-weight: 700;
    font-size: 28px;
    color: white !important;
    text-shadow: 0 0 15px var(--magic-accent);
}

.navbar-brand-magic span {
    color: var(--magic-gold);
}

.cart-status-box {
    background: var(--glass);
    border: 1px solid var(--magic-accent);
    padding: 5px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-badge {
    background: var(--magic-gold);
    color: black;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 14px;
}

/* --- PRODUCT CARDS --- */
.product-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(224, 64, 251, 0.3);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--magic-accent);
    box-shadow: 0 0 30px rgba(224, 64, 251, 0.4);
}

.img-box {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(0,0,0,0.2);
}

.img-box img {
    max-height: 100%;
    border-radius: 10px;
}

.btn-magic {
    background: linear-gradient(45deg, var(--magic-purple), var(--magic-accent));
    border: none;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    padding: 10px;
    transition: 0.3s;
}

.btn-magic:hover {
    box-shadow: 0 0 20px var(--magic-accent);
    color: white;
    filter: brightness(1.2);
}

/* --- CARRITO Y FORMULARIO --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 25px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.2);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 12px;
}

.form-control {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--magic-violet);
    color: white !important;
}

.form-control:focus {
    background: rgba(0,0,0,0.5);
    border-color: var(--magic-accent);
    box-shadow: 0 0 10px var(--magic-accent);
}

.payment-option {
    border: 2px solid var(--magic-violet);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.payment-option.active {
    background: rgba(224, 64, 251, 0.2);
    border-color: var(--magic-accent);
}

/* --- TICKET --- */
.magic-ticket {
    background: #fff;
    color: #333;
    padding: 30px;
    border-radius: 5px;
    position: relative;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.magic-ticket::before {
    content: '';
    position: absolute;
    top: -10px; left: 0; width: 100%; height: 15px;
    background: linear-gradient(-45deg, transparent 33.33%, #fff 33.33%, #fff 66.66%, transparent 66.66%), 
                linear-gradient(45deg, transparent 33.33%, #fff 33.33%, #fff 66.66%, transparent 66.66%);
    background-size: 20px 40px;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--magic-violet); border-radius: 10px; }
/* --- BOTONES DE CATEGORÍAS --- */
.btn-outline-magic {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--magic-violet);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-magic:hover, .btn-outline-magic.active {
    background: linear-gradient(45deg, var(--magic-purple), var(--magic-accent));
    border-color: var(--magic-accent);
    color: white;
    box-shadow: 0 0 15px var(--magic-accent);
}