/* ========================================
   SPORTS BLOCK PUZZLE - TEMAS DEPORTIVOS
   ======================================== */

/* Combo Display */
.combo-display {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
    animation: comboPulse 0.5s ease infinite;
}

.combo-display.animate {
    animation: comboAppear 0.3s ease, comboPulse 0.5s ease infinite 0.3s;
}

@keyframes comboAppear {
    from {
        transform: scale(0) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes comboPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Timer Display */
.timer-display {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.timer-display.urgent {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: timerUrgent 0.5s ease infinite;
}

@keyframes timerUrgent {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Mensaje Especial (GOOOL, SWOOSH, etc.) */
.special-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 64px;
    font-weight: 900;
    color: #fff;
    text-shadow: 
        4px 4px 0 #000,
        -4px -4px 0 #000,
        4px -4px 0 #000,
        -4px 4px 0 #000,
        0 0 20px rgba(255, 255, 255, 0.8);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.special-message.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Línea Pura */
.cell.pure-line {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pureLine 0.6s ease;
}

@keyframes pureLine {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.2);
        filter: brightness(1.5);
    }
}

/* ========================================
   TEMAS DEPORTIVOS
   ======================================== */

/* Tema Mixto (Default) */
body.theme-mixed {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Tema Fútbol */
body.theme-soccer {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

body.theme-soccer .game-container {
    background: rgba(255, 255, 255, 0.98);
}

body.theme-soccer .game-board {
    background: 
        linear-gradient(90deg, transparent 0%, transparent calc(12.5% - 1px), rgba(255, 255, 255, 0.3) calc(12.5% - 1px), rgba(255, 255, 255, 0.3) 12.5%),
        linear-gradient(0deg, transparent 0%, transparent calc(12.5% - 1px), rgba(255, 255, 255, 0.3) calc(12.5% - 1px), rgba(255, 255, 255, 0.3) 12.5%),
        repeating-linear-gradient(
            90deg,
            #2ecc71 0px,
            #27ae60 10%,
            #2ecc71 20%
        );
}

body.theme-soccer .score-container,
body.theme-soccer .best-score-container {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

/* Tema Basketball */
body.theme-basketball {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

body.theme-basketball .game-board {
    background: 
        linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.2) 45%, rgba(255, 255, 255, 0.2) 55%, transparent 55%),
        linear-gradient(0deg, transparent 45%, rgba(255, 255, 255, 0.2) 45%, rgba(255, 255, 255, 0.2) 55%, transparent 55%),
        linear-gradient(135deg, #d35400 0%, #e67e22 100%);
}

body.theme-basketball .score-container,
body.theme-basketball .best-score-container {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

/* Tema Voleibol */
body.theme-volleyball {
    background: linear-gradient(135deg, #f9ca24 0%, #f0932b 100%);
}

body.theme-volleyball .game-board {
    background: 
        linear-gradient(0deg, transparent 48%, rgba(255, 255, 255, 0.8) 48%, rgba(255, 255, 255, 0.8) 52%, transparent 52%),
        repeating-linear-gradient(
            90deg,
            #f9ca24 0px,
            #f0932b 20px,
            #f9ca24 40px
        );
}

body.theme-volleyball .score-container,
body.theme-volleyball .best-score-container {
    background: linear-gradient(135deg, #f9ca24 0%, #f0932b 100%);
}

/* Tema Tenis */
body.theme-tennis {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

body.theme-tennis .game-board {
    background: 
        linear-gradient(0deg, transparent 48%, white 48%, white 49%, transparent 49%),
        linear-gradient(90deg, transparent 48%, white 48%, white 49%, transparent 49%),
        repeating-linear-gradient(
            45deg,
            #00b894 0px,
            #00cec9 20px
        );
}

body.theme-tennis .score-container,
body.theme-tennis .best-score-container {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

/* Tema Béisbol */
body.theme-baseball {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

body.theme-baseball .game-board {
    background: 
        radial-gradient(circle at 50% 50%, transparent 30%, rgba(255, 255, 255, 0.2) 30%, rgba(255, 255, 255, 0.2) 31%, transparent 31%),
        linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

body.theme-baseball .score-container,
body.theme-baseball .best-score-container {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

/* Tema Fútbol Americano */
body.theme-football {
    background: linear-gradient(135deg, #d63031 0%, #ff7675 100%);
}

body.theme-football .game-board {
    background: 
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent calc(12.5% - 1px),
            white calc(12.5% - 1px),
            white 12.5%
        ),
        linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

body.theme-football .score-container,
body.theme-football .best-score-container {
    background: linear-gradient(135deg, #d63031 0%, #ff7675 100%);
}

/* Selector de Temas */
.theme-selector {
    max-width: 98% !important;
    width: 98% !important;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.theme-card {
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.theme-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.theme-card.active {
    border-color: #f093fb;
    background: rgba(240, 147, 251, 0.2);
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.5);
}

.theme-emoji {
    font-size: 48px;
    margin-bottom: 10px;
}

.theme-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.btn-theme {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
}

.btn-close-theme {
    margin-top: 15px;
    background: linear-gradient(135deg, #b2bec3 0%, #636e72 100%);
}

/* Responsive para temas */
@media (max-width: 480px) {
    .theme-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .theme-emoji {
        font-size: 36px;
    }
    
    .theme-name {
        font-size: 11px;
    }
    
    .special-message {
        font-size: 48px;
    }
}
