:root {
    --team-gold: #FFD700;
    --team-black: #0b0b0b;
    --team-red: #D32F2F;
    --text-inactive: #999999;
    --text-light: #f5f5f5;
    --glass-bg: rgba(30, 30, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --modal-bg: rgba(20, 20, 20, 0.95);

    /* REVISED GEOMETRY */
    --circle-size: 800px;
    --max-size: 95vw;
}

body {
    margin: 0;
    background-color: var(--team-black);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    height: 100vh;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
}

.timeline-container {
    position: fixed;
    top: -650px;
    left: 50%;
    transform: translateX(-50%);
    width: var(--circle-size);
    height: var(--circle-size);
    max-width: var(--max-size);
    max-height: var(--max-size);
    z-index: 1000;
    user-select: none;
    -webkit-user-select: none;
}

/* --- RINGS LAYOUT (RESTORED) --- */
.timeline-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    /* Aesthetics update */
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    z-index: 10;
    cursor: grab;
}

.timeline-ring:active {
    cursor: grabbing;
}

.inner-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 85%;
    height: 85%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    /* Aesthetics update */
    z-index: 20;
    cursor: grab;
}

.inner-ring:active {
    cursor: grabbing;
}

.inner-ring-content {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    pointer-events: none;
}

/* --- ITEMS -- */
.year-item,
.category-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    color: var(--text-inactive);
    /* Aesthetics update */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    pointer-events: auto;
}

.year-item {
    font-size: 1rem;
    padding: 10px;
}

.category-item {
    font-size: 0.8rem;
    padding: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.year-item:hover,
.category-item:hover {
    color: #ccc;
    opacity: 0.8;
}

/* Active States */
.year-item.active {
    color: var(--team-gold);
    font-size: 2.5rem;
    font-weight: 800;
    opacity: 1;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    z-index: 100;
}

.category-item.active {
    color: #fff;
    font-size: 1.1rem;
    letter-spacing: 2px;
    font-weight: 700;
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 100;
}

/* --- CENTER LOGO --- */
.center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    height: auto;
    z-index: 5;
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    border-radius: 50%;
}

/* --- INDICATORS --- */
.indicator {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 12px solid var(--team-gold);
    border-top: none;
    z-index: 1001;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    pointer-events: none;
}

.inner-arrow {
    bottom: 5px;
    border-bottom-color: #ffffff;
    border-bottom-width: 10px;
    border-bottom-style: solid;
    border-top: none;
    border-left-width: 8px;
    border-right-width: 8px;
}

/* --- CONTENT DISPLAY AREA (MODERNIZED) --- */
.content-area {
    position: absolute;
    top: 240px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    height: calc(100vh - 260px);
    text-align: center;
    color: var(--text-light);
    z-index: 50;
    padding: 24px 20px 40px;
    overflow-y: auto;
    --accent-color: var(--team-gold);
    --accent-glow: rgba(255, 215, 0, 0.35);
    font-family: 'Space Grotesk', 'Inter', sans-serif;

    /* Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

.content-area::-webkit-scrollbar {
    width: 6px;
}

.content-area::-webkit-scrollbar-track {
    background: transparent;
}

.content-area::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
}

.content-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.content-header::after {
    content: '';
    width: 140px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.7;
}

.header-kicker {
    font-size: 0.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #7c7c7c;
}

.header-title {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-year {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.header-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f0f0f0;
    font-weight: 700;
}

.header-meta {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #b7b7b7;
}

.content-body {
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
    background: transparent;
    /* Removing card bg to let nodes sit on page */
    backdrop-filter: none;
    padding: 0 2px 40px;
    border: none;
    box-shadow: none;
    min-height: 150px;
    position: relative;
}

/* --- MAIN VISUAL TIMELINE --- */
.main-timeline {
    position: relative;
    padding-left: 32px;
    margin-left: 8px;
}

/* The vertical line */
.main-timeline::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-color), rgba(255, 255, 255, 0));
    border-radius: 2px;
    box-shadow: 0 0 12px var(--accent-glow);
}

.main-timeline-item {
    position: relative;
    margin-bottom: 28px;
    padding-left: 32px;
    animation: fadeInItem 0.6s ease backwards;
    animation-delay: var(--item-delay, 0s);
}

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

/* The Node/Dot */
.main-time-node {
    position: absolute;
    left: -10px;
    top: 18px;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(11, 11, 11, 0.95), 0 0 12px var(--accent-glow);
    z-index: 2;
    transition: all 0.3s ease;
    color: var(--team-black);
    font-size: 0.65rem;
    font-weight: 800;
    display: grid;
    place-items: center;
}

/* Event Card */
.main-event-card {
    background: linear-gradient(145deg, rgba(28, 28, 28, 0.92), rgba(16, 16, 16, 0.96));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--accent-color);
    border-radius: 16px;
    padding: 18px 22px;
    color: #e9e9e9;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    display: grid;
    gap: 10px;
    overflow: hidden;
}

