/* ===== CHANGELOGS PAGE STYLES ===== */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: var(--scrollbar-width);
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-dark);
    box-shadow: inset 0 1px 0 var(--bg-transparent-medium);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    box-shadow: inset 0 1px 0 var(--bg-transparent-medium), var(--shadow-sm);
}

::-webkit-scrollbar-corner {
    background: var(--scrollbar-track);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--scrollbar-track);
}

/* Navbar Styles */
.navbar {
    position: var(--position-fixed);
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--texture-nav-back);
    background-size: cover;
    border-bottom: 4px solid var(--primary-color);
    display: var(--display-flex);
    align-items: center;
    justify-content: center;
    gap: var(--margin-lg);
    z-index: var(--z-fixed);
    box-shadow: var(--shadow-lg);
}

.navbar::before {
    content: '';
    position: var(--position-absolute);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-transparent-dark);
    z-index: -1;
}

.nav-item {
    display: var(--display-flex);
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.8rem var(--padding-lg);
    background: var(--texture-button-normal);
    background-size: cover;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    color: var(--text-light);
    cursor: var(--cursor-pointer);
    transition: var(--transition-medium);
    font-family: var(--font-primary);
    font-variant: var(--font-variant);
    font-weight: var(--font-weight-bold);
    text-shadow: var(--text-shadow-heavy);
    min-width: 80px;
    text-align: var(--text-align-center);
}

.nav-item:hover, .nav-item.active {
    background: var(--texture-button-active);
    background-size: cover;
    border-color: var(--border-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.nav-item i {
    font-size: var(--font-size-lg);
    color: var(--border-light);
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
}

.nav-item span {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-tight);
}

/* Main Content Layout */
.main-content {
    min-height: calc(100vh - var(--header-height));
    position: var(--position-relative);
    background: var(--bg-main);
    background-size: cover;
}

/* Header Section */
.changelog-header {
    background: var(--bg-back);
    background-size: cover;
    border-bottom: 4px solid var(--primary-color);
    padding: var(--margin-lg) var(--margin-lg);
    margin-top: var(--margin-xl);
    position: var(--position-relative);
    overflow: var(--overflow-hidden);
}

.changelog-header::before {
    content: '';
    position: var(--position-absolute);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-transparent-dark);
    z-index: 1;
}

.header-content {
    position: var(--position-relative);
    z-index: 2;
    max-width: 1200px;
    margin: 0 var(--margin-auto);
    text-align: var(--text-align-center);
}

.main-title {
    font-size: var(--font-size-xxxl);
    color: var(--text-light);
    text-shadow: var(--text-shadow-heavy);
    margin-bottom: var(--margin-md);
    font-weight: var(--font-weight-black);
    display: var(--display-flex);
    align-items: center;
    justify-content: center;
    gap: var(--margin-md);
}

.main-title i {
    font-size: var(--font-size-xxxl);
    color: var(--border-light);
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
}

.version-label {
    display: var(--display-block);
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin-top: -15px;
}

.subtitle {
    font-size: var(--font-size-md);
    color: var(--text-light);
    text-shadow: var(--text-shadow-heavy);
    margin-bottom: var(--margin-lg);
    opacity: var(--opacity-75);
    line-height: var(--line-height-lg);
}

/* Statistics Container */
.stats-container {
    display: var(--display-grid);
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--margin-lg);
    margin-top: var(--margin-lg);
    max-width: 1000px;
    margin-left: var(--margin-auto);
    margin-right: var(--margin-auto);
}

.stat-item {
    background: var(--bg-transparent-light);
    backdrop-filter: var(--blur-medium);
    border: 2px solid var(--bg-transparent-primary);
    border-radius: var(--radius-lg);
    padding: var(--padding-lg);
    text-align: var(--text-align-center);
    transition: var(--transition-medium);
}

