/* ---style.css--- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #e0e5ec;
    font-family: 'Segoe UI', sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- ХЕДЕР --- */
header {
    background: linear-gradient(to bottom, #2a2270, #1f1852);
    height: 60px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 40px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    z-index: 100;
    border-bottom: 1px solid #4a3eb5;
}
.logo { height: 80%; width: auto; }

/* --- СЛОГАН (ДЕСКТОП: СПРАВА) --- */
.slogan-container {
    position: absolute;
    right: 20px;
    top: 70px;
    z-index: 90;
    padding-right: 20px;
}

.slogan-container h2 {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 3rem;
    color: #1f1852;
    text-align: right;
    line-height: 1.2;
    margin-top: 20px;

    text-shadow:
        -2px -2px 0 #fff,
        2px -2px 0 #fff,
        -2px 2px 0 #fff,
        2px 2px 0 #fff,
        -2px 0 0 #fff,
        2px 0 0 #fff,
        0 -2px 0 #fff,
        0 2px 0 #fff,
        3px 3px 8px rgba(0, 0, 0, 0.2);
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    .slogan-container h2 {
        font-size: 1.1rem; /* адаптация размера */
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .slogan-container h2 {
        font-size: 0.9rem; /* адаптация размера */
        letter-spacing: 1px;
    }
}
/* --- ЦЕНТРИРОВАНИЕ ЧАСОВ --- */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* --- МЕНЮ --- */
.menu-dial {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    animation: menu-rotation 60s linear infinite;
}

@keyframes menu-rotation {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.menu-spoke {
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 0;
    height: 380px;
    transform-origin: bottom center;
    border-left: 2px dashed rgba(255, 255, 255, 0.4);
}

.menu-item-wrapper {
    position: absolute;
    top: -30px;
    left: -150px;
    width: 300px;
    text-align: center;
    pointer-events: auto;
}

.menu-link {
    display: inline-block;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    color: #fff;
    border-radius: 50px;
    background: linear-gradient(135deg, #008BD2 0%, #005f9e 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 20px rgba(0, 40, 80, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-link:hover {
    background: linear-gradient(135deg, #EF7D00 0%, #E6007E 100%);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.15) translateY(-3px);
    box-shadow:
        0 15px 30px rgba(230, 0, 126, 0.5),
        0 0 15px rgba(239, 125, 0, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
}

/* --- GIF ДЕКОРАЦИИ --- */
.decoration-gif {
    position: fixed;
    z-index: 1;
    opacity: 0.9;
    pointer-events: none;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* === GIF ДЕКОРАЦИИ - ПРИВЯЗКА К ЦЕНТРУ === */
.decoration-gif {
    position: fixed;
    z-index: 1;
    opacity: 0.9;
    pointer-events: none;
    object-fit: contain;
}

/* === GIF ДЕКОРАЦИИ === */
.decoration-gif {
    position: fixed;
    z-index: 1;
    pointer-events: none;
}

/* ЗЕЛЁНЫЙ (klaster_v): верхний край касается хедера */
.top-left {
    top: 60px;       /* Ровно под хедером */
    bottom: auto;
    transform: none;

    /* Правый край к центру */
    right: 50%;
    left: auto;

    /* Размер */
    width: 800px;
    height: auto;

    /* Отступ от центра */
    margin-right: 50px;
}

/* ФИОЛЕТОВЫЙ (klaster_l): нижний край выходит за экран на 10px */
.bottom-right {
    bottom: -25px;   /* Выходит за экран на 10px */
    top: auto;
    transform: none;

    /* Левый край к центру */
    left: 40%;
    right: auto;

    /* Размер */
    width: 1250px;
    height: auto;

    /* Сдвиг к центру */
    margin-left: -200px;
}


/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    .slogan-container h2 {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .slogan-container h2 {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 1024px) {
    .top-left, .bottom-right {
        width: 30vw;
        max-width: 300px;
    }

    .watch-case {
        width: 350px;
        height: 350px;
    }

    .clock {
        width: 300px;
        height: 300px;
    }
}

/* --- КОНТЕЙНЕР ДЛЯ КАРТИНКИ ЧАСОВ --- */
.watch-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 30px;
}

/* --- КАРТИНКА ЧАСОВ --- */
.watch-image {
    width: 700px; /* ← ШИРИНА */
    height: 700px; /* ← ВЫСОТА */
    object-fit: contain;
    border-radius: 50%;
    /* Тень как у оригинального корпуса */
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
    z-index: 1;
    transform: translate(19px, 20px);
}

/* --- МЕНЮ ПОВЕРХ КАРТИНКИ --- */
.watch-container .menu-dial {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    animation: menu-rotation 60s linear infinite;
}


/* ============================================
   КОНТЕЙНЕР СТРЕЛОК
   ============================================ */
.hands-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    margin-left: 1px;
    margin-top: 1px;
    z-index: 10;
    pointer-events: none;
}

/* ============================================
   ОБЩИЙ МЕТАЛЛИЧЕСКИЙ ГРАДИЕНТ
   ============================================ */
.metallic-split {
    background: linear-gradient(to right, #8e949a 0%, #ffffff 49.5%, #16181b 50.5%, #595e65 100%);
}

/* ============================================
   ЧАСОВАЯ СТРЕЛКА
   - Короткая, широкая
   - Регулировка: width, height, bottom, scale
   ============================================ */
.hour-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: center bottom;

    /* РАЗМЕРЫ (оригинал: 50x320, уменьшаем под часы) */
    width: 22px;
    height: 140px;
    margin-left: -8px;  /* -половина width */

    /* Многогранник с кинжальным острием */
    clip-path: polygon(50% 0%, 100% 78%, 65% 86%, 65% 100%, 35% 100%, 35% 86%, 0% 78%);

    z-index: 20;
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.6));
}

/* ============================================
   МИНУТНАЯ СТРЕЛКА
   - Длиннее, уже
   - Регулировка: width, height, bottom, scale
   ============================================ */
.min-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: center bottom;

    /* РАЗМЕРЫ (оригинал: 44x520, уменьшаем под часы) */
    width: 20px;
    height: 180px;
    margin-left: -6px;  /* -половина width */

    /* Многогранник с острием */
    clip-path: polygon(50% 0%, 100% 84%, 65% 92%, 65% 100%, 35% 100%, 35% 92%, 0% 84%);

    z-index: 21;
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.6));
}

/* ============================================
   СЕКУНДНАЯ СТРЕЛКА (СОСТАВНАЯ)
   - Pivot на центральной оси
   - Длиннее остальных стрелок
   ============================================ */
.sec-container {
    position: absolute;
    left: 50%;

    /* РАЗМЕРЫ */
    width: 80px;
    height: 720px;  /* Полная высота для расчётов */
    margin-left: -40px;

    /* ПОЗИЦИЯ: pivot точно на оси часов */
    bottom: calc(50% - 183.30px);  /* Сдвиг чтобы pivot был на центре */

    /* === РЕГУЛИРОВКА ЦЕНТРА ВРАЩЕНИЯ СЕКУНДНОЙ СТРЕЛКИ ===
       transform-origin: [горизонталь] [вертикаль];
       
       ГОРИЗОНТАЛЬ: center (по центру) / left / right / значения в px
       ВЕРТИКАЛЬ: значение в px от верха элемента
       
       Примеры:
       - center 537px  (по центру, 537px от верха)
       - 50% 537px     (то же что center)
       - 50% 540px     (сдвиг вниз на 3px)
       - 48% 537px     (сдвиг влево на 2%)
    */
    transform-origin: 50% 537px;

    z-index: 22;
    filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.5));

    /* МАСШТАБ: увеличен для длинной стрелки */
    transform: scale(0.30);
}

