/* ===== Modern Benchmarks Page Redesign ===== */

/* Hero Section */
.benchmarks-hero {
    position: relative;
    padding: 10rem 0 8rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
    color: white;
    overflow: hidden;
}

.benchmarks-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    z-index: 0;
}

.benchmarks-hero .container {
    position: relative;
    z-index: 1;
}

.benchmarks-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.benchmarks-hero .hero-subtitle {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.benchmarks-hero .hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.benchmarks-hero .hero-title .highlight {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.benchmarks-hero .hero-description {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.benchmarks-hero .hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.benchmarks-hero .hero-visual {
    max-width: 900px;
    margin: 4rem auto 0;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.benchmark-chart-container {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(139, 92, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.benchmark-chart-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.benchmark-chart-container canvas {
    position: relative;
    z-index: 1;
    height: 350px !important;
}

/* Benchmark Categories */
.benchmark-category {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.benchmark-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

.benchmark-header {
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.benchmark-header h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.benchmark-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.08);
    padding: 0.375rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.benchmark-tab {
    padding: 0.625rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.benchmark-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.benchmark-tab:hover {
    color: #8b5cf6;
}

.benchmark-tab.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.benchmark-tab.active::before {
    opacity: 1;
}

.benchmark-content {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.benchmark-chart {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
    border-radius: 16px;
    padding: 2rem;
    height: 450px;
    position: relative;
    border: 1px solid rgba(139, 92, 246, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.benchmark-chart:hover {
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.12);
    transform: translateY(-2px);
}

.benchmark-chart.hidden {
    display: none;
}

.benchmark-chart canvas {
    max-height: 100%;
}

.benchmark-stats {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 0 4px 4px 0;
}

.stat-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.stat-value {
    font-size: 2.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.stat-value small {
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-label {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.stat-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

/* Game Benchmark Section */
.game-benchmark {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.6) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.08);
    backdrop-filter: blur(10px);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.game-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.game-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.2);
    transition: transform 0.3s ease;
}

.game-logo:hover {
    transform: scale(1.05);
}

.game-info h4 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: var(--dark);
}

.game-specs {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.game-specs i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.game-selector select {
    padding: 0.75rem 2rem 0.75rem 1.25rem;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.game-selector select:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.game-selector select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.game-settings {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.setting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    background: #fff;
    font-size: 0.875rem;
    color: var(--dark);
    cursor: pointer;
}

.game-charts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.game-chart {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.1);
    min-height: 280px;
    max-height: 350px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-chart:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.game-chart h5 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--dark);
    text-align: center;
    flex-shrink: 0;
}

.game-chart canvas {
    flex: 1;
    max-height: 280px !important;
    width: 100% !important;
    height: auto !important;
}

.game-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.game-stats .stat {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-stats .stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    display: inline-block;
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Test Setup Section */
.test-setup {
    margin-top: 5rem;
}

.test-setup h3 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.setup-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.setup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
}

.setup-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.3);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.4);
}

.setup-card h4 {
    margin: 0 0 1.5rem;
    color: #a78bfa;
    font-size: 1.25rem;
    font-weight: 600;
}

.setup-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.setup-card li {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: flex-start;
}

.setup-card li:before {
    content: '•';
    color: #8b5cf6;
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

.setup-card li strong {
    color: rgba(255, 255, 255, 0.9);
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 24px;
    padding: 4rem 2.5rem;
    color: white;
    text-align: center;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
}

.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.cta-box > * {
    position: relative;
    z-index: 1;
}

.cta-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cta-content p {
    font-size: 1.25rem;
    margin: 0 0 2.5rem;
    opacity: 0.95;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .benchmark-content {
        grid-template-columns: 1fr;
    }
    
    .game-charts {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .game-chart {
        min-height: 200px;
        max-height: 300px;
    }
    
    .game-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .benchmarks-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .benchmark-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .benchmark-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .game-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .game-settings {
        width: 100%;
    }
    
    .game-charts {
        grid-template-columns: 1fr;
    }
    
    .game-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .benchmarks-hero .hero-title {
        font-size: 2rem;
    }
    
    .benchmark-stats {
        grid-template-columns: 1fr;
    }
    
    .game-stats {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.benchmark-category {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.benchmark-category:nth-child(2) { animation-delay: 0.15s; }
.benchmark-category:nth-child(3) { animation-delay: 0.3s; }
.benchmark-category:nth-child(4) { animation-delay: 0.45s; }

.stat-card {
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

/* Chart.js Overrides */
.chart-legend {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray);
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 0.5rem;
}

/* Tooltip Styles */
.chart-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: var(--border-radius) !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
    box-shadow: var(--shadow-lg) !important;
    backdrop-filter: blur(4px);
}

.chart-tooltip .label {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.chart-tooltip .value {
    color: var(--primary);
    font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Print Styles */
@media print {
    .header, .footer, .cta-box, .benchmark-tabs, .game-settings {
        display: none !important;
    }
    
    .benchmark-chart {
        height: 300px;
        page-break-inside: avoid;
    }
    
    .benchmark-category {
        page-break-inside: avoid;
    }
}
