/* Match Page Generator CSS v3.9 */
        
.match-page-premium {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8f9fa;
}

.match-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    margin-bottom: 30px;
}

.match-header-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.match-header-premium::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, -20px) rotate(360deg); }
}

/* Improved League Header */
.league-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.league-country, .league-name {
    font-size: 1.1em;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.league-flag-premium {
    font-size: 1.8em;
}

.match-title-premium {
    font-size: 1.8em;
    margin: 0;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: center;
    line-height: 1.2;
}

.teams-display-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    margin-top: 30px;
}

.team-card-premium {
    flex: 1;
    min-width: 220px;
    text-align: center;
    padding: 25px 15px;
    transition: transform 0.3s ease;
}

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

.team-logo-real img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.team-logo-real img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.team-logo-placeholder {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    margin: 0 auto 15px;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.team-name-premium {
    font-size: 1.4em;
    margin: 0;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.vs-section-premium {
    flex: 0 0 auto;
    padding: 0 30px;
    text-align: center;
}

.vs-text-premium {
    font-size: 3em;
    font-weight: 900;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.match-date-premium {
    font-size: 1.1em;
    opacity: 0.95;
    margin-bottom: 15px;
    font-weight: 500;
}

.match-date-premium i {
    margin-right: 8px;
}

.match-status-container {
    margin-top: 15px;
}

.match-status-premium {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 700;
    margin-top: 10px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

.status-upcoming {
    background: rgba(255,193,7,0.25);
    color: #ffc107;
    border-color: rgba(255,193,7,0.5);
}

.status-live {
    background: rgba(220,53,69,0.25);
    color: #dc3545;
    border-color: rgba(220,53,69,0.5);
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(220,53,69,0.7);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(220,53,69,0);
    }
}

.status-finished {
    background: rgba(40,167,69,0.25);
    color: #28a745;
    border-color: rgba(40,167,69,0.5);
}

.status-badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.status-upcoming .status-badge { 
    background: #ffc107; 
    box-shadow: 0 0 10px #ffc107;
}
.status-live .status-badge { 
    background: #dc3545; 
    box-shadow: 0 0 10px #dc3545;
}
.status-finished .status-badge { 
    background: #28a745; 
    box-shadow: 0 0 10px #28a745;
}

.countdown-timer {
    margin-top: 12px;
    font-size: 1em;
    font-weight: 700;
    color: #ffc107;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 1px 1px 2px rgba(0,0,0,0.3), 0 0 5px #ffc107; }
    to { text-shadow: 1px 1px 2px rgba(0,0,0,0.3), 0 0 10px #ffc107, 0 0 15px #ffc107; }
}

/* Enhanced Table of Contents */
.toc-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px 25px;
    border-bottom: 1px solid #dee2e6;
}

.toc-title {
    text-align: center;
    margin-bottom: 25px;
    color: #495057;
    font-size: 1.3em;
    font-weight: 600;
    position: relative;
}

.toc-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 10px auto 0;
    border-radius: 2px;
}

.toc-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1000px;
    margin: 0 auto;
    font-size: 0;
}

.toc-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    font-size: 16px;
}

.toc-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.toc-card:hover::before {
    left: 100%;
}

.toc-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: #007bff;
    border-color: #007bff;
}

.toc-icon {
    font-size: 2em;
    margin-bottom: 12px;
    color: #007bff;
    transition: all 0.3s ease;
}

.toc-card:hover .toc-icon {
    transform: scale(1.1);
    color: #0056b3;
}

.toc-text {
    font-size: 0.95em;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
}

.toc-container p {
    display: none !important;
}

/* Alternative grid layout for better control */
@media (min-width: 768px) {
    .toc-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
        font-size: 0;
    }
    
    .toc-card {
        font-size: 16px;
    }
}

/* Ensure no white space issues */
.toc-container > * {
    margin: 0;
    padding: 0;
}

/* Enhanced Analysis Sections */
.analysis-section-premium {
    padding: 40px 30px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.analysis-section-premium:nth-child(even) {
    background: #f8f9fa;
}

.analysis-content-premium {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 35px;
    border-radius: 15px;
    border-left: 6px solid #007bff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.analysis-content-premium::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #667eea);
}

.analysis-content-premium h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.4em;
    font-weight: 700;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 12px;
}

.analysis-content-premium p {
    line-height: 1.8;
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.05em;
    text-align: justify;
}

.analysis-content-premium strong {
    color: #2c3e50;
    font-weight: 700;
}

.analysis-content-premium ul {
    margin-bottom: 25px;
    padding-left: 25px;
}

.analysis-content-premium li {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #495057;
    position: relative;
    padding-left: 12px;
    font-size: 1.05em;
}

.analysis-content-premium li::before {
    content: "▶";
    color: #007bff;
    font-size: 0.8em;
    position: absolute;
    left: -18px;
    top: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .match-page-premium {
        padding: 10px;
    }
    
    .match-header-premium {
        padding: 25px 15px;
    }
    
    .league-details {
        gap: 8px;
    }
    
    .league-country, .league-name {
        font-size: 1em;
    }
    
    .match-title-premium {
        font-size: 1.5em;
    }
    
    .teams-display-premium {
        flex-direction: column;
    }
    
    .team-card-premium {
        min-width: 100%;
        margin-bottom: 20px;
    }
    
    .vs-section-premium {
        padding: 20px 0;
        order: -1;
    }
    
    .vs-text-premium {
        font-size: 2.5em;
    }
    
    .toc-container {
        grid-template-columns: 1fr;
    }
    
    .analysis-content-premium {
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {
    .match-container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .analysis-content-premium {
        padding: 20px 15px;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-container > * {
    animation: fadeInUp 0.6s ease-out;
}

.match-container > *:nth-child(1) { animation-delay: 0.1s; }
.match-container > *:nth-child(2) { animation-delay: 0.2s; }
.match-container > *:nth-child(3) { animation-delay: 0.3s; }
.match-container > *:nth-child(4) { animation-delay: 0.4s; }
.match-container > *:nth-child(5) { animation-delay: 0.5s; }
.match-container > *:nth-child(6) { animation-delay: 0.6s; }
