/* ============================================
   FUTBOLMINUTE - MAIN CSS MEJORADO
   Sistema de diseño profesional y moderno
   ============================================ */

/* Variables CSS Mejoradas */
:root {
    /* Colores principales - Paleta vibrante de fútbol */
    --primary-color: #00D856;
    --primary-dark: #00B847;
    --primary-light: #4AE884;
    --secondary-color: #1A1A2E;
    --secondary-light: #16213E;
    
    /* Colores de estado */
    --success-color: #00D856;
    --danger-color: #FF3E4E;
    --warning-color: #FFB800;
    --info-color: #0EA5E9;
    
    /* Colores de texto */
    --text-primary: #1A1A2E;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-inverse: #FFFFFF;
    
    /* Colores de fondo */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --bg-dark: #1A1A2E;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #F9FAFB 0%, #E5E7EB 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}
.timer-display {
    font-size: 5rem;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, #00D856 0%, #00B847 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1.5rem 0;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 4px 8px rgba(0, 216, 86, 0.3);
    padding: 1rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.timer-display::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 120px;
    background: rgba(0, 216, 86, 0.1);
    border-radius: 2rem;
    z-index: -1;
    border: 3px solid rgba(0, 216, 86, 0.3);
    box-shadow: 0 8px 24px rgba(0, 216, 86, 0.2);
}

@media (max-width: 768px) {
    .timer-display {
        font-size: 3.5rem;
        letter-spacing: 2px;
    }
    
    .timer-display::before {
        width: 250px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .timer-display {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }
    
    .timer-display::before {
        width: 200px;
        height: 80px;
    }
}

/* ============================================
   NAVBAR MODERNO
   ============================================ */

.navbar {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand img {
    height: 40px;
    transition: transform var(--transition-base);
}

.nav-brand img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xs);
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: rgba(0, 216, 86, 0.1);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--primary-color);
    transition: transform var(--transition-base);
}

.nav-menu a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
    min-height: calc(100vh - 200px);
    padding: var(--spacing-2xl) 0;
}

/* ============================================
   CARDS MEJORADAS
   ============================================ */

.card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 2px solid var(--bg-tertiary);
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.card-header h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-header h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-full);
}

/* ============================================
   FORMULARIOS MODERNOS
   ============================================ */

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.875rem var(--spacing-md);
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(0, 216, 86, 0.1);
}

.form-control:hover {
    border-color: var(--primary-light);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

/* ============================================
   BOTONES MODERNOS
   ============================================ */

.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.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 var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #E11D48 100%);
    color: var(--text-inverse);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(255, 62, 78, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #F59E0B 100%);
    color: var(--text-primary);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #0284C7 100%);
    color: var(--text-inverse);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 2px solid var(--bg-tertiary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-light);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   TABLAS MODERNAS
   ============================================ */

.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-primary);
}

.table th,
.table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--bg-tertiary);
}

.table th {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--text-inverse);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.table th:last-child {
    border-top-right-radius: var(--radius-lg);
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
    transform: scale(1.01);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   PLAYER CARDS
   ============================================ */

.player-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.player-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.player-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 216, 86, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.player-card:hover::before {
    opacity: 1;
}

.player-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.player-photo {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-full);
    object-fit: cover;
    margin: 0 auto var(--spacing-md);
    border: 4px solid var(--primary-color);
    box-shadow: 0 8px 16px -4px rgba(0, 216, 86, 0.3);
    transition: all var(--transition-base);
}

.player-card:hover .player-photo {
    transform: scale(1.05);
    box-shadow: 0 12px 24px -4px rgba(0, 216, 86, 0.4);
}

.player-info {
    margin-bottom: var(--spacing-md);
}

.player-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.player-alias {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.stat-item {
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.stat-item:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.stat-item strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
}

.player-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

/* ============================================
   ALERTS MODERNOS
   ============================================ */

.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(0, 216, 86, 0.1);
    border-left: 4px solid var(--success-color);
    color: #065F46;
}

.alert-error {
    background: rgba(255, 62, 78, 0.1);
    border-left: 4px solid var(--danger-color);
    color: #991B1B;
}

