:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --accent-color: #2c5bf0; /* Strong legible blue */
    --timeline-line: #e5e5e5;
    --border-color: #dddddd;

    /* Model Family Colors - Slightly muted for print-like feel */
    --color-openai: #10a37f;
    --color-anthropic: #d97757;
    --color-google: #4285f4;
    --color-meta: #0668e1;
    --color-alibaba: #ff6a00;
    --color-deepseek: #4e80ee;
    --color-zhipu: #3478f6;
    --color-minimax: #d93025;
    --color-moonshot: #14b8a6; /* Teal for Moonshot */
    --color-xai: #333333; /* Dark grey for xAI instead of white/black */
}

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

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: 40px 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

header {
    margin-bottom: 60px;
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
}

h1 {
    font-family: Georgia, "Times New Roman", serif; /* Serif for headings */
    font-size: 3rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.2rem;
    color: #555;
    font-weight: 400;
    max-width: 600px;
}

footer {
    margin-top: 60px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    color: #777;
    font-size: 0.9rem;
}

/* Timeline Component Styles */
llm-timeline {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    padding-bottom: 40px;
}

.timeline-wrapper {
    position: relative;
    min-width: 1000px;
    height: auto; /* Allow height to fit content */
}

.timeline-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.grid-line-y {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px solid var(--timeline-line); /* Solid thin lines */
}

.grid-label-y {
    position: absolute;
    bottom: -30px;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #888;
    background: #fff;
    padding: 0 4px;
    font-family:
        "SF Mono", "Monaco", monospace; /* Monospace for data/numbers */
}

.model-row {
    position: relative;
    height: 50px; /* Tighter rows */
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0; /* Very subtle separation */
}

.model-family-label {
    position: sticky;
    left: 0;
    font-weight: 600;
    font-size: 0.85rem;
    width: 120px;
    color: #000;
    z-index: 10;
    text-shadow:
        -2px -2px 0 #fff,
        2px -2px 0 #fff,
        -2px 2px 0 #fff,
        2px 2px 0 #fff,
        0px 2px 0 #fff,
        2px 0px 0 #fff,
        0px -2px 0 #fff,
        -2px 0px 0 #fff;
}

.model-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s ease-out;
    z-index: 5;
}

.model-node:hover {
    transform: translateY(-2px); /* Slight lift */
    z-index: 20;
}

.node-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-color);
    /* No shadow, clean flat look */
    margin-bottom: 6px;
    box-sizing: border-box;
}

.node-dot.estimated {
    background-color: transparent !important;
    border: 2px dashed var(--accent-color);
}

.node-label {
    font-size: 0.75rem;
    color: #333;
    white-space: nowrap;
    background: #fff;
    padding: 1px 4px;
    /* Outline for legibility over lines */
    box-shadow: 0 0 0 2px #fff;
    font-weight: 500;
}

.node-label.estimated {
    color: #888;
    font-style: italic;
}

.node-year-marker {
    font-family: "SF Mono", "Monaco", monospace;
    font-size: 0.7rem;
    color: #999;
}

/* Details Page Specifics */
.back-link {
    display: inline-block;
    margin-bottom: 40px;
    color: #444;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 2px;
}

.back-link:hover {
    color: #000;
    border-bottom-color: #000;
}

.details-content {
    max-width: 700px;
}

.model-title {
    font-size: 3.5rem;
    font-family: Georgia, "Times New Roman", serif;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.1;
}

.model-meta {
    font-family: "SF Mono", "Monaco", monospace;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 40px;
    border-top: 2px solid #000;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    display: flex;
    gap: 40px;
}

.meta-item strong {
    color: #000;
    font-weight: 600;
    margin-right: 10px;
}

.model-description {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #222;
}

/* Tooltip - Simple and clean */
.tooltip {
    position: absolute;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px; /* Slight roundness */
    font-size: 0.8rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, system-ui, sans-serif;
}

.tooltip.visible {
    opacity: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #ddd;
    width: 90%;
    max-width: 450px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.close-btn {
    color: #999;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

#modal-title {
    margin-bottom: 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
}

#modal-date {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

#modal-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: opacity 0.2s;
}

#modal-link:hover {
    opacity: 0.9;
}
