/* ====================================================
   URBot Changelog — Dark Theme Timeline
   ==================================================== */

:root {
    --cl-bg: #0a0a1a;
    --cl-bg-card: #12122a;
    --cl-bg-card-hover: #1a1a3a;
    --cl-border: rgba(255, 255, 255, 0.08);
    --cl-text: #e2e8f0;
    --cl-text-dim: #94a3b8;
    --cl-text-muted: #64748b;
    --cl-accent: #6366f1;
    --cl-green: #10b981;
    --cl-cyan: #06b6d4;
    --cl-yellow: #f59e0b;
    --cl-red: #ef4444;
    --cl-font: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --cl-timeline-width: 2px;
    --cl-dot-size: 14px;
    --cl-card-radius: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--cl-bg);
    color: var(--cl-text);
    font-family: var(--cl-font);
    min-height: 100vh;
    line-height: 1.6;
}

/* ---- Header ---- */
.cl-header {
    text-align: center;
    padding: 2.5rem 1.5rem 2rem;
    border-bottom: 1px solid var(--cl-border);
    max-width: 900px;
    margin: 0 auto;
}

.cl-back-link {
    display: inline-block;
    color: var(--cl-accent);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    transition: opacity 0.2s;
}

.cl-back-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.cl-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.cl-subtitle {
    color: var(--cl-text-dim);
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.cl-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cl-stat {
    text-align: center;
}

.cl-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cl-accent);
}

.cl-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--cl-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Timeline Container ---- */
.cl-timeline-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.cl-timeline {
    position: relative;
    padding-left: 60px;
}

.cl-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: var(--cl-timeline-width);
    background: linear-gradient(180deg, var(--cl-accent) 0%, rgba(99, 102, 241, 0.2) 100%);
}

/* ---- Version Entry ---- */
.cl-entry {
    position: relative;
    margin-bottom: 2rem;
}

/* Timeline dot */
.cl-entry::before {
    content: '';
    position: absolute;
    left: -43px;
    top: 22px;
    width: var(--cl-dot-size);
    height: var(--cl-dot-size);
    border-radius: 50%;
    background: var(--cl-bg);
    border: 3px solid var(--cl-accent);
    z-index: 1;
}

.cl-entry.cl-latest::before {
    background: var(--cl-accent);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

/* Date marker */
.cl-date-marker {
    position: absolute;
    left: -60px;
    top: 44px;
    width: 48px;
    text-align: right;
    transform: translateX(-100%);
}

.cl-date-month {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--cl-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.cl-date-day {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cl-text);
    line-height: 1.2;
}

/* Card */
.cl-card {
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-card-radius);
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}

.cl-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: var(--cl-bg-card-hover);
}

/* Card header (clickable) */
.cl-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    flex-wrap: wrap;
}

.cl-card-header:hover .cl-version-title {
    color: #fff;
}

/* Version badge */
.cl-version-badge {
    display: inline-block;
    background: var(--cl-accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Version title */
.cl-version-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cl-text);
    transition: color 0.15s;
    flex: 1;
    min-width: 0;
}

/* Latest badge */
.cl-latest-badge {
    display: inline-block;
    background: var(--cl-green);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Collapse chevron */
.cl-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    color: var(--cl-text-muted);
}

.cl-entry.cl-expanded .cl-chevron {
    transform: rotate(180deg);
}

/* Date (inline, visible on mobile) */
.cl-inline-date {
    display: none;
    font-size: 0.78rem;
    color: var(--cl-text-muted);
    width: 100%;
    margin-top: 2px;
}

/* Card body (collapsible) */
.cl-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.cl-entry.cl-expanded .cl-card-body {
    max-height: 2000px;
}

.cl-card-body-inner {
    padding: 0 20px 16px;
    border-top: 1px solid var(--cl-border);
}

/* Change list */
.cl-changes {
    list-style: none;
    padding: 12px 0 0;
}

.cl-change-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.88rem;
    color: var(--cl-text-dim);
    line-height: 1.5;
}

/* Change type badges */
.cl-change-type {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 3px;
}

.cl-type-added {
    background: rgba(16, 185, 129, 0.15);
    color: var(--cl-green);
}

.cl-type-improved {
    background: rgba(6, 182, 212, 0.15);
    color: var(--cl-cyan);
}

.cl-type-fixed {
    background: rgba(245, 158, 11, 0.15);
    color: var(--cl-yellow);
}

.cl-type-security {
    background: rgba(239, 68, 68, 0.15);
    color: var(--cl-red);
}

.cl-change-text {
    flex: 1;
    min-width: 0;
}

/* ---- Footer ---- */
.cl-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--cl-border);
    color: var(--cl-text-muted);
    font-size: 0.8rem;
    max-width: 900px;
    margin: 0 auto;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .cl-header h1 {
        font-size: 1.5rem;
    }

    .cl-stats {
        gap: 1.25rem;
    }

    .cl-stat-value {
        font-size: 1.2rem;
    }

    .cl-timeline {
        padding-left: 0;
    }

    .cl-timeline::before {
        display: none;
    }

    .cl-entry::before {
        display: none;
    }

    .cl-date-marker {
        display: none;
    }

    .cl-inline-date {
        display: block;
    }

    .cl-entry {
        margin-bottom: 1.25rem;
    }

    .cl-card-header {
        padding: 14px 16px;
    }

    .cl-card-body-inner {
        padding: 0 16px 14px;
    }

    .cl-version-title {
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {
    .cl-header {
        padding: 2rem 1rem 1.5rem;
    }

    .cl-timeline-container {
        padding: 1.25rem 1rem;
    }

    .cl-card-header {
        padding: 12px 14px;
        gap: 8px;
    }

    .cl-card-body-inner {
        padding: 0 14px 12px;
    }

    .cl-change-item {
        font-size: 0.82rem;
    }
}