.alert-warning {
    background: rgba(255, 184, 0, 0.1);
    border-left: 4px solid var(--warning-color);
    color: #92400E;
}

.alert-info {
    background: rgba(14, 165, 233, 0.1);
    border-left: 4px solid var(--info-color);
    color: #075985;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-box {
    background: var(--bg-primary);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.login-box h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 800;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--text-inverse);
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: var(--primary-light);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.gap-1 {
    gap: var(--spacing-md);
}

/* Badges y Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(0, 216, 86, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(255, 62, 78, 0.1);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(255, 184, 0, 0.1);
    color: var(--warning-color);
}

.badge-info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--info-color);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Animaciones globales */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-base);
}

.slide-in-up {
    animation: slideInUp var(--transition-base);
}

/* Tarjetas de estadísticas */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.stat-card p {
    font-size: 1rem;
    margin: var(--spacing-sm) 0 0 0;
    opacity: 0.9;
    font-weight: 500;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .player-list {
        grid-template-columns: 1fr;
    }
}
/* Asegurar que los emojis se muestren correctamente */
.timeline-event,
.event-content,
.match-player-stats {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}
/* ========================================
   MODAL DE SUSTITUCIÓN
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
}

.substitution-info {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.substitution-info p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.substitution-info strong {
    color: #2c3e50;
}

#substitute-select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-top: 0.5rem;
    transition: border-color 0.2s;
}

#substitute-select:focus {
    outline: none;
    border-color: #667eea;
}

.modal-footer {
    padding: 1.5rem;
    background-color: #f8f9fa;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-footer .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.modal-footer .btn-secondary:hover {
    background-color: #5a6268;
}

.modal-footer .btn-primary {
    background-color: #667eea;
    color: white;
}

.modal-footer .btn-primary:hover {
    background-color: #5568d3;
}

.modal-footer .btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
/* ============================================
   TOGGLE DE VISTAS MEJORADO
   ============================================ */

.view-toggle-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.view-toggle {
    background: white;
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    position: relative;
    border: 2px solid #e5e7eb;
}

.view-btn {
    padding: 0.875rem 2rem;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    min-width: 160px;
    justify-content: center;
}

.view-btn .view-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.view-btn .view-text {
    font-weight: 600;
}

.view-btn:hover:not(.active) {
    color: #00D856 !important;
}

.view-btn:hover:not(.active) .view-icon {
    transform: scale(1.2);
}

