:root {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --primary: #3b82f6;
    --accent: #10b981;
    --future-glow: #8b5cf6;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline-wrapper {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.era-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid #334155;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.era-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.era-card.current {
    border: 2px solid var(--accent);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.era-card.future {
    border: 2px dashed var(--future-glow);
}

.card-header {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.03);
}

.era-name {
    margin: 0;
    font-size: 1.4rem;
    text-align: left;
    flex: 1;
}

.year {
    font-family: monospace;
    background: #000;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--accent);
    margin-right: 20px;
}

.card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    background: #161e2e;
    text-align: left; /* Strict left alignment */
}

.era-card.expanded .card-content {
    max-height: 1000px; /* Large enough to fit content */
    padding: 30px;
    border-top: 1px solid #334155;
}

.grid-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.info-block h3 {
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    border-bottom: 1px solid #334155;
    padding-bottom: 5px;
}

.info-block p, .info-block li {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.info-block ul {
    padding-left: 20px;
    margin: 0;
}

/* Responsive Grid */
@media (max-width: 600px) {
    .grid-section {
        grid-template-columns: 1fr;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
.card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #334155;
    text-align: left;
}

.details-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.details-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Page transition feel */
.details-body {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}