/* Connector Line (optional visual flair) */
.main-event-card::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 28px;
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    opacity: 0.5;
    pointer-events: none;
}

.main-event-card::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 70%;
    height: 160%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 70%);
    opacity: 0.7;
    pointer-events: none;
}

.main-event-card:hover {
    transform: translateY(-3px) translateX(6px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.main-event-card:hover::before {
    opacity: 0.9;
}

.main-timeline-item:hover .main-time-node {
    transform: scale(1.4);
    box-shadow: 0 0 0 4px rgba(11, 11, 11, 0.95), 0 0 18px var(--accent-glow);
}

.event-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
    width: fit-content;
}

.main-event-text {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.6;
    color: #ececec;
    white-space: pre-line;
}

/* Old list styles removed */

.empty-message {
    color: #b0b0b0;
    font-style: italic;
    text-align: center;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(10, 10, 10, 0.95));
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(15, 15, 15, 0.98));
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 45px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    width: 90%;
    max-width: 750px;
    border-radius: 24px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.7),
        0 0 1px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(40px) scale(0.92);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.close-button {
    color: #888;
    float: right;
    font-size: 36px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.close-button:hover {
    color: var(--team-gold);
    opacity: 1;
    transform: rotate(90deg);
}

.modal h2 {
    margin-top: 0;
    font-weight: 300;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, var(--team-gold), rgba(255, 215, 0, 0.1)) 1;
    padding-bottom: 25px;
    margin-bottom: 35px;
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.modal h2 strong {
    font-weight: 800;
    color: var(--team-gold);
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

/* Vertical Timeline in Modal */
.timeline-list {
    position: relative;
    max-height: 60vh;
    overflow-y: auto;
    padding-left: 30px;
    margin-top: 20px;
}

/* Modal Timeline Line */
.timeline-list::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 10px;
    bottom: 30px;
    width: 2px;
    background: linear-gradient(180deg, var(--team-gold), rgba(255, 215, 0, 0.1));
    border-radius: 2px;
}

.timeline-entry {
    margin-bottom: 45px;
    padding-left: 45px;
    position: relative;
    padding: 25px;
    margin-left: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.timeline-entry:hover {
    background: rgba(255, 215, 0, 0.08);
    border-color: var(--team-gold);
    transform: translateY(-2px);
}

/* Connector line from main vertical line to card */
.timeline-entry::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 30px;
    width: 20px;
    height: 1px;
    background: var(--team-gold);
    opacity: 0.4;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    /* Align with main vertical line */
    top: 26px;
    width: 14px;
    height: 14px;
    background: var(--team-black);
    border: 2px solid var(--team-gold);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.timeline-entry:hover .timeline-dot {
    background: var(--team-gold);
    box-shadow: 0 0 15px var(--team-gold);
    transform: scale(1.2);
}

.timeline-year-label {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--team-gold);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.timeline-cat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    font-weight: 700;
}

.timeline-text {
    color: #e0e0e0;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Year Marker for major timeline changes */
.timeline-year-marker {
    position: relative;
    margin-left: -50px;
    /* Pull out to line */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    color: var(--team-gold);
}

.timeline-year-marker span {
    background: var(--team-black);
    padding: 5px 10px;
    border: 1px solid var(--team-gold);
    border-radius: 4px;
    font-weight: bold;
    z-index: 5;
}

/* Scrollbar for modal */
.timeline-list::-webkit-scrollbar {
    width: 6px;
}

.timeline-list::-webkit-scrollbar-track {
    background: transparent;
}

.timeline-list::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 10px;
}

@media (max-width: 768px) {
    :root {
        --circle-size: 500px;
    }

    .timeline-container {
        top: -380px;
    }

    .year-item.active {
        font-size: 2rem;
    }

    .content-area {
        top: 180px;
        height: calc(100vh - 200px);
    }

    .header-year {
        font-size: 1.9rem;
    }

    .header-category {
        font-size: 0.72rem;
    }

    .main-event-card {
        padding: 16px 18px;
    }

    .main-event-text {
        font-size: 0.98rem;
    }

    .main-time-node {
        width: 18px;
        height: 18px;
        left: -9px;
        font-size: 0.6rem;
    }

    .center-logo {
        width: 25%;
    }
}

/* --- INSTRUCTIONS OVERLAY --- */
.instructions-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* Hide immediately if already seen - prevents flash on refresh */
html.instructions-seen .instructions-overlay {
    display: none !important;
}

.instructions-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.instructions-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 50px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.5s ease;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

.instructions-content h3 {
    color: var(--team-gold);
    font-size: 1.5rem;
    margin: 0 0 25px 0;
    font-weight: 700;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
    text-align: left;
}

.instruction-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.15);
    border-radius: 10px;
    flex-shrink: 0;
}

.instruction-item p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.4;
}

.instruction-item strong {
    color: var(--team-gold);
}

.dismiss-btn {
    background: var(--team-gold);
    color: var(--team-black);
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.dismiss-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* --- HELP BUTTON --- */
.help-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.help-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--team-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}