.view-btn.active {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.view-btn.active .view-icon,
.view-btn.active .view-text {
    color: white !important;
    position: relative;
    z-index: 3;
}

.toggle-slider {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: calc(50% - 0.5rem);
    height: calc(100% - 1rem);
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    opacity: 0;
}

/* Plantilla activo = verde */
.view-btn[data-view="list"].active {
    background: linear-gradient(135deg, #00D856 0%, #00B847 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 216, 86, 0.3);
}

.view-btn[data-view="list"].active .view-icon,
.view-btn[data-view="list"].active .view-text {
    color: white !important;
}

/* Partido activo = azul */
.view-btn[data-view="field"].active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.view-btn[data-view="field"].active .view-icon,
.view-btn[data-view="field"].active .view-text {
    color: white !important;
}

/* Botones inactivos */
.view-btn:not(.active) {
    background: transparent !important;
    color: #6b7280 !important;
}

.view-btn:not(.active):hover {
    color: #1a1a2e !important;
    background: rgba(0, 0, 0, 0.05) !important;
}
.view-btn.active ~ .toggle-slider,
.view-btn[data-view="field"].active ~ .toggle-slider {
    transform: translateX(100%);
}

@media (max-width: 768px) {
    .view-toggle {
        width: 100%;
        flex-direction: column;
        padding: 0.375rem;
    }
    
    .view-btn {
        width: 100%;
        min-width: auto;
        padding: 0.75rem 1.5rem;
    }
    
    .toggle-slider {
        width: calc(100% - 0.75rem);
        height: calc(50% - 0.375rem);
    }
    
    .view-btn[data-view="field"].active ~ .toggle-slider {
        transform: translateY(100%);
    }
}
/* ============================================
   TOGGLE DE VISTAS MEJORADO
   ============================================ */

.view-toggle-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.view-toggle {
    background: white;
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    position: relative;
    border: 2px solid #e5e7eb;
}

.view-btn {
    padding: 0.875rem 2rem;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    min-width: 160px;
    justify-content: center;
}

.view-btn .view-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.view-btn .view-text {
    font-weight: 600;
}

.view-btn:hover:not(.active) {
    color: #00D856;
}

.view-btn:hover:not(.active) .view-icon {
    transform: scale(1.2);
}

.view-btn.active {
    color: white;
}

.toggle-slider {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: calc(50% - 0.5rem);
    height: calc(100% - 1rem);
    background: linear-gradient(135deg, #00D856 0%, #00B847 100%);
    border-radius: 0.75rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 216, 86, 0.3);
    z-index: 1;
}

.view-btn.active ~ .toggle-slider,
.view-btn[data-view="field"].active ~ .toggle-slider {
    transform: translateX(100%);
}

@media (max-width: 768px) {
    .view-toggle {
        width: 100%;
        flex-direction: column;
        padding: 0.375rem;
    }
    
    .view-btn {
        width: 100%;
        min-width: auto;
        padding: 0.75rem 1.5rem;
    }
    
    .toggle-slider {
        width: calc(100% - 0.75rem);
        height: calc(50% - 0.375rem);
    }
    
    .view-btn[data-view="field"].active ~ .toggle-slider {
        transform: translateY(100%);
    }
}
/* ============================================
   MARCADOR DEL PARTIDO
   ============================================ */

.match-scoreboard {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border: 2px solid #e5e7eb;
}

.scoreboard-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 2.5rem 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.scoreboard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00D856 0%, #3498db 50%, #00D856 100%);
}

.team-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 150px;
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.score-display {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: white;
    text-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #00D856 0%, #3498db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-separator {
    font-size: 4rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 1rem;
}

.rival-goals-control {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
    border: 2px solid #dee2e6;
}

.rival-goals-control h4 {
    margin: 0 0 1rem 0;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rival-goal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.rival-goal-buttons .btn {
    min-width: 140px;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.rival-goal-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .scoreboard-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
    }
    
    .team-name {
        font-size: 1rem;
    }
    
    .score-display {
        font-size: 4rem;
    }
    
    .score-separator {
        font-size: 3rem;
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
    
    .rival-goal-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .rival-goal-buttons .btn {
        width: 100%;
    }
}
/* ============================================
   IMÁGENES DE TARJETAS
   ============================================ */

.card-icon {
    width: 16px;
    height: 20px;
    vertical-align: middle;
    display: inline-block;
    margin-right: 2px;
}

.card-icon-btn {
    width: 20px;
    height: 26px;
    display: inline-block;
    vertical-align: middle;
}

.card-icon-menu {
    width: 18px;
    height: 24px;
    vertical-align: middle;
    margin-right: 6px;
    display: inline-block;
}

/* En la vista de campo */
#field-view .card-icon {
    width: 14px;
    height: 18px;
}
/* ============================================
   TIMELINE / CRONOLOGÍA DEL PARTIDO
   ============================================ */

.timeline-section {
    margin: 2rem 0;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #00D856;
}

.timeline-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1A1A2E;
    margin: 0;
}

.timeline-container {
    position: relative;
    padding-left: 3rem;
    min-height: 200px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #00D856 0%, #00B847 50%, #00D856 100%);
    border-radius: 2px;
    z-index: 1;
}

.timeline-event {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: transparent;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #00D856;
    transition: all 0.3s ease;
}
.card .timeline-event {
    background: white;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -3.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 4px solid #00D856;
    box-shadow: 0 0 0 4px rgba(0,216,86,0.1);
    z-index: 2;
}
.timeline-event:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(0,216,86,0.2);
}

.timeline-event.event-goal {
    border-left-color: #00D856;
    background: linear-gradient(to right, rgba(0,216,86,0.05), white);
}

.timeline-event.event-goal::before {
    border-color: #00D856;
    background: #00D856;
}

.timeline-event.event-rival-goal {
    border-left-color: #FF3E4E;
    background: linear-gradient(to right, rgba(255,62,78,0.05), white);
}

