.ruleta-container {
    text-align: center;
    margin: 20px auto;
    max-width: 500px;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 90%;
}

.titulo-ruleta {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.7), 0 0 20px rgba(255,255,255,0.5);
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 800;
    text-transform: uppercase;
    font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
    letter-spacing: 1px;
}

.ruleta-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto 30px;
    aspect-ratio: 1 / 1;
}

#ruletaCanvas {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.ruleta-centro {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 4px solid #c00;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.ruleta-flecha {
    position: absolute;
    top: -15px;
    left: 50%;
    width: 16px;
    height: 30px;
    background: #c00;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transform: translateX(-50%);
    z-index: 11;
}

.btn-girar {
    background: linear-gradient(to bottom, #d4af37, #b8860b);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    width: 90%;
    max-width: 250px;
}

.btn-girar:hover {
    background: linear-gradient(to bottom, #b8860b, #daa520);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.4);
}

.btn-girar:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.contador-tiempo {
    background: #ff6b6b;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    display: inline-block;
    font-size: 14px;
}

.mensaje-login {
    color: #d4af37;
    font-size: 16px;
    font-weight: bold;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-bottom: 15px;
}

.btn-reclamar {
    background: linear-gradient(to bottom, #ff0000, #cc0000);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 15px;
    width: 90%;
    max-width: 250px;
}

.btn-reclamar:hover {
    background: linear-gradient(to bottom, #cc0000, #aa0000);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.4);
}

.resultado {
    margin-top: 20px;
    font-size: 20px;
    font-weight: bold;
    min-height: 40px;
    color: #d4af37;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    padding: 0 10px;
}

.resultado-ganador {
    color: #d4af37;
    animation: pulse 1s infinite;
}

.resultado-perdedor {
    color: #6c757d;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.ruleta-inactiva {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}

.panel-ruleta {
    margin: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.controles-panel {
    margin-bottom: 30px;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.info-automatica {
    margin: 15px 0;
    padding: 10px;
    background: #e7f3ff;
    border-left: 4px solid #007cba;
    border-radius: 4px;
}

.info-automatica p {
    margin: 5px 0;
    color: #005a87;
    font-size: 14px;
}

.control-porcentaje {
    margin-top: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
}

.control-porcentaje label {
    margin-right: 10px;
    font-weight: bold;
}

.control-porcentaje input {
    padding: 5px;
    width: 60px;
    text-align: center;
}

.buscador-panel {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.buscador-panel input[type='text'] {
    padding: 8px;
    width: 100%;
    max-width: 300px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-toggle {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    margin-bottom: 5px;
    display: inline-block;
    text-decoration: none;
}

.btn-toggle:hover {
    background: #218838;
}

.btn-toggle.activo {
    background: #155724;
}

.tabla-premios {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.tabla-premios th, .tabla-premios td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.tabla-premios th {
    background-color: #f2f2f2;
}

.paginacion {
    margin: 20px 0;
    text-align: center;
}

.paginacion-botones {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.estrellas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.estrella {
    position: absolute;
    background-color: gold;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: caer 1s forwards;
}

@keyframes caer {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Media Queries para Responsividad */
@media (max-width: 768px) {
    .ruleta-container {
        padding: 15px;
        margin: 10px auto;
    }
    
    .titulo-ruleta {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .ruleta-wrapper {
        max-width: 300px;
        margin-bottom: 20px;
    }
    
    .ruleta-centro {
        width: 25px;
        height: 25px;
        border-width: 3px;
    }
    
    .ruleta-flecha {
        width: 14px;
        height: 25px;
        top: -12px;
    }
    
    .btn-girar, .btn-reclamar {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .resultado {
        font-size: 18px;
    }
    
    .contador-tiempo {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .mensaje-login {
        font-size: 14px;
        padding: 10px;
    }
    
    .panel-ruleta {
        margin: 10px;
        padding: 10px;
    }
    
    .tabla-premios {
        font-size: 12px;
    }
    
    .tabla-premios th, .tabla-premios td {
        padding: 8px 5px;
    }
    
    .buscador-panel input[type='text'] {
        width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .ruleta-container {
        padding: 10px;
    }
    
    .titulo-ruleta {
        font-size: 20px;
    }
    
    .ruleta-wrapper {
        max-width: 250px;
    }
    
    .btn-girar, .btn-reclamar {
        width: 100%;
        max-width: none;
    }
    
    .resultado {
        font-size: 16px;
    }
    
    .tabla-premios {
        font-size: 11px;
    }
    
    .tabla-premios th, .tabla-premios td {
        padding: 6px 3px;
    }
}