/* =================================================
   MEJORAS VISUALES Y UX - PREMIOS DV 2025
   ================================================= */

/* Animaciones globales */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideExpandHeight {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

@keyframes successBounce {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }
    60% {
        transform: translateY(5px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

/* ===================================
   MENSAJES MEJORADOS
   =================================== */

.error {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%) !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    border-left: 5px solid #a93226 !important;
    box-shadow: 0 3px 12px rgba(192, 57, 43, 0.3) !important;
    animation: slideInDown 0.5s ease-out;
    color: #fff !important;
}

.info {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%) !important;
    color: #fff !important;
    padding: 18px 22px !important;
    border-radius: 8px !important;
    margin: 15px 0 !important;
    border-left: 5px solid #1c5d8b !important;
    box-shadow: 0 3px 12px rgba(41, 128, 185, 0.3) !important;
    font-family: Oswald, sans-serif !important;
    animation: slideInDown 0.5s ease-out;
    text-align: left !important;
}

.info i {
    margin-right: 10px;
    font-size: 1.15em;
    color: #fff;
}

.infocategoria {
    background: linear-gradient(135deg, #A35D00 0%, #d4821f 100%) !important;
    color: #fff !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    margin: 15px 0 !important;
    font-family: Oswald, sans-serif !important;
    font-size: 1.1em !important;
    box-shadow: 0 3px 12px rgba(163, 93, 0, 0.3) !important;
    border-left: 5px solid #8a4f00 !important;
    text-align: left !important;
}

.infocategoria i {
    color: #fff;
    margin-right: 8px;
}

/* ===================================
   ACORDEÓN DE JUEGOS DE ACTORES
   =================================== */

.actor-games-toggle {
    display: inline-block;
    margin: 12px 0 8px 0;
    padding: 10px 18px;
    background: linear-gradient(135deg, #A35D00 0%, #d4821f 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-family: Oswald, sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(163, 93, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.actor-games-toggle:hover {
    background: linear-gradient(135deg, #8a4f00 0%, #A35D00 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(163, 93, 0, 0.4);
}

.actor-games-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(163, 93, 0, 0.3);
}

.actor-games-toggle i {
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 1.1em;
}

.actor-games-toggle.active i {
    transform: rotate(180deg);
}

.actor-games-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, padding 0.4s ease;
    opacity: 0;
    margin-top: 0;
    padding: 0;
}

.actor-games-list.active {
    max-height: 800px;
    opacity: 1;
    padding: 10px 0;
}

.actor-games-list a.estudio {
    display: block;
    padding: 10px 15px;
    margin: 5px 0;
    background: linear-gradient(135deg, rgba(163, 93, 0, 0.12) 0%, rgba(212, 130, 31, 0.08) 100%);
    border-left: 4px solid #A35D00;
    border-radius: 5px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
}

.actor-games-list a.estudio:hover {
    background: linear-gradient(135deg, rgba(163, 93, 0, 0.2) 0%, rgba(212, 130, 31, 0.15) 100%);
    padding-left: 20px;
    border-left-width: 5px;
    box-shadow: 0 2px 8px rgba(163, 93, 0, 0.2);
}

.actor-games-list a.estudio i {
    margin-right: 8px;
    color: #A35D00;
}

/* ===================================
   MENSAJE DE ÉXITO DE VOTO
   =================================== */

.vote-success-message {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9999 !important;
    width: min(550px, 90vw) !important;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    color: white !important;
    padding: 35px 45px !important;
    border-radius: 16px !important;
    font-family: Oswald, sans-serif !important;
    font-size: 1.8em !important;
    font-weight: 700 !important;
    box-shadow: 0 15px 50px rgba(46, 204, 113, 0.5) !important;
    border: 4px solid #1e8449 !important;
    letter-spacing: 0.8px !important;
    text-align: center !important;
    animation: successBounce 0.6s ease-out;
}

.vote-success-message i {
    margin-right: 15px !important;
    animation: checkmark 0.6s ease-out;
    font-size: 1.3em !important;
}

.vote-success-message.fade-out {
    animation: fadeOutScale 0.5s ease-out forwards;
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutRight {
    to { opacity: 0; transform: translateX(20%); }
}

@keyframes fadeOutScale {
    to { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.9); 
    }
}

/* ===================================
   MENSAJE DE VOTO GUARDADO (PHP)
   =================================== */

.mensaje-voto-guardado {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    color: #fff !important;
    padding: 25px 35px !important;
    border-radius: 12px !important;
    margin: 20px auto !important;
    max-width: 700px !important;
    text-align: center !important;
    font-family: Oswald, sans-serif !important;
    font-size: 1.6em !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.4) !important;
    border: 3px solid #1e8449 !important;
    letter-spacing: 0.5px !important;
    animation: successBounce 0.6s ease-out;
}

.mensaje-voto-guardado i {
    margin-right: 12px;
    font-size: 1.2em;
    animation: checkmark 0.6s ease-out;
}

/* Botón volver a categorías */
.back-to-cats {
    margin: 5px 0 20px;
}

.btn-back-cats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    color: #fff !important;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-back-cats:hover {
    background: #2b2b2b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

/* ===================================
   ESTILOS DE TARJETAS VOTADAS
   =================================== */

.voted-card-highlight {
    animation: votedCardGlow 0.8s ease-out 1 !important;
}

.card-voted {
    background: linear-gradient(135deg, #e7f5ed 0%, #d4f0e0 100%) !important;
    border: 3px solid #27ae60 !important;
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.25) !important;
    position: relative !important;
    transform: translateY(-4px) !important;
}

.card-voted::after {
    content: 'Tu voto';
    position: absolute;
    top: 12px;
    right: 12px;
    background: #27ae60;
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.8em;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.35);
}

