/* Hereda variables de styles.css, asegurate de tener styles.css cargado antes */

.sorteo-header {
    text-align: center;
    margin-top: 80px; /* Espacio para el header fijo */
    margin-bottom: 40px;
}

.price-tag {
    font-size: 1.5rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- Layout del Juego --- */
.game-area {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.game-col-left {
    flex: 1;
    min-width: 300px;
    position: sticky;
    top: 100px; /* Para que la ruleta te siga al bajar */
}

.game-col-right {
    flex: 2;
    min-width: 300px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* --- Ruleta Mejorada --- */
.controls-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.wheel-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 20px auto;
    border-radius: 50%;
    border: 5px solid #222;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.2);
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #00e676 0deg 45deg, #111 45deg 90deg,
        #00e676 90deg 135deg, #111 135deg 180deg,
        #00e676 180deg 225deg, #111 225deg 270deg,
        #00e676 270deg 315deg, #111 315deg 360deg
    );
    transition: transform 4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wheel-arrow {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid var(--gold);
    z-index: 10;
}

.wheel-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #000;
    font-size: 1.2rem;
    z-index: 5;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.input-spin {
    background: #000;
    border: 1px solid #333;
    color: white;
    padding: 10px;
    border-radius: 8px;
    width: 80px;
    text-align: center;
    font-size: 1.1rem;
    margin-left: 10px;
}

/* --- Grid de Boletos --- */
.manual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.legend { font-size: 0.8rem; display: flex; gap: 10px; }
.badge-legend { padding: 4px 10px; border-radius: 4px; }
.badge-legend.available { background: #27272a; border: 1px solid #3f3f46; }
.badge-legend.selected { background: var(--primary); color: #000; }
.badge-legend.taken { background: #3f1a1a; color: #7f1d1d; text-decoration: line-through; }

.boletos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar personalizada */
.boletos-grid::-webkit-scrollbar { width: 8px; }
.boletos-grid::-webkit-scrollbar-track { background: #111; }
.boletos-grid::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.btn-boleto {
    aspect-ratio: 1;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 10px;
    color: #a1a1aa;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-boleto:hover:not(:disabled) {
    background: #3f3f46;
    color: white;
    transform: scale(1.05);
}

.btn-boleto.seleccionado {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.4);
    transform: scale(1.1);
    z-index: 2;
}

.btn-boleto.ocupado {
    background: #1f1212;
    color: #4a1515;
    border-color: #381010;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.7;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: var(--primary);
}

/* Responsivo */
@media (max-width: 768px) {
    .game-area { flex-direction: column; }
    .game-col-left { position: static; width: 100%; }
    .sticky-pay { flex-direction: column; gap: 15px; text-align: center; padding-bottom: 20px; }
    .boletos-grid { max-height: 400px; }
}

.btn-boleto.ocupado {
    background: #222 !important;
    color: #555 !important;
}