/* --- Підключення локальних шрифтів --- */
@font-face {
    font-family: 'Charmonman';
    src: url('../fonts/Charmonman-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Kovela';
    src: url('../fonts/KovelaDEMO-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Новий витончений шрифт для української мови */
@font-face {
    font-family: 'ArnoPro';
    src: url('../fonts/ArnoproLightitalicdisplay.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-color: #0a0a0c;        
    --card-bg: #141416;         
    --green: #0c572c;           
    --teal: #22706c;            
    --dark-purple: #1f1566;     
    --light-purple: #4d409e;    
    --text-main: #d4d4d4;
    --neon-green: #39ff14;      
}

/* Жестко блокируем скролл по горизонтали для всех устройств */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Kovela', sans-serif; 
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; 
    padding: 40px 20px;
    box-sizing: border-box;
}

/* --- Настройки для українського шрифту --- */
body.lang-ua {
    font-family: 'ArnoPro', serif;
    font-size: 1.15em; 
}

body.lang-ua h2 { font-size: 1.8em; }
body.lang-ua p { font-size: 1.1em; }

body.lang-ua .neon-btn,
body.lang-ua .contact-link,
body.lang-ua .vibe-arrow {
    font-family: 'ArnoPro', serif;
    font-size: 1.1em;
}

body.lang-ua .vibe-text {
    font-family: 'ArnoPro', serif;
}

/* --- Анімація тексту при зміні мови --- */
[data-i18n] {
    transition: opacity 0.3s ease;
}

body.lang-switching [data-i18n] {
    opacity: 0;
}

/* --- Кнопка вибору мови --- */
.lang-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 1em !important;
}

/* --- Тонка арка --- */
.hanging-canopy {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
    pointer-events: none;
    z-index: 0; 
    overflow: hidden;
}

.hanging-canopy svg {
    width: 100%;
    height: 100%; 
    color: #1a9c4b;
    filter: drop-shadow(0 0 8px var(--neon-green)) 
            url(#glitch-filter);
    opacity: 0.9;
    animation: canopy-sway 6s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes canopy-sway {
    0% { transform: translateY(0) skewX(-1deg); }
    100% { transform: translateY(3px) skewX(1deg); }
}

/* --- Головний екран --- */
.hero {
    position: relative;
    z-index: 1; 
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
    margin-top: 30px;
    padding-top: 130px; 
}

.nickname {
    font-family: 'Charmonman', cursive; 
    font-weight: normal;
    font-size: 5.5em; 
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: 5px;
    text-transform: uppercase; 
    text-shadow: 0 0 25px rgba(0, 0, 0, 0.9), 0 0 5px rgba(0, 0, 0, 1); 
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* --- Фотографії --- */
.profile-photos {
    display: flex;
    justify-content: center;
    gap: 35px;
}

.profile-pic {
    width: 160px; 
    height: 160px; 
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-purple);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(77, 64, 158, 0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-pic:hover {
    transform: scale(1.08); 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(77, 64, 158, 0.8);
}

.vibe-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.vibe-text {
    font-family: 'Charmonman', cursive; 
    color: var(--teal);
    font-size: 1.6em;
    margin-bottom: 12px;
    margin-left: 20px;
    text-shadow: 0 0 10px rgba(34, 112, 108, 0.5), 0 2px 5px rgba(0,0,0,0.8);
}

.vibe-arrow {
    display: inline-block;
    font-family: 'Kovela', sans-serif;
    color: var(--neon-green);
    animation: point-down 1.5s infinite alternate;
}

@keyframes point-down {
    0% { transform: translateY(0) rotate(-10deg); }
    100% { transform: translateY(5px) rotate(-10deg); }
}

.mini-player {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(34, 112, 108, 0.1); 
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mini-player:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.mini-btn {
    background: none;
    border: none;
    color: var(--teal);
    cursor: pointer;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.2s ease;
    outline: none;
}

.mini-btn:hover {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
    transform: scale(1.1);
}

.mini-track-info {
    display: flex;
    flex-direction: column;
    min-width: 250px; 
}

#mini-track-name {
    font-family: 'Courier New', Courier, monospace; 
    font-size: 0.9em;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    text-align: center;
}

.progress-and-time {
    display: flex;
    align-items: center;
    gap: 10px;
}

#track-time {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75em;
    color: var(--teal);
    min-width: 35px;
}

.mini-progress-bg {
    flex-grow: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    border-radius: 10px; 
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-progress-fill {
    height: 100%;
    background: var(--teal);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 5px var(--teal);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
}

.volume-icon {
    font-size: 0.9em;
    color: var(--teal);
}

input[type=range] {
    -webkit-appearance: none;
    width: 60px;
    background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 3px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px; 
}

input[type=range]::-webkit-slider-thumb {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: var(--teal);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -4px;
    box-shadow: 0 0 5px var(--teal);
}

input[type=range]:focus {
    outline: none;
}

/* --- Відео --- */
.video-wrapper {
    margin-top: 25px;
    width: 100%;
    max-width: 400px; 
}

.about-video {
    width: 100%;
    height: auto;
    border-radius: 20px; 
    filter: invert(1); 
    mix-blend-mode: screen; 
    opacity: 0.85; 
}

/* --- Плаваюча кнопка --- */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background-color: rgba(22, 22, 24, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 25px !important;
    border-radius: 30px !important; 
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(34, 112, 108, 0.2);
    animation: float-bounce 3s infinite ease-in-out;
}

@keyframes float-bounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(57, 255, 20, 0.3); }
    100% { transform: translateY(0); }
}

/* --- Блок Контактів --- */
.contact-block {
    text-align: center;
    padding: 50px 30px !important;
    margin-top: 50px !important;
}

.contact-block h2 {
    line-height: 1.4;
    color: #fff !important;
    border-bottom: none !important;
    margin-bottom: 35px !important;
    text-transform: none;
    letter-spacing: 1px !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-link {
    color: var(--teal);
    text-decoration: none;
    font-family: 'Kovela', sans-serif; 
    padding: 12px 25px;
    border: 1px solid var(--teal);
    border-radius: 30px; 
    transition: all 0.3s ease;
    background: rgba(34, 112, 108, 0.1);
    font-weight: bold;
}

.contact-link:hover {
    color: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
    transform: translateY(-3px);
}

/* --- Контейнер і сітка --- */
.container {
    width: 100%;
    max-width: 1000px;
    position: relative;
    z-index: 1; 
}

.block {
    background-color: var(--card-bg);
    border: 1px solid var(--dark-purple);
    padding: 30px;
    border-radius: 24px; 
    box-sizing: border-box;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
    background-color: rgba(20, 20, 22, 0.92);
}

.block:hover {
    border-color: var(--light-purple);
    box-shadow: 0 5px 20px rgba(45, 31, 143, 0.2);
}

.block h2 {
    color: var(--teal);
    margin-top: 0;
    font-weight: 400;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(34, 112, 108, 0.3);
    padding-bottom: 10px;
}

.full-width { margin-bottom: 30px; }

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* --- Галерея --- */
.gallery-grid {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.featured-grid { grid-template-columns: repeat(2, 1fr); }
.full-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.grunge-frame {
    position: relative;
    overflow: hidden;
    border-radius: 16px; 
    border: 1px solid #222;
    background: #000;
    aspect-ratio: 1 / 1;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
}

.grunge-frame::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    transition: background 0.4s ease;
    pointer-events: none;
}

.grunge-frame:hover::after { background: rgba(0,0,0,0); }

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.img-wrapper:hover img {
    transform: scale(1.03); 
}

/* --- Кнопки --- */
.neon-btn {
    background-color: transparent;
    color: var(--teal);
    border: 1px solid var(--teal);
    padding: 10px 20px;
    font-family: 'Kovela', sans-serif; 
    cursor: pointer;
    border-radius: 30px; 
    transition: all 0.3s ease;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
}

.gallery-btn {
    width: 100%;
    margin-top: 25px;
    text-align: center;
}

.neon-btn:hover {
    background-color: rgba(34, 112, 108, 0.1);
    box-shadow: 0 0 12px rgba(34, 112, 108, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

/* --- Модальні вікна (текст) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--dark-purple);
    border-radius: 24px; 
    padding: 40px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.gallery-modal-content { max-width: 1000px; }

.modal-overlay.active .modal-content { transform: scale(1); }

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--teal);
    font-size: 35px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.close-modal:hover {
    color: var(--neon-green);
    transform: scale(1.1);
}

.modal-content h2 {
    color: var(--teal);
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(34, 112, 108, 0.2);
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-desc {
    color: #888;
    font-style: italic;
    margin-bottom: 25px;
}

.modal-body p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #cccccc;
}

.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 10px; }

/* --- LIGHTBOX (Просмотр фото) --- */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000; 
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover { color: var(--neon-green); }

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s ease;
}

.lightbox-prev:hover, .lightbox-next:hover { color: var(--neon-green); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* --- Анимации --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* --- Агрессивная оптимизация для телефонов --- */
@media (max-width: 768px) {
    body {
        padding: 20px 10px; /* Уменьшаем отступы по бокам */
    }
    .hero {
        padding-top: 80px; /* Сдвигаем ник чуть выше на телефонах */
    }
    .nickname {
        font-size: 3em; /* Уменьшаем размер главного шрифта */
        letter-spacing: 2px;
    }
    .hero-content {
        gap: 30px;
        flex-direction: column; /* Элементы идут друг под другом */
    }
    .profile-pic {
        width: 120px; /* Фотографии меньше */
        height: 120px;
    }
    .vibe-section {
        width: 100%;
        align-items: center; /* Центрируем плеер */
    }
    .vibe-text {
        margin-left: 0;
    }
    .mini-player {
        width: 100%;
        box-sizing: border-box;
        padding: 15px;
        gap: 10px;
        flex-wrap: wrap; /* Позволяем элементам плеера переноситься */
        justify-content: center;
    }
    .mini-track-info {
        min-width: 100%; /* Название трека и прогресс-бар занимают всю ширину */
        order: 3; /* Переносим информацию о треке вниз под кнопки */
        margin-top: 5px;
    }
    .volume-container {
        display: none; /* Прячем ползунок громкости для экономии места */
    }
    .block {
        padding: 25px 15px; /* Уменьшаем отступы внутри текстовых блоков */
    }
    .grid-2-col {
        grid-template-columns: 1fr; /* Галерея и Обо мне идут друг под другом */
    }
    .featured-grid {
        grid-template-columns: 1fr 1fr; /* В мини-галерее 2 колонки вместо 4 */
    }
    .full-grid {
        grid-template-columns: repeat(2, 1fr); /* В модалке 2 колонки */
    }
    .lang-btn {
        top: 15px;
        left: 15px;
        padding: 6px 12px !important; /* Уменьшаем кнопку языка */
    }
    .floating-btn {
        bottom: 15px;
        right: 15px;
        font-size: 0.9em !important;
        padding: 12px 20px !important; /* Уменьшаем плавающую кнопку */
    }
    .contact-block h2 {
        font-size: 1.5em; /* Уменьшаем заголовок в контактах */
    }
    .contact-links {
        flex-direction: column; /* Контакты друг под другом */
        gap: 15px;
        width: 100%;
    }
    .contact-link {
        width: 100%;
        box-sizing: border-box;
    }
    .modal-content {
        padding: 30px 20px;
        width: 95%;
        max-height: 90vh;
    }
    .video-wrapper {
        max-width: 100%;
    }
}