.card-voted .btn-voto {
    background: linear-gradient(135deg, #1f8c4c 0%, #27ae60 100%) !important;
    box-shadow: 0 4px 18px rgba(39, 174, 96, 0.35) !important;
}

@keyframes votedCardGlow {
    0% {
        box-shadow: 0 5px 20px rgba(0,0,0,0.12), 0 0 30px rgba(46, 204, 113, 0.6) !important;
    }
    100% {
        box-shadow: 0 5px 20px rgba(0,0,0,0.12) !important;
    }
}

.btn-voto {
    display: inline-block !important;
    padding: 14px 28px !important;
    margin-top: 15px !important;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-family: Oswald, sans-serif !important;
    font-size: 1.1em !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.35) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.btn-voto:hover { 
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.45) !important;
}

.btn-voto:active {
    transform: translateY(0) !important;
    box-shadow: 0 3px 10px rgba(46, 204, 113, 0.35) !important;
}

.btn-voto:disabled {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    opacity: 0.8 !important;
}

.btn-voto.votado { 
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%) !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.35) !important;
    position: relative !important;
}

.btn-voto.votado::before {
    content: '✓ ';
    margin-right: 5px;
}

.btn-voto.votado:hover {
    background: linear-gradient(135deg, #2574a9 0%, #2980b9 100%) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.45) !important;
}

/* ===================================
   TARJETAS DE CANDIDATOS MEJORADAS
   =================================== */

#votosjuegos {
    width: 100% !important;
}

#votosjuegos #mosaicojuego {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 8px !important;
    overflow-x: auto !important;
}

#votosjuegos td,
#votosjuegos .td {
    background: white !important;
    border-radius: 12px !important;
    padding: 25px 15px !important;
    margin: 0 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.12) !important;
    transition: all 0.3s ease !important;
    animation: fadeIn 0.6s ease-out;
    border: 2px solid transparent !important;
    flex: 1 1 18% !important;
    min-width: 180px !important;
    max-width: 220px !important;
    display: flex !important;
    flex-direction: column !important;
}

#votosjuegos td:hover,
#votosjuegos .td:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18) !important;
    border-color: #A35D00 !important;
    z-index: 10 !important;
}

#votosjuegos .td img.portada,
#votosjuegos td img.portada {
    border-radius: 10px !important;
    transition: transform 0.3s ease !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15) !important;
}

#votosjuegos .td:hover img.portada,
#votosjuegos td:hover img.portada {
    transform: scale(1.08) !important;
}

/* ===================================
   USUARIO LOGUEADO
   =================================== */

