:root {
    /* Color Palette */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #1a1f36;
    --text-secondary: #4a5568;
    --accent-cyan: #0891b2;
    --accent-purple: #7c3aed;
    --accent-pink: #db2777;
    --accent-yellow: #f59e0b;
    --border-color: rgba(124, 58, 237, 0.2);

    /* Quadrant Colors */
    --quad-auth-left: rgba(239, 68, 68, 0.15);
    --quad-auth-right: rgba(59, 130, 246, 0.15);
    --quad-lib-left: rgba(34, 197, 94, 0.15);
    --quad-lib-right: rgba(168, 85, 247, 0.15);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.8s ease-out;
}

.title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: var(--spacing-lg);
}

.description {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--spacing-lg);
    text-align: left;
}

.description p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.description ul {
    list-style: none;
    padding-left: 0;
}

.description li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: var(--spacing-lg);
}

.description li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: 600;
}

.description strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Section Styling */
section {
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.8s ease-out;
}

section h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Chart Section */
.chart-section {
    margin-bottom: var(--spacing-xl);
}

.chart-container {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: var(--spacing-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(124, 58, 237, 0.15);
}

#compassChart {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    padding: var(--spacing-sm);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.3);
}

.tooltip.active {
    opacity: 1;
}

.tooltip-title {
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}

.tooltip-data {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Data Table */
.table-container {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: var(--spacing-lg);
    overflow-x: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

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

thead {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(219, 39, 119, 0.1));
}

th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-purple);
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease, transform 0.2s ease;
}

tbody tr:hover {
    background: rgba(124, 58, 237, 0.08);
    transform: scale(1.01);
}

td {
    padding: var(--spacing-md);
    color: var(--text-secondary);
}

.model-name {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.model-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px currentColor;
}

/* Insights Section */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.insight-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--spacing-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(124, 58, 237, 0.2);
    border-color: var(--accent-purple);
}

.insight-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.insight-card h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.insight-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-xl) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-xl);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-sm);
    }

    .hero {
        padding: var(--spacing-lg) 0;
    }

    .title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
    }

    .description {
        padding: var(--spacing-md);
        font-size: 0.95rem;
    }

    .chart-container {
        padding: var(--spacing-sm);
    }

    .table-container {
        padding: var(--spacing-sm);
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    th,
    td {
        padding: var(--spacing-sm);
        font-size: 0.85rem;
    }

    .insights-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .insight-card {
        padding: var(--spacing-md);
    }

    .insight-icon {
        font-size: 2rem;
    }

    section h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    /* Better touch targets */
    tbody tr {
        min-height: 48px;
    }

    /* Tooltip adjustments for mobile */
    .tooltip {
        font-size: 0.85rem;
        padding: 8px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .description {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .description li {
        padding-left: 1.5rem;
    }

    .chart-container {
        padding: 0.5rem;
        border-radius: 12px;
    }

    .table-container {
        padding: 0.5rem;
        border-radius: 12px;
    }

    th,
    td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .insight-card {
        padding: 1rem;
    }

    .insight-card h3 {
        font-size: 1.1rem;
    }

    .insight-card p {
        font-size: 0.9rem;
    }

    footer {
        font-size: 0.8rem;
        padding: 1.5rem 0;
    }
}