body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
    color: #ffffff;

    background: linear-gradient(135deg, #0f172a, #020617);
    overflow: hidden;
}

.card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    text-align: center;
    width: 95%;
    max-width: 580px;
    /* Оптимальная ширина для пропорций */
    visibility: hidden;
}

h1 {
    font-size: 34px;
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-seo {
    position: absolute;
    bottom: 5px; /* Совсем у края экрана */
    width: 100%;
    text-align: center;
    opacity: 0.02; /* Почти полная прозрачность (2%) */
    pointer-events: none; /* Нельзя нажать или выделить */
}

.seo-text {
    font-size: 10px;
    color: #ffffff;
    user-select: none; /* Защита от случайного выделения пользователем */
}

/* ОСНОВНОЙ ГРИД */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.unit {
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.value {
    font-size: clamp(32px, 5vw, 42px);
    /* Адаптивный размер */
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* ЛИНИЯ-РАЗДЕЛИТЕЛЬ */
.divider {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(-5deg);
    visibility: hidden;
}

/* НИЖНИЙ ТАЙМЕР */
.target-timer {
    border: none;
}

.target-label {
    font-size: 20px;
    opacity: 0.4;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.target-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 30px;
    /* Чуть меньше основного для иерархии */
    color: rgb(255, 255, 255);
    font-weight: 600;
    font-family: inherit;
}

.target-grid span {
    font-variant-numeric: tabular-nums;
}

/* Стили новой маленькой панели */
.dooms-container {
    background-color: rgba(255, 255, 255, 0.05);
    /* Полупрозрачный фон */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Тонкая рамка */
    border-radius: 12px;
    /* Скругление как на сайте */
    padding: 15px 25px;
    text-align: center;
    min-width: 300px;
    visibility: hidden;
}

.dooms-label {
    color: #888;
    /* Серый неброский цвет для подписи */
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    visibility: hidden;
}

.dooms-grid {
    color: #ffffff;
    /* Белые цифры */
    font-size: 24px;
    /* Размер чуть меньше основного таймера */
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    /* Моноширинный шрифт, чтобы цифры не дергались */
    visibility: hidden;
}

.static-row {
    font-size: 24px;
    visibility: hidden;
}

#dooms-display span {
    display: inline-block;
    min-width: 35px;
    /* Резервируем место под цифры */
    visibility: hidden;
}

.stats-wrap {
    margin-top: 25px;
    margin-bottom: 0px;
    display: flex;
    flex-direction: column;
    /* Элементы встают друг под друга */
    align-items: center;
    gap: 8px;
    visibility: hidden;
    /* Расстояние между заголовком и цифрами */
}

/* Стиль самого заголовка */
.stats-label {
    font-size: 24px;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 10px;
}

.stats-label1 {
    font-size: 20px;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 10px;
}

.stats-label_bot {
    letter-spacing: 2px;
    margin-bottom: 0px;
}

.letter-c1, .letter-в1, .letter-о1 {
    font-size: 36px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    cursor: pointer; /* Указывает пользователю, что элемент интерактивен */
    transition: text-shadow 0.3s ease; /* Плавное появление тени */
    /* Запускаем анимацию на 3 секунды, бесконечно */
    animation: solidColorCycle 3s linear infinite;
}

.letter-c1:hover, .letter-в1:hover, .letter-о1:hover {
    text-shadow: 0 0 15px currentColor !important; 
}

.letter-c1 { animation-delay: 0s; }
.letter-в1 { animation-delay: -2s; }
.letter-о1 { animation-delay: -1s; }

.letter-c, .letter-в, .letter-о {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    cursor: pointer; /* Указывает пользователю, что элемент интерактивен */
    transition: text-shadow 0.3s ease; /* Плавное появление тени */
    /* Запускаем анимацию на 3 секунды, бесконечно */
    animation: solidColorCycle 3s linear infinite;
}

.letter-c:hover, .letter-в:hover, .letter-о:hover {
    text-shadow: 0 0 15px currentColor !important; 
}

.letter-c { animation-delay: 0s; }
.letter-в { animation-delay: -2s; }
.letter-о { animation-delay: -1s; }

.letter-c2, .letter-в2, .letter-о2 {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    /* Запускаем анимацию на 3 секунды, бесконечно */
    animation: solidColorCycle 3s linear infinite;
}

.letter-c2 { animation-delay: 0s; }
.letter-в2 { animation-delay: -2s; }
.letter-о2 { animation-delay: -1s; }

/* Общий круговорот цветов для каждой буквы */
@keyframes solidColorCycle {
    0%, 100% {
        color: #ffffff;
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
    }
    33.33% {
        color: #e44d2e;
        text-shadow: 0 0 5px rgba(228, 77, 46, 0.4);
    }
    66.66% {
        color: #0055a4;
        text-shadow: 0 0 5px rgba(0, 85, 164, 0.4);
    }
}

/* Стиль строки с цифрами (оставляем как было, но убираем лишний margin) */
.stats-row {
    font-size: 1.3rem;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-weight: 400;
    font-family: 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums;
}

.stats-divider {
    color: #444;
    /* Тусклый разделитель */
}

#percentage-count {
    color: #00ff88;
    /* Можно выделить процент зеленым или синим */
    font-weight: 600;
}

/* МОДАЛЬНОЕ ОКНО (без изменений размеров) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.modal-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 16px;
}

#modalAudio {
    width: 100%;
    max-width: 500px;
    filter: invert(100%);
    opacity: 0.8;
}

.close {
    position: absolute;
    top: -45px;
    right: 0;
    color: white;
    font-size: 36px;
    cursor: pointer;
}

/* Контейнер-ряд для кнопок управления */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 0px auto 25px auto;
    width: 100%;
    max-width: 400px;
}

