/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --card-bg: rgba(30, 41, 59, 0.5);
    --border-color: rgba(148, 163, 184, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: var(--primary-color);
    border-radius: 0.25rem;
    color: white;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 90%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.hero-stats {
    display: flex;
    gap: 4rem;
    justify-content: center;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Section Styles */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about {
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Leaderboard Section */
.leaderboard {
    background: var(--darker-bg);
}

/* Version Selector */
.version-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.version-nav-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.version-nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.version-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.version-display {
    min-width: 200px;
    text-align: center;
}

.current-version {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Table Container */
.table-container {
    overflow-x: auto;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table thead {
    background: rgba(99, 102, 241, 0.1);
}

.results-table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: none;
}

.results-table th.sortable {
    transition: background-color 0.3s ease;
}

.results-table th.sortable:hover {
    background-color: rgba(99, 102, 241, 0.2);
}

.sort-indicator {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

.sortable.sort-asc .sort-indicator::after {
    content: '▲';
    color: var(--primary-color);
}

.sortable.sort-desc .sort-indicator::after {
    content: '▼';
    color: var(--primary-color);
}

.results-table td {
    padding: 1.25rem 1rem;
    border-top: 1px solid var(--border-color);
}

.results-table tbody tr {
    transition: all 0.3s ease;
}

.results-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #e89f5b);
    color: #000;
}

.rank-number {
    font-weight: 600;
    color: var(--text-muted);
}

.model-name {
    font-weight: 600;
    color: var(--text-primary);
}

.score {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary-color);
}

.error-message {
    text-align: center;
    padding: 2rem !important;
    color: var(--error);
}

/* Methodology Section */
.methodology {
    background: var(--dark-bg);
}

.methodology-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.method-step {
    position: relative;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.method-step:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.step-number {
    position: absolute;
    top: -1rem;
    left: 2rem;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
}

.method-step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-top: 2rem;
}

.method-step p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* Contact Section */
.contact {
    background: linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-card {
    padding: 3rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.contact-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.contact-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
    flex-grow: 1;
}

.contact-card .btn {
    align-self: center;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--dark-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }

    .nav-links.active {
        max-height: 500px;
        opacity: 1;
        display: flex;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .version-selector {
        flex-direction: column;
        gap: 1rem;
    }

    .version-nav-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .results-table {
        font-size: 0.9rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .hero-stats {
        gap: 1rem;
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .features-grid,
    .methodology-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .feature-card,
    .method-step,
    .contact-card {
        padding: 1.5rem;
    }

    .results-table {
        font-size: 0.8rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.5rem 0.25rem;
    }

    .contact-card h3 {
        font-size: 1.25rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