.stat-item:hover {
    background: var(--bg-transparent-medium);
    border-color: var(--border-light);
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-number {
    font-size: var(--font-size-xxxl);
    font-weight: var(--font-weight-black);
    color: var(--border-light);
    text-shadow: var(--text-shadow-heavy);
    margin-bottom: var(--padding-sm);
    font-family: var(--font-primary);
}

.stat-label {
    font-size: var(--font-size-base);
    color: var(--text-light);
    text-shadow: var(--text-shadow-light);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

/* Search Container */

.search-box {
    max-width: 600px;
    margin: 0 var(--margin-auto) var(--margin-md);
    position: var(--position-relative);
    display: var(--display-flex);
    align-items: center;
    gap: var(--padding-sm);
}

.search-box input {
    flex: 1;
    padding: 0.8rem var(--padding-md);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-xl);
    background: var(--bg-transparent-white-9);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    color: var(--border-darker);
    font-variant: var(--font-variant);
}

.search-box input:focus {
    outline: none;
    border-color: var(--border-light);
    box-shadow: 0 0 10px rgba(212, 162, 87, 0.3);
}

.search-box button {
    width: var(--icon-xl);
    height: var(--icon-xl);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-circle);
    background: var(--texture-button-normal);
    background-size: cover;
    color: var(--text-light);
    cursor: var(--cursor-pointer);
    transition: var(--transition-medium);
    display: var(--display-flex);
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    background: var(--texture-button-active);
    background-size: cover;
    border-color: var(--border-light);
    transform: scale(1.1);
}

.search-filters {
    display: var(--display-flex);
    justify-content: center;
    gap: var(--padding-sm);
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--texture-button-normal);
    background-size: cover;
    border: 2px solid var(--primary-color);
    color: var(--text-light);
    padding: var(--padding-sm) var(--padding-md);
    border-radius: var(--radius-xl);
    cursor: var(--cursor-pointer);
    transition: var(--transition-medium);
    font-family: var(--font-primary);
    font-variant: var(--font-variant);
    font-size: var(--font-size-sm);
    display: var(--display-flex);
    align-items: center;
    gap: var(--padding-sm);
}

.filter-btn:hover {
    background: var(--texture-button-active);
    background-size: cover;
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--texture-button-active);
    background-size: cover;
    border-color: var(--border-light);
    box-shadow: 0 0 15px rgba(212, 162, 87, 0.5);
}

/* Timeline Container */
.timeline-container {
    max-width: 1200px;
    margin: 0 var(--margin-auto);
    padding: var(--margin-lg);
    position: var(--position-relative);
}

.timeline {
    position: var(--position-relative);
}

.timeline::before {
    content: '';
    position: var(--position-absolute);
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--border-light), var(--primary-color));
    transform: translateX(-50%);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 10px rgba(212, 162, 87, 0.3);
}

/* Changelog Entry */
.changelog-entry {
    position: var(--position-relative);
    margin-bottom: 4rem;
    opacity: var(--opacity-0);
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.changelog-entry.animate {
    opacity: var(--opacity-100);
    transform: translateY(0);
}

.changelog-entry:nth-child(odd) .changelog-card {
    margin-right: 50%;
    padding-right: 3rem;
}

.changelog-entry:nth-child(even) .changelog-card {
    margin-left: 50%;
    padding-left: 3rem;
}

.changelog-card {
    background: var(--bg-back);
    background-size: cover;
    border: 3px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--margin-lg);
    position: var(--position-relative);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-medium);
    overflow: var(--overflow-hidden);
}

.changelog-card::before {
    content: '';
    position: var(--position-absolute);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-transparent-white-8);
    z-index: 1;
}

.changelog-card > * {
    position: var(--position-relative);
    z-index: 2;
}

.changelog-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 12px 35px rgba(212, 162, 87, 0.4);
    transform: translateY(-5px);
}

