/* Head to Head Page Specific Styles */

/* Override scores page main layout */
.scores-main {
    min-height: calc(100vh - 14.4vh);
    padding: 40px 20px 0 20px;
    background: #1a1a1a;
}

.scores-container {
    max-width: 1400px;
    margin: 0 auto;
}

.scores-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.scores-header h1 {
    font-size: 36px;
    color: #EA6020;
    margin: 0;
    font-weight: bold;
}

.scores-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #444444;
    background: #2a2a2a;
    color: #ffffff;
    font-size: 14px;
    min-width: 150px;
    transition: border-color 0.3s ease;
    border-radius: 4px;
}

.filter-select:focus {
    outline: none;
    border-color: #EA6020;
}

.vs-text {
    color: #EA6020;
    font-weight: bold;
    font-size: 18px;
    padding: 0 15px;
    align-self: center;
}

/* Compare Button */
.compare-btn {
    background: linear-gradient(45deg, #EA6020, #F49B6A);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-transform: uppercase;
}

.compare-btn:hover {
    background: linear-gradient(45deg, #F49B6A, #EA6020);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(234, 96, 32, 0.3);
}

.compare-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Hide the scores content sections until we show results */
.scores-content {
    display: none;
}

/* NFL Style Head-to-Head Card */
.h2h-main-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid #EA6020;
    border-radius: 15px;
    margin: 30px 0;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(234, 96, 32, 0.2);
    position: relative;
}

.corps-matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 40px;
    background: linear-gradient(135deg, rgba(234, 96, 32, 0.1) 0%, rgba(26, 26, 26, 0.9) 100%);
    position: relative;
    min-height: 200px;
}

.corps-side {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    z-index: 1;
}

.corps-left {
    justify-content: flex-start;
}

