/* ===== TEMA FÚTBOL 7 ===== */
:root {
    --futbol7-primary: #1e8449;
    --futbol7-accent: #f39c12;
    --futbol7-local: #e74c3c;
    --futbol7-visitor: #3498db;
    --futbol7-success: #27ae60;
    --futbol7-warning: #f1c40f;
    --futbol7-error: #c0392b;
    --futbol7-info: #2980b9;
}

body.theme-futbol-siete {
    background: linear-gradient(135deg, #1e8449, #27ae60, #f39c12);
    color: white;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 10px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

body.theme-futbol-siete .container {
    width: 100%;
    max-width: 800px;
}

/* CABECERA ESPECÍFICA PARA FÚTBOL 7 */
.clock-container-futbol-siete {
    background: rgba(30, 132, 73, 0.8) !important;
    border: 2px solid var(--futbol7-accent);
}

.game-rules-futbol-siete {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 10px 0;
    border-left: 4px solid var(--futbol7-accent);
}

/* TIMER SECTION */
.timer-section {
    text-align: center;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--futbol7-accent);
}

.main-timer {
    font-size: 5rem;
    font-weight: bold;
    text-align: center;
    color: var(--futbol7-accent);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(243, 156, 18, 0.6);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-timer {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--futbol7-primary);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-timer:hover {
    transform: scale(1.1);
    background: var(--futbol7-accent);
}

.btn-reset {
    background: var(--futbol7-error);
}

.btn-next {
    background: var(--futbol7-success);
}

/* SCOREBOARD */
.scoreboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.team {
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.team:hover {
    transform: translateY(-5px);
}

.team-local { 
    background: linear-gradient(135deg, var(--futbol7-local), #c0392b);
    border: 3px solid var(--futbol7-local);
}

.team-visitor { 
    background: linear-gradient(135deg, var(--futbol7-visitor), #2980b9);
    border: 3px solid var(--futbol7-visitor);
}

.team-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    cursor: pointer;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.team-name:hover {
    background: rgba(0, 0, 0, 0.4);
}

.score {
    font-size: 6rem;
    font-weight: 800;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    margin: 20px 0;
    font-family: 'Arial Black', sans-serif;
}

.score-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.btn-score {
    width: 70px;
    height: 70px;
    font-size: 2.5rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: bold;
}

.btn-score.add {
    background: var(--futbol7-success);
    color: white;
}

.btn-score.sub {
    background: var(--futbol7-error);
    color: white;
}

.btn-score:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-score:active {
    transform: scale(0.95);
}

/* TEAM STATS */
.team-stats {
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.stat-counter {
    font-size: 1.8rem;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    margin: 0 10px;
}

.correction-buttons {
    display: flex;
    gap: 5px;
}

.btn-stat {
    background: var(--futbol7-primary);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-stat.add {
    background: var(--futbol7-success);
}

.btn-stat.remove {
    background: var(--futbol7-error);
}

.btn-stat:hover:not(:disabled) {
    opacity: 0.9;
    transform: scale(1.05);
}

.btn-stat:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* CARD BUTTONS */
.card-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.btn-card {
    font-size: 1.8rem;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    flex: 1;
}

.btn-card.yellow {
    background: #f1c40f;
    color: #000;
}

.btn-card.red {
    background: #e74c3c;
    color: white;
}

.btn-card:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-card:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ESTADÍSTICAS AVANZADAS */
.advanced-stats {
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
}

.advanced-stats h3 {
    color: var(--futbol7-accent);
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card h4 {
    color: var(--futbol7-accent);
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.stat-values {
    display: flex;
    justify-content: space-between;
}

.stat-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-value span {
    font-size: 2rem;
    font-weight: bold;
    min-width: 40px;
}

.btn-stat-small {
    background: var(--futbol7-primary);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.btn-stat-small:hover {
    background: var(--futbol7-accent);
    transform: scale(1.1);
}

/* EVENTS SECTION */
.events-section {
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
}

.events-section h3 {
    color: var(--futbol7-accent);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.events-list {
    max-height: 250px;
    overflow-y: auto;
    background: #1e1e1e;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-item {
    border-bottom: 1px solid #333;
    padding: 10px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-item:last-child {
    border-bottom: none;
}

.event-time {
    color: var(--futbol7-accent);
    font-weight: bold;
    min-width: 70px;
}

.event-desc {
    flex: 1;
}

.empty-events {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* HISTORY SECTION */
.history {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
}

.history h2 {
    color: var(--futbol7-accent);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    background: #1e1e1e;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--futbol7-accent);
}

.history-teams {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.winner-badge {
    background: var(--futbol7-success);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: normal;
}

.draw-badge {
    background: var(--futbol7-warning);
    color: #000;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: normal;
}

.history-score {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--futbol7-accent);
    margin: 10px 0;
    text-align: center;
}

.history-info {
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.empty-history {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-history i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* EXPORT CONTROLS */
.export-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ACTION FOOTER */
.action-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.btn-action {
    padding: 15px 30px;
    border-radius: 10px;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
}

.btn-action.save {
    background: var(--futbol7-primary);
    color: white;
}

.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* NOTIFICACIONES - SUPERIOR DERECHA */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 350px;
    animation: slideInRight 0.3s ease forwards;
}

.notification.show {
    display: flex;
}

.notification.success {
    background: var(--futbol7-success);
    color: white;
    border-left: 5px solid #2ecc71;
}

.notification.warning {
    background: var(--futbol7-warning);
    color: black;
    border-left: 5px solid #e67e22;
}

.notification.error {
    background: var(--futbol7-error);
    color: white;
    border-left: 5px solid #e74c3c;
}

.notification.info {
    background: var(--futbol7-info);
    color: white;
    border-left: 5px solid #2980b9;
}

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

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

/* BOTÓN FLOTANTE PWA */
.floating-pwa-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: none; /* Oculto por defecto */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9997;
    transition: all 0.3s ease;
}

.floating-pwa-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .scoreboard {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .main-timer {
        font-size: 3.5rem;
    }
    
    .score {
        font-size: 4.5rem;
    }
    
    .btn-action {
        min-width: 160px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .timer-controls {
        gap: 10px;
    }
    
    .btn-timer {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .export-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .team-stats {
        padding: 10px;
    }
    
    .stat-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .correction-buttons {
        justify-content: center;
    }
    
    .card-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-card {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .main-timer {
        font-size: 2.8rem;
    }
    
    .score {
        font-size: 3.5rem;
    }
    
    .team-name {
        font-size: 1.2rem;
    }
    
    .btn-score {
        width: 55px;
        height: 55px;
        font-size: 2rem;
    }
    
    .action-footer {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-action {
        width: 100%;
        max-width: 300px;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}