/* Timeline Dot */
.timeline-dot {
    position: var(--position-absolute);
    left: 50%;
    top: var(--margin-lg);
    width: var(--icon-xxl);
    height: var(--icon-xxl);
    background: var(--texture-button-active);
    background-size: cover;
    border: 4px solid var(--border-light);
    border-radius: var(--radius-circle);
    transform: translateX(-50%);
    display: var(--display-flex);
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.timeline-dot i {
    font-size: var(--font-size-xl);
    color: var(--text-light);
    text-shadow: var(--text-shadow-light);
}

/* Category Colors */
.changelog-entry[data-category="foundation"] .timeline-dot {
    background-color: var(--success-color);
    border-color: #1e7e34;
}

.changelog-entry[data-category="mapping"] .timeline-dot {
    background-color: var(--info-color);
    border-color: #138496;
}

.changelog-entry[data-category="performance"] .timeline-dot {
    background-color: var(--warning-color);
    border-color: #e0a800;
}

.changelog-entry[data-category="tokens"] .timeline-dot {
    background-color: #6f42c1;
    border-color: #5a32a3;
}

.changelog-entry[data-category="communication"] .timeline-dot {
    background-color: #fd7e14;
    border-color: #e55a00;
}

.changelog-entry[data-category="calendar"] .timeline-dot {
    background-color: #20c997;
    border-color: #17a085;
}

/* Changelog Header */
.changelog-header-content {
    margin-bottom: var(--padding-lg);
}

.changelog-date {
    font-size: var(--font-size-sm);
    color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--padding-sm);
    display: var(--display-flex);
    align-items: center;
    gap: var(--padding-sm);
}

.changelog-version {
    background: linear-gradient(135deg, var(--primary-color), var(--border-light));
    color: var(--text-light);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-shadow: var(--text-shadow-light);
}

.changelog-title {
    font-size: var(--font-size-xxl);
    color: var(--bg-light);
    margin-bottom: var(--padding-sm);
    font-weight: var(--font-weight-bold);
    display: var(--display-flex);
    align-items: center;
    gap: var(--padding-sm);
}

.changelog-description {
    font-style: var(--font-style-italic);
    color: var(--text-muted);
    margin-bottom: var(--padding-lg);
    line-height: var(--line-height-lg);
    font-size: var(--font-size-md);
}

/* Features List */
.features-list {
    margin-bottom: var(--padding-lg);
}

.feature-item {
    display: var(--display-flex);
    align-items: flex-start;
    gap: var(--margin-md);
    margin-bottom: var(--margin-md);
    padding: var(--margin-md);
    background: var(--bg-transparent-primary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--border-light);
    transition: var(--transition-medium);
}

.feature-item:hover {
    background: var(--bg-transparent-primary);
    transform: translateX(5px);
}

