:root {
    --bg-dark: #121214;
    --sidebar-bg: #1e1e24;
    --card-bg: #282830;
    --accent-color: #6c5ce7;
    --accent-hover: #81ecec;
    --text-primary: #f1f2f6;
    --text-secondary: #a4b0be;
    --border-color: #353b48;
    --slider-gap: 20px; /* используется и в CSS, и в script.js (шаг автопрокрутки) */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Боковое меню --- */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.site-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--accent-hover); 
    font-weight: bold;
}

.nav-link.active {
    background-color: var(--accent-color);
    color: #fff;
    font-weight: 600;
}

.nav-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 12px 0;
}

/* --- Основное окно --- */
.content-area {
    margin-left: 260px;
    flex: 1;
    padding: 40px;
    max-width: 1200px;
}

.page-section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.page-section.active {
    display: block;
}

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

.page-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.bio-card {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    line-height: 1.7;
    font-size: 1.1rem;
    margin-bottom: 40px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.section-subtitle {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

/* --- Горизонтальный слайдер --- */
.slider-container {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 10px 0;
}

.slider-track {
    display: flex;
    gap: var(--slider-gap);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 15px;
    scrollbar-width: none; /* авто-крутящийся слайдер — скроллбар не нужен визуально */
}

.slider-track::-webkit-scrollbar {
    display: none;
}

.slider-item {
    /* Ровно 3 фото в видимой области: ширина = (100% - 2 зазора) / 3 */
    flex: 0 0 calc((100% - (var(--slider-gap) * 2)) / 3);
    height: 360px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slider-item:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    font-size: 1.5rem;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: background 0.3s;
}

.slider-btn:hover { background: var(--accent-color); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* --- Сетка фотогалереи (Справа) --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.grid-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    background-color: var(--card-bg);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.grid-item:hover img {
    transform: scale(1.1);
}

/* --- Модальное окно (Lightbox) --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-caption {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Кнопки "вперёд/назад" внутри лайтбокса */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    font-size: 1.5rem;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-nav:hover { background: var(--accent-color); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-video {
    display: none;
    max-width: 90%;
    max-height: 85%;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(0,0,0,0.8);
    background: #000;
}

/* В режиме видео показываем <video> вместо <img> и прячем стрелки листания
   (в отличие от фото, ролики открываются по одному, без пролистывания) */
.lightbox.video-mode .lightbox-img { display: none; }
.lightbox.video-mode .lightbox-video { display: block; }
.lightbox.video-mode .lightbox-prev,
.lightbox.video-mode .lightbox-next { display: none; }

/* Значок play поверх превью-кадра видео в сетке галереи */
.video-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

/* --- Пустой раздел (нет файлов) --- */
.empty-msg {
    color: var(--text-secondary);
    padding: 10px 0;
}

/* --- Карточка аудио (Музыка) --- */
.audio-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audio-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.audio-title {
    font-size: 1rem;
    color: var(--text-primary);
    word-break: break-word;
}

.audio-card audio {
    width: 100%;
}

.glitch {
    position: relative;
    color: #fff;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
}

.glitch::before {
    color: #f00;
    transform: translate(-2px, -2px);
    clip-path: inset(0 0 50% 0);
}

.glitch::after {
    color: #0ff;
    transform: translate(2px, 2px);
    clip-path: inset(50% 0 0 0);
}

.neon {
    color: #0ff;
    text-shadow:
        0 0 4px #0ff,
        0 0 8px #0ff,
        0 0 16px #0ff,
        0 0 32px #0ff;
}

.soft-glow {
    color: #ddd;
    text-shadow: 0 0 12px rgba(255,255,255,0.25);
}

.neon-stroke {
    color: transparent;
    -webkit-text-stroke: 1px #0ff;
    text-shadow: 0 0 10px #0ff;
}

.gradient-dark {
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb);
    -webkit-background-clip: text;
    color: transparent;
}

.flicker {
    animation: flicker 2s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    45% { opacity: 0.3; }
    50% { opacity: 0.7; }
    55% { opacity: 0.2; }
}

.glass {
    color: rgba(255,255,255,0.8);
    text-shadow:
        0 0 4px rgba(255,255,255,0.3),
        0 0 12px rgba(255,255,255,0.15);
}

.text-3d-dark {
    color: #fff;
    text-shadow:
        1px 1px 0 #333,
        2px 2px 0 #222,
        3px 3px 0 #111;
}

.rainbow-glow {
    animation: rainbowGlow 3s linear infinite;
}

@keyframes rainbowGlow {
    0% { text-shadow: 0 0 10px red; }
    25% { text-shadow: 0 0 10px yellow; }
    50% { text-shadow: 0 0 10px lime; }
    75% { text-shadow: 0 0 10px cyan; }
    100% { text-shadow: 0 0 10px red; }
}

.mourning-box {
    border: 2px solid #000;
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
}

.yt-button {
    background: #b30000;        /* темнее, чем #ff0000 */
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: 0.25s;
    float: right;
}

.yt-button:hover {
    background: #990000;        /* ещё темнее при наведении */
    box-shadow: 0 0 10px rgba(179,0,0,0.6); /* мягкое красное свечение */
}
