@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --timeline-line-color: #e5e7eb;
    --decade-label-bg: #f4f4f5;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Category buttons */
.category-btn {
    color: #52525b;
    background-color: #f4f4f5;
    transition: all 0.2s ease;
}

.category-btn:hover {
    color: #18181b;
    background-color: #e4e4e7;
}

.category-btn.active {
    color: #ffffff;
    background-color: #18181b;
}

.categories-scroll {
    scrollbar-width: thin;
    scrollbar-color: #e4e4e7 transparent;
}

.categories-scroll::-webkit-scrollbar {
    height: 6px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background-color: #e4e4e7;
    border-radius: 6px;
}

/* Timeline styles */
.timeline-wrapper {
    position: relative;
}

.timeline-container {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #e4e4e7 transparent;
    padding-bottom: 1rem;
}

.timeline-container::-webkit-scrollbar {
    height: 6px;
}

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

.timeline-container::-webkit-scrollbar-thumb {
    background-color: #e4e4e7;
    border-radius: 6px;
}

.timeline {
    position: relative;
    display: flex;
    min-width: max-content;
}

/* Timeline middle line */
.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--timeline-line-color);
    z-index: 1;
}

/* Decades */
.timeline-decade {
    position: relative;
    padding: 0 20px;
    min-width: 240px;
}

.decade-label {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--decade-label-bg);
    color: #71717a;
    padding: 4px 12px;
    border-radius: 16px;
    position: relative;
    z-index: 2;
    width: fit-content;
    margin: 0 auto;
    margin-bottom: 20px;
}

.decade-events {
    position: relative;
    min-height: 360px;
}

/* Timeline nodes */
.timeline-node {
    position: absolute;
    left: 50%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.timeline-node.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-node:nth-child(odd) {
    top: 0;
}

.timeline-node:nth-child(even) {
    bottom: 0;
}

.node-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.timeline-node:nth-child(odd) .node-dot {
    bottom: -5px;
    top: auto;
}

.timeline-node:nth-child(even) .node-dot {
    top: -5px;
}

.node-content {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    width: 240px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.2s ease;
}

.timeline-node:nth-child(odd) .node-content {
    margin-bottom: 25px;
}

.timeline-node:nth-child(even) .node-content {
    margin-top: 25px;
}

.node-content:hover {
    transform: translateX(-50%) translateY(-8px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 10;
}

.timeline-node:nth-child(even) .node-content:hover {
    transform: translateX(-50%) translateY(8px) scale(1.03);
}

.node-year {
    font-size: 0.75rem;
    font-weight: 600;
    color: #71717a;
    margin-bottom: 4px;
}

.node-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #18181b;
    margin-bottom: 4px;
    line-height: 1.25;
}

.node-desc {
    font-size: 0.8125rem;
    color: #52525b;
    line-height: 1.4;
}

/* Legend animation */
.legend-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease-out;
}

.legend-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Modal styles */
.modal {
    transition: opacity 0.15s ease;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Font styles for monospace text */
.font-geist-mono {
    font-family: monospace;
    letter-spacing: -0.03em;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .node-content {
        width: 180px;
    }

    .timeline-decade {
        min-width: 200px;
    }
}

@media (max-width: 640px) {
    .timeline-wrapper {
        padding: 1rem;
    }
}

/* Zoom controls styling */
.timeline-controls {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: white;
}