.feature-icon {
    font-size: var(--font-size-xl);
    min-width: var(--icon-lg);
    text-align: var(--text-align-center);
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

.feature-content h4 {
    margin: 0 0 var(--padding-sm) 0;
    color: var(--bg-light);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
}

.feature-content p {
    margin: 0;
    color: var(--text-muted);
    line-height: var(--line-height-base);
}

/* Systems and Improvements */
.systems-list,
.improvements-list,
.bugfixes-list {
    margin-bottom: var(--padding-lg);
}

.system-item,
.bugfix-item,
.technical-item {
    background: var(--bg-transparent-white-7);
    color: var(--text-dark);
    border: 2px solid var(--bg-transparent-border-light);
    border-radius: var(--radius-md);
    padding: var(--padding-lg);
    margin-bottom: var(--margin-md);
}

.system-item *,
.bugfix-item *,
.technical-item * {
    color: var(--text-dark);
}

.improvement-item {
    background: var(--bg-transparent-white-7);
    color: var(--text-dark);
    border: 2px solid var(--bg-transparent-border-light);
    border-radius: var(--radius-md);
    padding: var(--padding-lg);
    margin-bottom: var(--margin-md);
}

.improvement-item * {
    color: var(--text-dark);
}

.system-title,
.bugfix-title,
.technical-title {
    font-size: var(--font-size-lg);
    color: var(--text-dark);
    margin-bottom: var(--margin-md);
    font-weight: var(--font-weight-semibold);
    display: var(--display-flex);
    align-items: center;
    gap: var(--padding-sm);
}

.improvement-title {
    font-size: var(--font-size-lg);
    color: #000000 !important;
    margin-bottom: var(--margin-md);
    font-weight: var(--font-weight-semibold);
    display: var(--display-flex);
    align-items: center;
    gap: var(--padding-sm);
}

.system-features,
.improvement-features,
.bugfix-features {
    list-style: var(--list-style-none);
    padding: 0;
}

.system-features li,
.bugfix-features li {
    padding: var(--padding-sm) 0;
    border-bottom: 1px solid var(--bg-transparent-border-light);
    line-height: var(--line-height-base);
}

.improvement-features li {
    padding: var(--padding-sm) 0;
    border-bottom: 1px solid var(--bg-transparent-border-light);
    line-height: var(--line-height-base);
    color: #000000 !important;
}

.system-features li:last-child,
.improvement-features li:last-child,
.bugfix-features li:last-child {
    border-bottom: none;
}

/* Special Lists */
.planned-list,
.removed-list,
.technical-list {
    background: var(--bg-transparent-white-6);
    color: var(--text-dark);
    border-radius: var(--radius-md);
    padding: var(--margin-md);
    margin-bottom: var(--margin-md);
}

.planned-list {
    border-left: 4px solid var(--info-color);
}

.removed-list {
    border-left: 4px solid var(--danger-color);
}

.technical-list {
    border-left: 4px solid #6c757d;
}

.list-title {
    font-weight: var(--font-weight-semibold);
    color: var(--bg-light);
    margin-bottom: var(--padding-sm);
    font-size: var(--font-size-md);
}

.list-items {
    list-style: var(--list-style-none);
    padding: 0;
}

.list-items li {
    padding: 0.3rem 0;
    color: var(--text-muted);
}

/* Loading and No Results */
.loading-message,
.no-results {
    text-align: var(--text-align-center);
    padding: 4rem var(--margin-lg);
    color: var(--text-dark);
}

.loading-message i {
    font-size: var(--font-size-xxxl);
    margin-bottom: var(--margin-md);
    color: var(--border-light);
}

.no-results {
    background: var(--bg-back);
    background-size: cover;
    border: 3px solid var(--primary-color);
    border-radius: var(--radius-xl);
    margin: var(--margin-lg);
    position: var(--position-relative);
    overflow: var(--overflow-hidden);
}

.no-results::before {
    content: '';
    position: var(--position-absolute);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-transparent-white-9);
    z-index: 1;
}

.no-results > * {
    position: var(--position-relative);
    z-index: 2;
    color: var(--bg-light);
}

.no-results i {
    font-size: var(--font-size-xxxl);
    margin-bottom: var(--margin-md);
    color: var(--primary-color);
}

.clear-filters-btn {
    background: var(--texture-button-normal);
    background-size: cover;
    border: 2px solid var(--primary-color);
    color: var(--text-light);
    padding: 0.8rem var(--padding-lg);
    border-radius: var(--radius-xl);
    cursor: var(--cursor-pointer);
    transition: var(--transition-medium);
    font-family: var(--font-primary);
    font-variant: var(--font-variant);
    margin-top: var(--margin-md);
}

.clear-filters-btn:hover {
    background: var(--texture-button-active);
    background-size: cover;
    border-color: var(--border-light);
    transform: translateY(-2px);
}

/* Back to Top Button */
.back-to-top {
    position: var(--position-fixed);
    bottom: var(--margin-lg);
    right: var(--margin-lg);
    width: var(--icon-xxl);
    height: var(--icon-xxl);
    background: var(--texture-button-normal);
    background-size: cover;
    border: 3px solid var(--primary-color);
    border-radius: var(--radius-circle);
    color: var(--text-light);
    font-size: var(--font-size-xl);
    cursor: var(--cursor-pointer);
    transition: var(--transition-medium);
    z-index: var(--z-dropdown);
    opacity: var(--opacity-0);
    transform: translateY(100px);
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: var(--opacity-100);
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--texture-button-active);
    background-size: cover;
    border-color: var(--border-light);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(212, 162, 87, 0.4);
}

