/**
 * БЛОК 1: ГЛОБАЛЬНЫЕ НАСТРОЙКИ И КУРСОРЫ
 */
html,
body {
    cursor: default !important;
}

a,
button,
.mini-track,
.track-item,
input[type="range"] {
    cursor: pointer !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100%;
    background-color: #050505;
    color: #909090;
    font-family: 'IM Fell English', serif;
    overflow: hidden;
}

@media (max-width: 768px) {

    html,
    body {
        overflow-y: auto !important;
        /* Разрешаем вертикальный скролл */
        height: auto !important;
        /* Позволяем странице расти вниз */
    }

    .main-content {
        height: auto !important;
        /* Убираем фиксацию по высоте экрана */
        min-height: 100vh;
        /* Но сохраняем минимальный размер */
        padding-top: 50px;
        /* Отступ сверху, чтобы заголовок не прилипал */
        padding-bottom: 120px;
        /* Место под плеер внизу */
        justify-content: flex-start;
        /* Контент пойдет сверху вниз, а не из центра */
    }
}

/**
 * БЛОК 2: ЦЕНТРАЛЬНЫЙ ИНТЕРФЕЙС
 */
.main-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    padding: 20px;
}

h1 {
    font-family: 'Special Elite', cursive;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
    position: relative;
}

h1:hover {
    animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: #777777 !important;
    text-shadow: 1px 0 #fff, -1px 0 #000;
}

@keyframes glitch-anim {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
    /* Отрегулируй отступ сверху */
    pointer-events: none;
}

.main-logo {
    width: 250px;
    /* Размер логотипа */
    margin-bottom: -20px;
    /* Чтобы логотип был ближе к тексту или слегка налезал */
    opacity: 0.8;
}

.main-logo img {
    width: 100%;
    height: auto;
}

.main-logo:hover {
    animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    filter: sepia(1) grayscale(1) brightness(0.45) drop-shadow(0 0 0px rgba(119, 119, 119, 0.5));
    opacity: 1;
}

nav {
    margin-top: 40px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: clamp(1.5rem, 8vw, 1.5rem);
}

nav a {
    color: #666;
    text-decoration: none;
    padding: 0 20px;
    text-transform: lowercase;
    letter-spacing: 2px;
    transition: 0.5s;
}

nav a:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

nav a:hover {
    color: #fff;
}

/**
 * БЛОК 3: УПРАВЛЕНИЕ ДОЖДЕМ
 */
.rain-control {
    position: fixed;
    top: 30px;
    left: 40px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 15px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
    opacity: 0.3;
}

.rain-control:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

#rain-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 1px;
    background: #444;
    outline: none;
}

@media (max-width: 768px) {
    .rain-control {
        position: fixed;
        top: 20px !important;
        left: 20px !important;
        z-index: 1000;
        display: flex;
        align-items: center;
        gap: 15px;
        background: rgba(0, 0, 0, 0.4);
        padding: 0px 0px;
        border-radius: 2px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        transition: 0.3s;
        opacity: 0.3;
    }

    .rain-control:hover {
        opacity: 1;
        background: rgba(0, 0, 0, 0.7);
    }

    #rain-slider {
        -webkit-appearance: none;
        appearance: none;
        width: 80px;
        height: 1px;
        background: #444;
        outline: none;
    }
}

#rain-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 8px;
    height: 8px;
    background: #888;
    border-radius: 50%;
}

/**
 * ЭФФЕКТЫ ТЕКСТА (ДРОЖАНИЕ)
 */
.shake-word {
    display: inline-block;
    animation: constant-shudder 0.1s infinite;
    color: #e0e0e0;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4), 0 0 12px rgba(255, 255, 255, 0.2);
    will-change: transform;
}

@keyframes constant-shudder {
    0% {
        transform: rotate(var(--base-angle)) translate(0, 0);
    }

    25% {
        transform: rotate(calc(var(--base-angle) + 1.2deg)) translate(-0.4px, 0.4px);
    }

    50% {
        transform: rotate(calc(var(--base-angle) - 1.1deg)) translate(0.4px, -0.4px);
    }

    75% {
        transform: rotate(calc(var(--base-angle) + 0.8deg)) translate(-0.4px, -0.4px);
    }

    100% {
        transform: rotate(var(--base-angle)) translate(0, 0);
    }
}

.type-word {
    display: inline-block;
}

.type-word:hover {
    color: #fff;
}


@media (max-width: 768px) {

    /* Навигация в столбик */
    nav {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        /* Две колонки */
        gap: 10px;
        width: 90%;
        margin: 20px auto;
    }

    nav a {
        font-size: 0.9rem !important;
        padding: 12px 5px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        /* Легкая рамка для структуры */
        background: rgba(255, 255, 255, 0.03);
        text-align: center;
        letter-spacing: 1px !important;
    }

    /* Логотип Untold Grief */
    h1 {
        font-size: 2.2rem !important;
        /* Уменьшаем основной заголовок */
        letter-spacing: 4px;
        margin-top: 40px;
    }

    /* Уменьшаем картинку логотипа, если она есть */
    .main-logo img {
        width: 80% !important;
        /* Чтобы не вылезала за края */
        max-width: 300px;
        height: auto;
    }
}