.timeline-event.event-rival-goal::before {
    border-color: #FF3E4E;
    background: #FF3E4E;
}

.timeline-event.event-yellow {
    border-left-color: #FFB800;
    background: linear-gradient(to right, rgba(255,184,0,0.05), white);
}

.timeline-event.event-yellow::before {
    border-color: #FFB800;
    background: #FFB800;
}

.timeline-event.event-red {
    border-left-color: #FF3E4E;
    background: linear-gradient(to right, rgba(255,62,78,0.05), white);
}

.timeline-event.event-red::before {
    border-color: #FF3E4E;
    background: #FF3E4E;
}

.timeline-event.event-substitution {
    border-left-color: #0EA5E9;
    background: linear-gradient(to right, rgba(14,165,233,0.05), white);
}

.timeline-event.event-substitution::before {
    border-color: #0EA5E9;
    background: #0EA5E9;
}

.timeline-event.event-note {
    border-left-color: #9B59B6;
    background: linear-gradient(to right, rgba(155,89,182,0.05), white);
}

.timeline-event.event-note::before {
    border-color: #9B59B6;
    background: #9B59B6;
}

.timeline-event.event-period-start {
    border-left-color: #00D856;
    background: linear-gradient(to right, rgba(0,216,86,0.15), white);
    font-weight: bold;
}

.timeline-event.event-period-start::before {
    border-color: #00D856;
    background: #00D856;
}

.timeline-event.event-period-end {
    border-left-color: #FF3E4E;
    background: linear-gradient(to right, rgba(255,62,78,0.15), white);
    font-weight: bold;
}

.timeline-event.event-period-end::before {
    border-color: #FF3E4E;
    background: #FF3E4E;
}

.event-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.event-icon {
    font-size: 2rem;
    line-height: 1;
}

.event-minute {
    font-weight: 800;
    font-size: 1.25rem;
    color: #00D856;
    min-width: 50px;
    background: rgba(0,216,86,0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
}

.event-description {
    flex: 1;
    min-width: 200px;
}

.event-description strong {
    color: #1A1A2E;
    font-weight: 700;
}

.event-description span {
    color: #6B7280;
}

.empty-timeline {
    text-align: center;
    padding: 3rem;
    color: #9CA3AF;
}

.period-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
    animation: fadeIn 0.5s ease-in;
}

.match-final-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    animation: fadeIn 0.5s ease-in;
}

@media (max-width: 768px) {
    .timeline-container {
        padding-left: 2rem;
    }
    
    .timeline-event {
        padding: 1rem;
    }
}
.result-banner {
    background: linear-gradient(135deg, <?php echo $resultColor; ?> 0%, <?php echo $resultColor; ?>dd 100%);
    color: white;
    padding: 3rem;
    text-align: center;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.result-banner h1 {
    font-size: 3rem;
    margin: 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scoreboard {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.score-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    margin: 2rem 0;
}

.team-section {
    text-align: center;
    flex: 1;
    max-width: 250px;
}

.team-shield {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 1rem;
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1A1A2E;
}

.score {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
}

.score-separator {
    font-size: 4rem;
    color: #E5E7EB;
    font-weight: 300;
}

.match-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 2px solid #F3F4F6;
    color: #6B7280;
}

.match-info p {
    margin: 0.5rem 0;
}

.timeline-section {
    margin: 3rem 0;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #00D856;
}

.timeline-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1A1A2E;
    margin: 0;
}

.timeline-container {
    position: relative;
    padding-left: 3rem;
    min-height: 200px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #00D856 0%, #00B847 50%, #00D856 100%);
    border-radius: 2px;
    z-index: 1;
}

.timeline-event {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #00D856;
    transition: all 0.3s ease;
}

.timeline-event:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(0,216,86,0.2);
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -3.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 4px solid #00D856;
    box-shadow: 0 0 0 4px rgba(0,216,86,0.1);
    z-index: 2;
}

.timeline-event.event-goal::before {
    border-color: #00D856;
    background: #00D856;
}

.timeline-event.event-rival-goal::before {
    border-color: #FF3E4E;
    background: #FF3E4E;
}

.timeline-event.event-yellow::before,
.timeline-event.event-yellow_card::before {
    border-color: #FFB800;
    background: #FFB800;
}