/* Achievement Modal */
.achievement-modal-content {
    max-width: 900px;
    max-height: 80vh;
}

.achievements-grid {
    display: var(--display-grid);
    grid-template-columns: 1fr;
    gap: var(--margin-md);
    max-height: 60vh;
    overflow-y: var(--overflow-auto);
}

.achievement-item {
    display: var(--display-flex);
    align-items: center;
    gap: var(--margin-md);
    padding: var(--margin-md);
    background: var(--bg-transparent-primary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--border-light);
}

.achievement-item i {
    font-size: var(--font-size-xl);
    color: var(--border-light);
    min-width: var(--icon-md);
}

.achievement-text {
    color: var(--bg-light);
    line-height: var(--line-height-base);
}

/* Loading Overlay */
.loading-overlay {
    position: var(--position-fixed);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: var(--display-flex);
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: var(--opacity-100);
    transition: var(--transition-medium);
}

.loading-overlay.hidden {
    opacity: var(--opacity-0);
    pointer-events: none;
}

.loading-spinner {
    text-align: var(--text-align-center);
    color: var(--text-dark);
}

.loading-spinner i {
    font-size: var(--font-size-xxxl);
    margin-bottom: var(--margin-md);
    color: var(--border-light);
}

.loading-spinner p {
    font-size: var(--font-size-lg);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: var(--font-size-xxl);
        flex-direction: column;
        gap: var(--padding-sm);
    }

    .subtitle {
        font-size: var(--font-size-md);
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: var(--margin-md);
    }

    .search-filters {
        justify-content: flex-start;
        overflow-x: var(--overflow-auto);
        padding-bottom: var(--padding-sm);
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .timeline::before {
        left: var(--margin-lg);
    }

    .changelog-entry:nth-child(odd) .changelog-card,
    .changelog-entry:nth-child(even) .changelog-card {
        margin-left: 0;
        margin-right: 0;
        padding-left: 4rem;
        padding-right: var(--margin-lg);
    }

    .timeline-dot {
        left: var(--margin-lg);
    width: var(--icon-xxl);
    height: var(--icon-xxl);
    }

    .timeline-dot i {
        font-size: var(--font-size-lg);
    }

    .changelog-title {
        font-size: var(--font-size-xl);
    }

    .feature-item {
        flex-direction: column;
        text-align: var(--text-align-center);
    }

    .back-to-top {
    width: var(--icon-xxl);
    height: var(--icon-xxl);
        font-size: var(--font-size-lg);
        bottom: var(--margin-md);
        right: var(--margin-md);
    }
}

@media (max-width: 480px) {
    .main-content {
        margin-top: var(--header-height);
    }

    .changelog-header {
        padding: var(--margin-lg) var(--margin-md);
    }

    .timeline-container {
        padding: var(--margin-md);
    }

    .changelog-card {
        padding: var(--padding-lg);
        padding-left: 3rem;
    }

    .search-container {
        padding: var(--margin-md);
    }

    .search-box {
        flex-direction: column;
        gap: var(--margin-md);
    }

    .search-box input {
        width: 100%;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Timeline */
.timeline-container::-webkit-scrollbar {
    width: var(--scrollbar-width);
}

.timeline-container::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.timeline-container::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-dark);
    box-shadow: inset 0 1px 0 var(--bg-transparent-medium);
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    box-shadow: inset 0 1px 0 var(--bg-transparent-medium), var(--shadow-sm);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Search Active State */
.search-container.active ~ .main-content {
    margin-top: 200px;
}

/* Category Badge */
.category-badge {
    display: var(--display-inline-block);
    background: linear-gradient(135deg, var(--primary-color), var(--border-light));
    color: var(--text-light);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    margin-left: var(--padding-sm);
    text-shadow: var(--text-shadow-light);
}
