:root {
    --primary-color: #003366; /* Navy Blue */
    --secondary-color: #00509E; /* Lighter Blue */
    --accent-color: #FFD700; /* Gold */
    --text-color: #333333;
    --light-bg: #F5F7FA;
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.site-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

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

.main-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--white);
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Leaderboard Table */
.table-wrapper {
    overflow-x: auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--secondary-color);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

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

tr:hover {
    background-color: rgba(0, 80, 158, 0.05);
}

/* Rank Badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: bold;
    color: var(--white);
}

.rank-badge.gold {
    background-color: #FFD700;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.4);
}

.rank-badge.silver {
    background-color: #C0C0C0;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.4);
}

.rank-badge.bronze {
    background-color: #CD7F32;
    box-shadow: 0 2px 4px rgba(205, 127, 50, 0.4);
}

/* Calculation Section */
.calculation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.calc-block h3 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.formula-section {
    background-color: var(--white);
}

.formula-section h3 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.formula-note {
    background-color: #FFF9C4;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
    margin: 1rem 0;
    color: #5D4037;
}

.calculation-steps {
    list-style: none;
    margin-top: 1rem;
}

.calculation-steps li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.calculation-steps li:last-child {
    border-bottom: none;
}

.model-name {
    font-weight: bold;
    color: var(--primary-color);
    width: 100px;
}

.formula {
    font-family: 'Courier New', monospace;
    color: #555;
}

.final-rank {
    font-weight: bold;
    color: var(--secondary-color);
}

/* References */
.references-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reference-item {
    display: flex;
    gap: 1rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.reference-item:hover {
    transform: translateY(-2px);
}

.ref-number {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.ref-content p {
    margin-bottom: 0.5rem;
    color: #444;
}

.ref-link {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--secondary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.ref-link:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .calculation-grid {
        grid-template-columns: 1fr;
    }

    .calculation-steps li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}