/* ============================================
   MATCH SCREEN STYLES - MODERN & PROFESSIONAL
   ============================================ */

.match-screen {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease-out;
}

.match-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--gradient-accent);
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    padding: 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.match-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(233, 69, 96, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.team-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.team-name-large {
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.score {
    font-size: 48px;
    font-weight: 900;
    color: var(--highlight-color);
    text-shadow: 
        0 2px 4px rgba(233, 69, 96, 0.5),
        0 0 20px rgba(233, 69, 96, 0.3);
    letter-spacing: 2px;
    line-height: 1;
    transition: var(--transition-base);
}

.score.updated {
    animation: scoreUpdate 0.5s ease-out;
}

@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.match-time {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-light);
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
    min-width: 80px;
    text-align: center;
}

.match-field {
    background: var(--card-bg);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 30, 62, 0.8) 100%);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    justify-content: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

#field-canvas {
    border: 3px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #2d5016 0%, #1a3d0a 100%);
    box-shadow: 
        inset 0 0 50px rgba(0, 0, 0, 0.3),
        var(--shadow-lg);
    max-width: 100%;
    height: auto;
}

.match-events {
    background: var(--card-bg);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 30, 62, 0.8) 100%);
    border-radius: var(--radius-xl);
    padding: 18px;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.match-events::-webkit-scrollbar {
    width: 6px;
}

.match-events::-webkit-scrollbar-thumb {
    background: var(--highlight-color);
    border-radius: var(--radius-full);
}

.event-item {
    padding: 12px 16px;
    background: var(--secondary-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-base);
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.event-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

.event-success {
    border-left-color: var(--success-color);
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.event-danger {
    border-left-color: var(--danger-color);
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.event-info {
    border-left-color: var(--info-color);
    color: var(--info-color);
    background: rgba(59, 130, 246, 0.1);
}

.match-progress {
    background: var(--card-bg);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 30, 62, 0.8) 100%);
    border-radius: var(--radius-xl);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--secondary-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    background: linear-gradient(90deg, var(--highlight-color) 0%, #d6335a 100%);
    transition: width 0.5s ease-out;
    border-radius: var(--radius-full);
    box-shadow: 
        0 0 10px rgba(233, 69, 96, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   MATCH RESULT
   ============================================ */

.match-result {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    animation: fadeIn 0.5s ease-out;
}

.result-card {
    background: var(--card-bg);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 30, 62, 0.9) 100%);
    border-radius: var(--radius-xl);
    padding: 48px 32px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.result-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 32px;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.final-score {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin: 40px 0;
}

.score-large {
    font-size: 64px;
    font-weight: 900;
    color: var(--highlight-color);
    text-shadow: 
        0 4px 8px rgba(233, 69, 96, 0.5),
        0 0 30px rgba(233, 69, 96, 0.3);
    letter-spacing: 4px;
    line-height: 1;
    animation: scorePulse 0.6s ease-out;
}

@keyframes scorePulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.vs-large {
    font-size: 32px;
    color: var(--text-secondary);
    font-weight: 700;
}

.result-text {
    font-size: 24px;
    font-weight: 800;
    margin: 28px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeIn 0.5s ease-out 0.3s both;
}

.result-win {
    color: var(--success-color);
    text-shadow: 0 2px 4px rgba(16, 185, 129, 0.5);
}

.result-draw {
    color: var(--warning-color);
    text-shadow: 0 2px 4px rgba(245, 158, 11, 0.5);
}

.result-loss {
    color: var(--danger-color);
    text-shadow: 0 2px 4px rgba(239, 68, 68, 0.5);
}

.rewards {
    margin: 32px 0;
    padding: 24px;
    background: var(--gradient-accent);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    padding: 12px 0;
    color: var(--text-primary);
}

.reward-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.reward-item span:last-child {
    color: var(--highlight-color);
    font-size: 20px;
    text-shadow: 0 1px 2px rgba(233, 69, 96, 0.3);
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--card-bg);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 30, 62, 0.95) 100%);
    border-radius: var(--radius-xl);
    padding: 28px;
    max-width: 90%;
    max-height: 85%;
    overflow-y: auto;
    width: 100%;
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease-out;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--highlight-color);
    border-radius: var(--radius-full);
}

/* ============================================
   COIN PACKAGE
   ============================================ */

.coin-package {
    background: var(--card-bg);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 30, 62, 0.8) 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition-base);
    cursor: pointer;
}

.coin-package:hover {
    border-color: var(--highlight-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .match-header {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .score {
        font-size: 36px;
    }
    
    .score-large {
        font-size: 48px;
    }
    
    .result-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .match-header {
        padding: 16px;
    }
    
    .team-score {
        width: 100%;
    }
    
    .score {
        font-size: 32px;
    }
    
    .score-large {
        font-size: 40px;
    }
    
    .final-score {
        gap: 16px;
    }
}
