/* --- RESULTS PAGE STYLES --- */

/* Hero Section (Reused from other pages, customized) */
.hero-results {
    background: linear-gradient(rgba(5, 24, 47, 0.85), rgba(5, 24, 47, 0.9)), url('../images/hero-bg.jpg'); /* Fallback image */
    background-size: cover;
    background-position: center;
    color: white;
    padding: 160px 0 80px;
    text-align: center;
}

/* Latest Results Grid */
.latest-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.result-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid #eee;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.result-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-header .match-date {
    color: var(--highlight);
}

.result-body {
    padding: 25px;
}

.match-score-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.team-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 35%;
    text-align: center;
}

.team-logo-circle {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.team-name {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.2;
    color: var(--primary);
}

.score-box {
    background: #f8fafc;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

.match-details-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.match-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #e0f2fe;
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 5px;
}

/* History Table Section */
.history-section {
    padding-top: 40px;
}

.history-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.history-table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.history-table th {
    background: var(--primary);
    color: white;
    padding: 18px 25px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-table td {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    color: var(--text-main);
    vertical-align: middle;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr:hover {
    background-color: #f8fafc;
}

.result-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.result-win { background-color: #10b981; } /* Green */
.result-draw { background-color: #f59e0b; } /* Orange */
.result-loss { background-color: #ef4444; } /* Red */

.score-cell {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.opponent-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.opponent-logo-sm {
    width: 30px;
    height: 30px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #888;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    color: var(--text-main);
    transition: 0.3s;
    cursor: pointer;
}

.page-btn:hover, .page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .match-score-display {
        flex-direction: column;
        gap: 15px;
    }
    
    .team-display {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        text-align: left;
    }
    
    .team-logo-circle {
        margin-bottom: 0;
    }
    
    .score-box {
        width: 100%;
        text-align: center;
        font-size: 2rem;
    }
}