.usuariopremios {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%) !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 30px !important;
    display: inline-block !important;
    font-family: Oswald, sans-serif !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
    margin: 12px 0 !important;
    font-size: 1.05em !important;
}

.usuariopremios i {
    margin-right: 10px;
    color: #3498db;
    font-size: 1.1em;
}

/* ===================================
   LOGO DE PREMIOS
   =================================== */

.logopremios {
    transition: transform 0.4s ease !important;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.35)) !important;
}

.logopremios:hover {
    transform: scale(1.06) rotate(1deg) !important;
}

/* ===================================
   TÍTULOS MEJORADOS
   =================================== */

#premios h1 {
    font-size: 3rem;
    color: #2c3e50 !important;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.12) !important;
    margin-bottom: 20px !important;
    font-family: Oswald, sans-serif !important;
    animation: slideInDown 0.6s ease-out;
}

#premios h1 i {
    color: #A35D00 !important;
    margin-right: 12px !important;
    font-size: 1.1em !important;
}

#premios h2 {
    color: #fff !important;
    font-family: Oswald, sans-serif !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3) !important;
}

#premios h3 {
    color: #fff !important;
    font-family: Oswald, sans-serif !important;
    margin: 20px 0 !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3) !important;
}

#premios h4 {
    color: #2c3e50 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1) !important;
}

#premios p {
    color: #2c3e50 !important;
}

a.juego {
    font-weight: 600 !important;
    color: #fff !important;
    transition: color 0.2s ease !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

a.juego:hover {
    color: #ffe6cc !important;
}

a.seccionm {
    color: #fff !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3) !important;
}

/* ===================================
   EFECTOS GENERALES
   =================================== */

#premios > * {
    animation: fadeIn 0.7s ease-out;
}

form {
    animation: fadeIn 0.8s ease-out;
}

/* ===================================
   SCROLLBAR PERSONALIZADO
   =================================== */

::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #f1f1f1 0%, #e0e0e0 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #A35D00 0%, #d4821f 100%);
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8a4f00 0%, #A35D00 100%);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media screen and (max-width: 480px){
    #votosjuegos #mosaicojuego {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    #votosjuegos .td {
        flex: 1 1 auto !important;
        width: 90% !important;
        max-width: 100% !important;
        min-width: auto !important;
        margin: 10px 0 !important;
        padding: 20px 15px !important;
    }
    
    .btn-voto {
        width: 95% !important;
        padding: 16px 22px !important;
    }
    
    .actor-games-toggle {
        width: 95% !important;
        font-size: 0.9em !important;
    }
    
    .info, .infocategoria, .error {
        padding: 14px 18px !important;
        font-size: 1em !important;
    }
    
    .estadisticas-votacion {
        padding: 18px !important;
    }
    
    .contador-votantes strong {
        font-size: 2.2em !important;
    }
}

@media screen and (min-width: 481px) and (max-width: 969px){
    #votosjuegos #mosaicojuego {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    #votosjuegos .td {
        flex: 1 1 40% !important;
        max-width: 45% !important;
        min-width: 200px !important;
        margin: 10px !important;
        padding: 20px !important;
    }
    
    .btn-voto {
        padding: 12px 24px !important;
    }
}

@media screen and (min-width: 970px) and (max-width: 1199px){
    #votosjuegos .td {
        flex: 1 1 18% !important;
        min-width: 160px !important;
        max-width: 200px !important;
        padding: 20px 12px !important;
    }
}

@media screen and (min-width: 1200px){
    #votosjuegos .td {
        flex: 1 1 18% !important;
        min-width: 180px !important;
        max-width: 240px !important;
        padding: 25px 15px !important;
    }
}

/* ===================================
   LINKS MEJORADOS
   =================================== */

a.estudio {
    color: #555 !important;
    transition: all 0.2s ease !important;
}

a.estudio:hover {
    color: #A35D00 !important;
}
/* ===================================
   BADGE DE CATEGORÍA VOTADA
   =================================== */

.badge-votado {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 50%;
    bottom: -5px;
    right: -5px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4);
    animation: checkmark 0.4s ease-out;
    z-index: 10;
}

.badge-votado i {
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.iconog {
    position: relative;
    display: inline-block;
}