/* Общие базовые стили для обеих кнопок */
.btn-calc, .btn-map {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
    outline: none;
}

/* Стилизация кнопки Калькулятора (Голубая) */
.btn-calc {
    background: rgb(21, 42, 74);
    box-shadow: 0 4px 14px rgb(27, 54, 93);
}

.btn-calc:hover {
    background: rgb(21, 42, 74);
    box-shadow: 0 6px 20px rgb(27, 54, 93);
    transform: translateY(-1px);
}

/* Стилизация кнопки Карты (Изумрудная) */
.btn-map {
    background: rgb(25, 53, 212);
    box-shadow: 0 4px 14px rgba(25, 53, 212);
}

.btn-map:hover {
    background: rgb(25, 53, 212);
    box-shadow: 0 6px 20px rgb(27, 63, 226);
    transform: translateY(-1px);
}

/* Эффект нажатия для обеих кнопок */
.btn-calc:active, .btn-map:active {
    transform: translateY(1px);
}

.modal-box {
    background: rgba(15, 23, 42, 0.95); /* Темный полупрозрачный фон */
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 450px;
    text-align: center;
    color: #ffffff;
}

.calc-title {
    margin-bottom: 10px;
    color: #ffffff;
}

.calc-desc {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 20px;
}

.calc-input {
    width: 100%;
    padding: 12px 16px;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box; /* Чтобы padding не увеличивал ширину сверх 100% */
    outline: none;
    transition: border-color 0.2s;
}

.calc-input:focus {
    border-color: rgba(33, 166, 228, 0.6);
}

.calc-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Стили для блока результата */
.calc-result {
    margin-top: 15px;
    font-size: 16px;
    color: #ffffff;
    font-weight: 500;
}

.calc-result.error {
    color: #ff4d4d;
}

.btn-submit {
    background: rgb(33, 166, 228);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}

/* Анимация скелетонов */
.is-loading #days, 
.is-loading #hours, 
.is-loading #minutes, 
.is-loading #seconds,
.is-loading #t-days,
.is-loading #t-hours,
.is-loading #t-min,
.is-loading #t-sec,
.is-loading #percentage-count,
.is-loading #percentage-count1 {
    color: transparent !important;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: loadingPulse 1.5s infinite;
    border-radius: 4px;
    display: inline-block;
    min-width: 40px;
    height: 1.2em;
}

@keyframes loadingPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.map-modal-wrap {
    width: 92% !important;
    max-width: 1200px !important;
    height: 80vh;
}

/* Контейнер интерактивного iframe */
.map-container {
    width: 100%;
    height: 100%;
    background: #0b0f19;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Адаптивность под мобильные экраны смартфонов */
@media (max-width: 480px) {
    body {
        overflow-y: auto; /* Позволяет скроллить страницу на мобильных при необходимости */
    }
    .action-buttons {
        flex-direction: column; /* Кнопки встают вертикально друг под друга */
        align-items: center;
        gap: 10px;
    }
    .btn-calc, .btn-map {
        width: 100%;
        max-width: 260px; /* Ограничиваем растягивание кнопок */
    }
    .map-modal-wrap {
        height: 70vh; /* Чуть уменьшаем высоту окна карты на мобилках для удобства закрытия */
        width: 95% !important;
    }
    .close {
        top: -40px;
        right: 5px;
    }
}