/* Стержень с текстурой витков */
.sec-shaft {
    position: absolute;
    top: 138px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 390px;  /* Чуть короче стержень, чтобы не выходил за циферблат */
    background:
        repeating-linear-gradient(-30deg, transparent, transparent 2px, rgba(255,255,255,0.15) 3px, rgba(255,255,255,0.15) 5px),
        linear-gradient(to right, #4a4d52 0%, #a0a4a8 30%, #ffffff 50%, #a0a4a8 70%, #2a2d32 100%);
}

/* Противовес (хвост) - ниже оси */
.sec-tail {
    position: absolute;
    top: 550px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 150px;
    clip-path: polygon(35% 0, 65% 0, 100% 92%, 50% 100%, 0 92%);
}

/* Ромб с вырезом */
.sec-diamond {
    position: absolute;
    top: 100px; /*sec-diamond (ромб)*/
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 104px;
    clip-path: polygon(
        50% 0%, 100% 50%, 50% 100%, 0% 50%,
        49.5% 0%,
        49.5% 25%, 25% 50%, 50% 75%, 75% 50%, 50.5% 25%,
        50.5% 0%
    );
}

/* Острый наконечник */
.sec-tip {
    position: absolute;
    top: 80px; /*sec-tip (кончик)*/
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 28px;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* Втулка (основание) - НА ОСИ */
.sec-pivot {
    position: absolute;
    top: 506px;  /* === РЕГУЛИРОВКА: измените для сдвига втулки вверх/вниз === */
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #8e949a 50%, #16181b 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Внутреннее углубление */
.sec-pivot-inner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16181b 0%, #595e65 50%, #ffffff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Центральная шляпка */
.sec-pivot-cap {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #8e949a 40%, #16181b 90%);
}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ (768px - 1024px)
   Часы немного меньше десктопа, но крупные
   ============================================ */
@media (max-width: 1024px) {

    /* Хедер */
    header {
        height: 50px;
        padding-left: 20px;
    }

    .logo {
        height: 70%;
    }

    /* Слоган */
    .slogan-container {
        top: 55px;
        right: 15px;
    }

    .slogan-container h2 {
        font-size: 2rem;
    }

    /* Декоративные GIF — ещё увеличиваем на планшетах (~1.5x) */
    .decoration-gif.top-left {
        width: 90vw;
        max-width: 720px;
        top: 50px;
        left: -150px;  /* Сдвиг вправо на 20px */
    }

    .decoration-gif.bottom-right {
        width: 100vw;
        max-width: 1260px;
    }

    /* Контейнер часов — ещё немного увеличиваем */
    .watch-container {
        transform: scale(0.99);
    }

    /* Картинка часов — чуть больше */
    .watch-image {
        width: 600px;
        height: 600px;
    }

    /* Контейнер стрелок — под размер циферблата */
    .hands-container {
        width: 600px;
        height: 600px;
        margin-left: 1px;
        margin-top: 1px;
    }

    /* Часовая стрелка — чуть крупнее */
    .hour-hand {
        width: 20px;
        height: 115px;
        margin-left: -10px;
    }

    /* Минутная стрелка — чуть крупнее */
    .min-hand {
        width: 16px;
        height: 150px;
        margin-left: -8px;
    }

    /* Секундная стрелка */
    .sec-container {
        /* Используем базовые значения, чтобы сохранить центр оси */
    }

    /* Меню — увеличиваем текст и «пукнты со словами» и сдвигаем ближе к центру */
    .menu-link {
        font-size: 13px;
        padding: 10px 20px;
    }

    /* Сдвигаем пункты по радиусу ближе к центру */
    .menu-spoke {
        height: 340px;
    }

    .menu-item-wrapper {
        top: -10px;
    }

}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ МАЛЕНЬКИХ ПЛАНШЕТОВ (600px - 768px)
   ============================================ */
@media (max-width: 768px) and (min-width: 481px) {

    header {
        height: 45px;
        padding-left: 15px;
    }

    .slogan-container {
        top: 50px;
        right: 10px;
    }

    .slogan-container h2 {
        font-size: 1.5rem;
    }

    /* Кластеры на фоне - показываем и позиционируем по краям */
    .decoration-gif {
        display: block !important;
        z-index: 1;
        opacity: 0.85;
    }
    
    /* Зелёный кластер - в левый край (за край страницы) */
    .decoration-gif.top-left {
        width: 90vw;
        max-width: 800px;
        top: 45px;
        left: -20%;
        right: auto;
    }
    
    /* Фиолетовый кластер - в правый край */
    .decoration-gif.bottom-right {
        width:145vw;
        max-width: 1500px;
        bottom: -30px;
        right: -65%;
        left: auto;
    }

    /* Контейнер часов - увеличиваем */
    .watch-container {
        transform: scale(0.85);
        z-index: 10;
    }

    /* Картинка часов - сдвиг относительно стрелок */
    .watch-image {
        width: 550px;
        height: 550px;
        /* === НАСТРОЙКА ЦЕНТРАЛЬНОЙ ОСИ ЧАСОВ ===
           Изменяйте эти значения для настройки положения циферблата:
           margin-left - сдвиг по горизонтали (влево/вправо)
           margin-top - сдвиг по вертикали (вверх/вниз)
           Стрелки останутся на месте!
        */
        margin-left: -9.1px;
        margin-top: -8.39px;
    }

    .hands-container {
        width: 550px;
        height: 550px;
    }

    .hour-hand {
        width: 20px;
        height: 115px;
        margin-left: -10px;
    }

    .min-hand {
        width: 16px;
        height: 150px;
        margin-left: -8px;
    }

    /* Секундная стрелка - масштаб управляется в JavaScript */
    .sec-container {
    }

    /* Меню - увеличиваем пункты и радиус */
    .menu-spoke {
        height: 320px;
    }

    .menu-link {
        font-size: 14px;
        padding: 12px 22px;
    }
}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНОВ (до 480px)
   Часы скрываются, показываем меню-карточки
   ============================================ */
@media (max-width: 480px) {

    /* --- BODY --- */
    body {
        overflow-y: auto;  /* Разрешаем скролл */
    }

    /* --- ХЕДЕР --- */
    header {
        height: 50px;
        padding-left: 15px;
        justify-content: center;
    }

    .logo {
        height: 65%;
    }

    /* --- СЛОГАН: ПО ЦЕНТРУ --- */
    .slogan-container {
        position: static;          /* Убираем абсолютное позиционирование */
        width: 100%;
        text-align: center;
        padding: 25px 15px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-bottom: 1px solid rgba(42, 34, 112, 0.1);
    }

    .slogan-container h2 {
        font-size: 1.4rem;
        color: #2a2270;
        text-shadow: none;
        margin: 0;
        line-height: 1.4;
    }

    /* --- СКРЫВАЕМ ДЕКОРАЦИИ --- */
    .decoration-gif {
        display: none !important;
    }

    /* --- СКРЫВАЕМ ЧАСЫ --- */
    .watch-container,
    .watch-image,
    .hands-container,
    .menu-dial {
        display: none !important;
    }

    /* --- MAIN: ВЕРТИКАЛЬНОЕ МЕНЮ --- */
    main {
        flex: 1;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 20px 15px;
        overflow-y: auto;
    }

    /* --- МОБИЛЬНОЕ МЕНЮ (показываем) --- */
    .mobile-menu {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .mobile-menu-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 18px 20px;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border-radius: 16px;
        text-decoration: none;
        color: #1f1852;
        box-shadow:
            0 4px 15px rgba(0, 0, 0, 0.08),
            0 1px 3px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(42, 34, 112, 0.1);
        transition: all 0.3s ease;
    }

    .mobile-menu-item:hover,
    .mobile-menu-item:active {
        transform: translateY(-2px);
        box-shadow:
            0 8px 25px rgba(42, 34, 112, 0.15),
            0 2px 6px rgba(0, 0, 0, 0.08);
        border-color: rgba(42, 34, 112, 0.3);
    }

    .mobile-menu-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        background: linear-gradient(135deg, #2a2270 0%, #4a3eb5 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .mobile-menu-icon svg {
        width: 24px;
        height: 24px;
        fill: white;
    }

    .mobile-menu-content {
        flex: 1;
    }

    .mobile-menu-title {
        font-size: 1rem;
        font-weight: 600;
        color: #1f1852;
        margin-bottom: 4px;
    }

    .mobile-menu-desc {
        font-size: 0.8rem;
        color: #666;
        line-height: 1.3;
    }

    .mobile-menu-arrow {
        width: 20px;
        height: 20px;
        fill: #aaa;
        flex-shrink: 0;
        transition: transform 0.3s ease;
    }

    .mobile-menu-item:hover .mobile-menu-arrow {
        transform: translateX(4px);
        fill: #2a2270;
    }
}

/* ============================================
   СКРЫТИЕ МОБИЛЬНОГО МЕНЮ НА ДЕСКТОПЕ
   ============================================ */
.mobile-menu {
    display: none;
}

/* === ФОНОВАЯ КАРТИНКА ЗА ЧАСАМИ === */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;

