@font-face {
    font-family: 'PixelCode';
    src: url('PixelCode.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    background-color: #01204E;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    font-family: 'PixelCode', monospace; /* PixelCode для всего */
}

.container {
    width: 640px;
    height: 480px;
    display: flex;
    background-color: #01204E;
    border: 4px solid #FFFFFF;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.menu {
    width: 200px;
    flex-shrink: 0;
    border-right: 4px solid #FFFFFF;
    padding: 10px;
    position: relative;
    overflow-y: auto;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    padding: 8px;
    font-size: 10px;
    cursor: pointer;
    overflow-wrap: break-word;
    word-break: break-word;
}

.menu-item.active {
    background-color: #FAA968;
    color: #FFFFFF;
}

.content {
    width: 440px; /* 640px - 200px (меню) */
    height: 100%;
    font-family: 'PixelCode', monospace;
    font-size: 10px;
    color: #FFFFFF;
    background: #01204E;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #FFFFFF #FAA968;
}

.content::-webkit-scrollbar {
    width: 16px;
}

.content::-webkit-scrollbar-track {
    background: #01204E;
    border-left: 2px solid #FFFFFF;
}

.content::-webkit-scrollbar-thumb {
    background: #FFFFFF;
    border: 1px solid #FAA968;
    background-image: linear-gradient(
        45deg,
        #FFFFFF 25%,
        transparent 25%,
        transparent 75%,
        #FFFFFF 75%,
        #FFFFFF
    ),
    linear-gradient(
        45deg,
        #FFFFFF 25%,
        transparent 25%,
        transparent 75%,
        #FFFFFF 75%,
        #FFFFFF
    );
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: #E0E0E0;
    background-image: linear-gradient(
        45deg,
        #E0E0E0 25%,
        transparent 25%,
        transparent 75%,
        #E0E0E0 75%,
        #E0E0E0
    ),
    linear-gradient(
        45deg,
        #E0E0E0 25%,
        transparent 25%,
        transparent 75%,
        #E0E0E0 75%,
        #E0E0E0
    );
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

h1 {
    font-size: 12px; /* Уменьшаем для компактности */
    margin: 0 0 10px;
    color: #FAA968;
}

p {
    font-size: 10px;
    line-height: 1.4;
    margin: 5px 0;
}

.lang-button {
    position: absolute;
    bottom: 40px;
    right: 10px;
    background-color: transparent;
    color: #FFFFFF;
    border: 2px solid #FAA968;
    padding: 5px;
    font-family: 'PixelCode', monospace;
    font-size: 8px;
    cursor: pointer;
}

.palette-name {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 8px;
    color: #FFFFFF;
    font-family: 'PixelCode', monospace;
}

.menu-toggle {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: transparent;
    color: #FFFFFF;
    border: 2px solid #FAA968;
    padding: 5px;
    font-family: 'PixelCode', monospace;
    font-size: 10px;
    cursor: pointer;
}

.content a {
    color: #FAA968;
    text-decoration: none;
    border-bottom: 2px solid #FAA968;
    font-family: 'PixelCode', monospace;
    font-size: 10px;
}

.content a:hover {
    color: #FFFFFF;
    border-bottom: 2px solid #FFFFFF;
}

#crt-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

#crt-background::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    animation: scanline 6s linear infinite;
}

#crt-background::after {
    content: '';
    position: absolute;
    top: -200%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(250, 169, 104, 0.2);
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% {
        top: -100%;
    }
    100% {
        top: 100%;
    }
}

.timeline {
    position: relative;
    padding-left: 60px; /* Пространство для контента */
    min-height: 100%; /* Растягиваем на всю высоту .content */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 55px; /* Линия между годами и контентом */
    top: 0;
    bottom: 0;
    width: 2px; /* Тонкая линия вместо псевдографики */
    background: #FAA968; /* Цвет линии */
    z-index: 0; /* Под годами и контентом */
}

.timeline-item {
    position: relative;
    margin-bottom: 10px;
}

.timeline-year {
    position: absolute;
    left: -70px; /* Годы слева */
    width: 60px;
    color: #FAA968;
    font-family: 'PixelCode', monospace;
    font-size: 10px;
    text-align: right;
    white-space: nowrap;
    z-index: 1; /* Выше линии */
}

.timeline-content {
    color: #FFFFFF;
    font-family: 'PixelCode', monospace;
    font-size: 10px;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    z-index: 1; /* Выше линии */
}

.timeline-content a {
    color: #FAA968;
    text-decoration: none;
    border-bottom: 2px solid #FAA968;
}

.timeline-content a:hover {
    color: #FFFFFF;
    border-bottom: 2px solid #FFFFFF;
}

@media (max-width: 640px) {
    .container {
        width: 100%;
        height: 100vh;
        flex-direction: column;
    }

    .menu {
        position: absolute;
        top: 0;
        left: 0;
        width: 200px;
        height: 100%;
        transform: translateX(-100%);
        background-color: #01204E;
        z-index: 10;
    }

    .menu.active {
        transform: translateX(0);
    }

    .content {
        width: 100%;
        height: calc(100% - 40px);
        padding: 40px 10px 10px;
    }

    .menu-toggle {
        display: block;
    }

    .timeline {
        padding-left: 50px;
    }

    .timeline::before {
        left: 48px;
        width: 1px; /* Тоньше для мобильных */
    }

    .timeline-year {
        left: -50px;
        width: 40px;
        font-size: 8px;
        white-space: nowrap;
    }

    .timeline-content {
        font-size: 8px;
    }
}