.corps-right {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.corps-logo-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #EA6020;
    box-shadow: 
        0 8px 32px rgba(234, 96, 32, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.corps-logo-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.corps-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    z-index: 1;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.corps-info {
    text-align: center;
}

.corps-name {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.corps-record {
    font-size: 18px;
    color: #EA6020;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.matchup-center {
    text-align: center;
    flex: 0 0 350px;
    z-index: 1;
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid rgba(234, 96, 32, 0.3);
    backdrop-filter: blur(10px);
}

.h2h-title {
    font-size: 32px;
    font-weight: bold;
    color: #EA6020;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
}

.matchup-stats {
    background: linear-gradient(135deg, rgba(234, 96, 32, 0.2), rgba(0, 0, 0, 0.4));
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #EA6020;
}

.games-played {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.win-loss-record {
    font-size: 36px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(234, 96, 32, 0.5);
}

/* Comparative Stats Section - NFL Style */
.comparative-stats {
    background: linear-gradient(135deg, #333333 0%, #2a2a2a 100%);
    border-top: 2px solid #EA6020;
    padding: 0;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 200px 1fr;
    align-items: center;
    padding: 25px 40px;
    border-bottom: 1px solid rgba(234, 96, 32, 0.2);
    transition: background-color 0.3s ease;
}

.stat-row:hover {
    background: rgba(234, 96, 32, 0.05);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #EA6020;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px;
    background: rgba(234, 96, 32, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(234, 96, 32, 0.3);
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.stat-value.left {
    text-align: left;
    color: #F49B6A;
}

.stat-value.right {
    text-align: right;
    color: #F49B6A;
}

.stat-value.center {
    text-align: center;
    grid-column: 2;
    color: #EA6020;
    font-size: 24px;
}

/* Special styling for center-only rows */
.stat-row:has(.stat-value.center:only-of-type) {
    grid-template-columns: 1fr;
    text-align: center;
}

.stat-row:has(.stat-value.center:only-of-type) .stat-label {
    margin-bottom: 10px;
}

/* Charts Section */
.charts-section {
    margin: 40px 0;
}

.chart-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #EA6020;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(234, 96, 32, 0.2);
}

.chart-card h3 {
    color: #EA6020;
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.chart-container {
    position: relative;
    height: 450px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(42, 42, 42, 0.8));
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(234, 96, 32, 0.3);
}

.chart-container canvas {
    max-height: 100%;
}

/* History Section */
.history-section {
    margin: 40px 0;
}

.history-section h3 {
    color: #EA6020;
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Show the scores content when we have results */
.comparison-results .scores-content {
    display: block;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #EA6020;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(234, 96, 32, 0.2);
}

/* Style the history table */
.scores-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: transparent;
}

.scores-table th {
    background: linear-gradient(135deg, #EA6020, #F49B6A);
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #333;
}

.scores-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(234, 96, 32, 0.2);
    color: #ffffff;
}

.scores-table tbody tr:hover {
    background: rgba(234, 96, 32, 0.1);
}

/* Winner highlighting in table */
.winner-row {
    background: rgba(234, 96, 32, 0.15) !important;
}

.winner-cell {
    color: #EA6020 !important;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .corps-matchup {
        flex-direction: column;
        gap: 40px;
        text-align: center;
        padding: 40px 30px;
    }
    
    .corps-side {
        justify-content: center;
        flex-direction: row;
        width: 100%;
    }
    
    .corps-right {
        flex-direction: row;
    }
    
    .matchup-center {
        flex: none;
        width: 100%;
        max-width: 400px;
    }
    
    .stat-row {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    
    .stat-label {
        order: 1;
        margin-bottom: 10px;
    }
    
    .stat-value {
        order: 2;
        text-align: center !important;
        font-size: 24px;
    }
    
    .stat-value.center {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .scores-filters {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: auto;
        width: 100%;
    }
    
    .vs-text {
        display: none;
    }
    
    .corps-matchup {
        padding: 30px 20px;
    }
    
    .corps-logo-container {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }
    
    .corps-logo {
        width: 70px;
        height: 70px;
    }
    
    .corps-name {
        font-size: 20px;
    }
    
    .corps-record {
        font-size: 16px;
    }
    
    .h2h-title {
        font-size: 24px;
    }
    
    .win-loss-record {
        font-size: 28px;
    }
    
    .matchup-center {
        padding: 20px;
    }
    
    .comparative-stats {
        padding: 0;
    }
    
    .stat-row {
        padding: 15px;
    }
    
    .stat-label {
        font-size: 12px;
        padding: 8px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .chart-card h3,
    .history-section h3 {
        font-size: 20px;
    }
}

/* Loading state */
.comparison-loading {
    text-align: center;
    padding: 60px 20px;
    color: #cccccc;
}

.comparison-loading i {
    font-size: 48px;
    color: #EA6020;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Empty state */
.comparison-empty {
    text-align: center;
    padding: 80px 20px;
    color: #666666;
}

.comparison-empty i {
    font-size: 64px;
    color: #444444;
    margin-bottom: 20px;
}

.comparison-empty h3 {
    color: #cccccc;
    margin-bottom: 10px;
}

.comparison-empty p {
    color: #888888;
    font-size: 16px;
}

/* History Section Styles */
.history-main {
    min-height: calc(100vh - 14.4vh);
    padding: 40px 20px;
    background: #1a1a1a;
}

.history-main .scores-content {
    display: block !important;
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.history-main .scores-table-container {
    overflow-x: auto;
    max-height: calc(60vh - 25px);
    overflow-y: auto;
}

/* Custom scrollbar for history table container */
.history-main .scores-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.history-main .scores-table-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.history-main .scores-table-container::-webkit-scrollbar-thumb {
    background: #EA6020;
    border-radius: 4px;
}

.history-main .scores-table-container::-webkit-scrollbar-thumb:hover {
    background: #F49B6A;
}

.history-main .scores-table-container::-webkit-scrollbar-corner {
    background: #1a1a1a;
}

.history-main .scores-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.history-main .scores-table th {
    background: #333;
    color: #EA6020;
    padding: 15px 12px;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid #EA6020;
    position: sticky;
    top: 0;
    z-index: 10;
}

.history-main .scores-table td {
    padding: 12px;
    border-bottom: 1px solid #444;
    color: #ffffff;
    text-align: center;
}

.history-main .scores-table tr:hover {
    background: #333;
}

/* History table column widths */
.history-main .scores-table {
    table-layout: fixed; /* Ensure fixed table layout for proper width control */
}

.history-main .scores-table th:nth-child(1),
.history-main .scores-table td:nth-child(1) {
    width: 13%; /* Date */
}

.history-main .scores-table th:nth-child(2),
.history-main .scores-table td:nth-child(2) {
    width: 34%; /* Event - increased from 21% to 34% (gained the 13% from Year) */
}

.history-main .scores-table th:nth-child(3),
.history-main .scores-table td:nth-child(3) {
    width: 20%; /* Corps 1 */
}

.history-main .scores-table th:nth-child(4),
.history-main .scores-table td:nth-child(4) {
    width: 20%; /* Corps 2 */
}

.history-main .scores-table th:nth-child(5),
.history-main .scores-table td:nth-child(5) {
    width: 13%; /* Margin */
}

.history-main .scores-table th:nth-child(6),
.history-main .scores-table td:nth-child(6) {
    width: 20%; /* Winner */
}

.history-main .winner-cell {
    font-weight: bold;
    color: #4CAF50;
}

.history-main .search-input {
    padding: 12px 16px;
    border: 2px solid #444444;
    background: #2a2a2a;
    color: #ffffff;
    font-size: 14px;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.history-main .search-input:focus {
    outline: none;
    border-color: #EA6020;
}

/* Pagination styles for history */
.scores-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.pagination-btn {
    background: #EA6020;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
    background: #F49B6A;
}

.pagination-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-info {
    color: #ccc;
    font-size: 14px;
    font-weight: 600;
}

/* Active navigation state */
.nav-button.active {
    color: #EA6020;
    background: linear-gradient(to right, #F49B6A, #EA6020);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.nav-button.active::after {
    transform: scaleX(1);
}