.timeline-event.event-red::before,
.timeline-event.event-red_card::before {
    border-color: #FF3E4E;
    background: #FF3E4E;
}

.timeline-event.event-substitution::before {
    border-color: #0EA5E9;
    background: #0EA5E9;
}

.timeline-event.event-note::before {
    border-color: #9B59B6;
    background: #9B59B6;
}

.timeline-event.event-period-start::before,
.timeline-event.event-period_start::before {
    border-color: #00D856;
    background: #00D856;
}

.timeline-event.event-period-end::before,
.timeline-event.event-period_end::before {
    border-color: #FF3E4E;
    background: #FF3E4E;
}

.timeline-event.event-goal {
    border-left-color: #00D856;
    background: linear-gradient(to right, rgba(0,216,86,0.05), white);
}

.timeline-event.event-goal::before {
    border-color: #00D856;
    background: #00D856;
}

.timeline-event.event-rival-goal {
    border-left-color: #FF3E4E;
    background: linear-gradient(to right, rgba(255,62,78,0.05), white);
}

.timeline-event.event-rival-goal::before {
    border-color: #FF3E4E;
    background: #FF3E4E;
}

.timeline-event.event-yellow {
    border-left-color: #FFB800;
    background: linear-gradient(to right, rgba(255,184,0,0.05), white);
}

.timeline-event.event-yellow::before {
    border-color: #FFB800;
    background: #FFB800;
}

.timeline-event.event-red {
    border-left-color: #FF3E4E;
    background: linear-gradient(to right, rgba(255,62,78,0.05), white);
}

.timeline-event.event-red::before {
    border-color: #FF3E4E;
    background: #FF3E4E;
}

.timeline-event.event-substitution {
    border-left-color: #0EA5E9;
    background: linear-gradient(to right, rgba(14,165,233,0.05), white);
}

.timeline-event.event-substitution::before {
    border-color: #0EA5E9;
    background: #0EA5E9;
}

.timeline-event.event-note {
    border-left-color: #9B59B6;
    background: linear-gradient(to right, rgba(155,89,182,0.05), white);
}

.timeline-event.event-note::before {
    border-color: #9B59B6;
    background: #9B59B6;
}

.timeline-event.event-period-start {
    border-left-color: #00D856;
    background: linear-gradient(to right, rgba(0,216,86,0.15), white);
    font-weight: bold;
}

.timeline-event.event-period-start::before {
    border-color: #00D856;
    background: #00D856;
}

.timeline-event.event-period-end {
    border-left-color: #FF3E4E;
    background: linear-gradient(to right, rgba(255,62,78,0.15), white);
    font-weight: bold;
}

.timeline-event.event-period-end::before {
    border-color: #FF3E4E;
    background: #FF3E4E;
}

.event-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.event-icon {
    font-size: 2rem;
    line-height: 1;
}

.event-minute {
    font-weight: 800;
    font-size: 1.25rem;
    color: #00D856;
    min-width: 50px;
    background: rgba(0,216,86,0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
}

.event-description {
    flex: 1;
    min-width: 200px;
}

.event-description strong {
    color: #1A1A2E;
    font-weight: 700;
}

.event-description span {
    color: #6B7280;
}

.event-note-text {
    display: block;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(155,89,182,0.1);
    border-radius: 0.5rem;
    font-style: italic;
    color: #333;
    border-left: 3px solid #9B59B6;
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: White;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: #6B7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.empty-timeline {
    text-align: center;
    padding: 3rem;
    color: #9CA3AF;
}

.empty-timeline-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.period-summary {
    animation: fadeIn 0.5s ease-in;
}

.match-final-summary {
    animation: fadeIn 0.5s ease-in;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .score-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .result-banner h1 {
        font-size: 2rem;
    }
    
    .score {
        font-size: 3.5rem;
    }
    
    .timeline-container {
        padding-left: 2rem;
    }
    
    .timeline-event {
        padding: 1rem;
    }
}

@media print {
    .navbar, .footer, .btn { 
        display: none !important; 
    }
    
    .card {
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .timeline-event {
        page-break-inside: avoid;
    }
}