/* ========================================
   Changelog Styles
   ======================================== */

.changelog-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.changelog-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 2rem;
}

.changelog-header-content {
    max-width: 900px;
    margin: 0 auto;
}

.changelog-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.changelog-header p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.back-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Main Content */
.changelog-main {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Release Cards */
.releases-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.release-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 1.5rem;
}

.release-card.prerelease {
    border-left: 4px solid #eab308;
}

.release-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.release-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.release-version {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.release-version a {
    color: inherit;
    text-decoration: none;
}

.release-version a:hover {
    color: var(--accent-primary);
}

.release-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.release-date {
    color: var(--text-secondary);
}

.release-title-text {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Prerelease Badge */
.prerelease-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #fef9c3;
    color: #854d0e;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Compare Link */
.compare-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.compare-link:hover {
    text-decoration: underline;
}

/* Change Categories */
.change-category {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

.change-category:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.change-category:last-child {
    margin-bottom: 0;
}

.category-header {
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Category Colors - Light Mode */
.category-green {
    background: #dcfce7;
    color: #166534;
}

.category-blue {
    background: #dbeafe;
    color: #1e40af;
}

.category-yellow {
    background: #fef9c3;
    color: #854d0e;
}

.category-red {
    background: #fee2e2;
    color: #991b1b;
}

.category-purple {
    background: #f3e8ff;
    color: #6b21a8;
}

.category-orange {
    background: #ffedd5;
    color: #9a3412;
}

.category-gray {
    background: #f3f4f6;
    color: #4b5563;
}

/* Change List */
.change-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.change-entry {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-secondary);
}

.change-entry:last-child {
    border-bottom: none;
}

.change-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.9rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.change-entry p {
    margin: 0;
}

.change-entry strong,
.change-entry b {
    margin-right: 0.25em;
}

.change-entry h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.change-entry:first-child h3:first-child {
    margin-top: 0;
}

.change-entry code {
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.875em;
}

/* Release Detail Page */
.release-detail .changelog-header {
    padding-bottom: 1.5rem;
}

.release-detail .back-link {
    display: inline-block;
    margin-bottom: 1rem;
}

.release-badges {
    margin-bottom: 0.5rem;
}

.release-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item strong {
    color: var(--text-primary);
}

.release-full-content {
    background: var(--bg-primary);
}

.release-full-content .change-category {
    margin-bottom: 2rem;
}

.release-full-content .category-header {
    margin-bottom: 1rem;
}

.release-full-content .category-badge {
    font-size: 0.875rem;
    padding: 0.375rem 1rem;
}

.release-html-content {
    color: var(--text-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
}

/* Footer */
.changelog-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.changelog-footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

.changelog-footer a:hover {
    text-decoration: underline;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .prerelease-badge {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

[data-theme="dark"] .category-green {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .category-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .category-yellow {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

[data-theme="dark"] .category-red {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .category-purple {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

[data-theme="dark"] .category-orange {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

[data-theme="dark"] .category-gray {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
    .changelog-header {
        padding: 1.5rem 1rem;
    }

    .changelog-main {
        padding: 1.5rem 1rem;
    }

    .release-card {
        padding: 1rem;
    }

    .release-version {
        font-size: 1.25rem;
    }

    .release-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .release-detail-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
}
