/* ========== CINEMÁTICA DE APERTURA ESTILO CS:GO ========== */

/* Overlay oscuro */
.cinematic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.95), #0a0a0f);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: cinematicFadeIn 0.4s ease;
    backdrop-filter: blur(8px);
}

@keyframes cinematicFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(8px); }
}

/* Contenedor principal de la animación */
.cinematic-container {
    width: 90%;
    max-width: 1000px;
    background: linear-gradient(135deg, rgba(0,0,0,0.85), rgba(15,15,30,0.95));
    border-radius: 24px;
    padding: 30px 20px;
    border: 1px solid rgba(255,215,0,0.3);
    box-shadow: 0 0 60px rgba(255,107,53,0.4);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo en el borde */
.cinematic-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b35, #ffd700, #ff6b35);
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Título de la animación */
.cinematic-title {
    text-align: center;
    margin-bottom: 30px;
}

.cinematic-title h3 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cinematic-title p {
    color: #a1a1aa;
    font-size: 14px;
    margin-top: 8px;
}

/* Pista de la ruleta */
.roulette-track {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: rgba(0,0,0,0.5);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    margin: 20px 0;
}

.roulette-items {
    display: flex;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    gap: 15px;
    padding: 15px;
    will-change: transform;
}

/* Cada item de la ruleta */
.roulette-skin {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.2s;
    flex-shrink: 0;
}

.roulette-skin img {
    width: 100px;
    height: 75px;
    object-fit: contain;
    border-radius: 8px;
}

.roulette-skin .skin-name {
    font-size: 10px;
    text-align: center;
    padding: 0 5px;
    font-weight: 600;
}

.roulette-skin.comun { border-color: #6b7280; background: linear-gradient(135deg, #2a2a3e, #1a1a2e); }
.roulette-skin.rara { border-color: #3b82f6; background: linear-gradient(135deg, #1e3a5f, #0f2a4a); }
.roulette-skin.epica { border-color: #8b5cf6; background: linear-gradient(135deg, #2e1a5f, #1a0f4a); }
.roulette-skin.legendaria { border-color: #f59e0b; background: linear-gradient(135deg, #4a3a1a, #2a2a0f); }

/* Marcador central (triángulo indicador) */
.roulette-indicator {
    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 #ffd700;
    z-index: 10;
    filter: drop-shadow(0 0 10px #ffd700);
}

.roulette-indicator::after {
    content: '▼';
    position: absolute;
    top: -30px;
    left: -8px;
    font-size: 20px;
    color: #ffd700;
}

/* Skin resultante */
.result-skin-container {
    margin-top: 30px;
    text-align: center;
    animation: resultPop 0.6s ease-out;
}

.result-skin-card {
    display: inline-block;
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
    border-radius: 20px;
    padding: 20px 40px;
    border: 2px solid rgba(255,215,0,0.5);
    box-shadow: 0 0 30px rgba(255,215,0,0.3);
}

.result-skin-card img {
    width: 160px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
}

.result-skin-card .result-name {
    font-size: 20px;
    font-weight: 700;
    margin: 15px 0 5px;
}

.result-skin-card .result-rarity {
    font-size: 14px;
    margin-bottom: 10px;
}

.result-skin-card .result-value {
    font-size: 18px;
    color: #ffd700;
    font-weight: 700;
}

/* ========== BOTONES DE RESULTADO - ESTILO PREMIUM ========== */
.result-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.result-btn {
    position: relative;
    padding: 14px 32px;
    border-radius: 60px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    overflow: hidden;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

/* Efecto de brillo al pasar el mouse */
.result-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.result-btn:hover::before {
    left: 100%;
}

.result-btn:active {
    transform: scale(0.96);
}

/* Botón ALMACENAR - Verde premium */
.store-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(16,185,129,0.4);
    border: 1px solid rgba(255,255,255,0.2);
}

.store-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(16,185,129,0.6);
    background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
}

/* Botón UPGRADEAR - Púrpura/Dorado premium */
.upgrade-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(139,92,246,0.4);
    border: 1px solid rgba(255,215,0,0.3);
}

.upgrade-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139,92,246,0.6);
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
    border-color: rgba(255,215,0,0.6);
}

/* Iconos dentro de los botones */
.result-btn .btn-icon {
    font-size: 18px;
    transition: transform 0.2s;
}

.result-btn:hover .btn-icon {
    transform: scale(1.1);
}

/* Barra de progreso */
.progress-bar-container {
    width: 80%;
    margin: 20px auto 0;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    height: 4px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #ffd700);
    border-radius: 10px;
    transition: width 0.1s linear;
}

/* Partículas de apertura */
.cinematic-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10001;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ffd700, #ff6b35);
    border-radius: 50%;
    animation: particleExplode 1s ease-out forwards;
}

@keyframes particleExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Efecto de flash */
.cinematic-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
}

.cinematic-flash.active {
    animation: flashAnim 0.2s ease-out forwards;
}

@keyframes flashAnim {
    0% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* Animaciones generales */
@keyframes resultPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .roulette-skin {
        width: 100px;
        height: 100px;
    }
    
    .roulette-skin img {
        width: 70px;
        height: 50px;
    }
    
    .roulette-skin .skin-name {
        font-size: 8px;
    }
    
    .result-skin-card img {
        width: 120px;
        height: 90px;
    }
    
    .result-skin-card .result-name {
        font-size: 16px;
    }
    
    .result-buttons {
        gap: 12px;
    }
    
    .result-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .result-btn .btn-icon {
        font-size: 14px;
    }
    
    .cinematic-title h3 {
        font-size: 18px;
    }
}