/**
 * Лендинг GuitarPulse — состояние страницы и стили для динамического контента.
 * Основная вёрстка и стили из Figma (Tailwind) в mobile_landing.html, Tailwind CDN в index.html.
 */

/* Заголовки на лендинге: чем меньше экран, тем меньше шрифт */
.landing h1,
.mobile-landing h1 {
    font-size: clamp(1.5rem, 8vw + 1rem, 6rem) !important;
}
.landing h2,
.mobile-landing h2 {
    font-size: clamp(1.25rem, 6vw + 1rem, 4.5rem) !important;
}
.landing h3,
.mobile-landing h3 {
    font-size: clamp(1.125rem, 4vw + 0.5rem, 1.5rem) !important;
}
.landing h4,
.mobile-landing h4,
.landing .text-4xl,
.mobile-landing .text-4xl {
    font-size: clamp(1rem, 3vw + 0.5rem, 2.25rem) !important;
}

/* Секции: чем уже экран, тем меньше верхний и нижний паддинг */
.landing section,
.mobile-landing section {
    padding-top: clamp(1.5rem, 6vw + 1rem, 8rem) !important;
    padding-bottom: clamp(1.5rem, 6vw + 1rem, 8rem) !important;
}
/* Блоки с py-20 (например, контент в hero) — меньший максимум */
.landing .py-20,
.mobile-landing .py-20 {
    padding-top: clamp(1.25rem, 5vw + 0.75rem, 5rem) !important;
    padding-bottom: clamp(1.25rem, 5vw + 0.75rem, 5rem) !important;
}

/* ---------- Состояние страницы: показ лендинга ---------- */
.mobile-landing-active {
    overflow: hidden;
}

.mobile-landing-active .app-preloader,
.mobile-landing-active #app,
.mobile-landing-active .auth-modal,
.mobile-landing-active .telegram-banner {
    display: none !important;
}

/* ---------- Кнопка ИГРАТЬ в шапке (инжект из landing.js) ---------- */
.landing-header__cta .landing-cta-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-header__cta .landing-cta-play:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

/* ---------- Пульсация кнопки «ПОПРОБУЙ САМ» под видео ---------- */
@keyframes landing-cta-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.45);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(6, 182, 212, 0);
        transform: scale(1.02);
    }
}

.landing-cta-pulse {
    animation: landing-cta-pulse 2s ease-in-out infinite;
}

.landing-cta-pulse:hover {
    animation: none;
}

/* На мобильных кнопки ИГРАТЬ и ПОПРОБУЙ САМ остаются видимыми; по клику показывается сообщение «попробуй с ПК» (см. landing.js / mobileLanding.js) */

/* ---------- Блоки «Особенности» (features-grid): адаптивная вёрстка ---------- */
/* Ширина < 350px: картинка (иконка) по центру по ширине */
@media (max-width: 399px) {
    .feature-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .feature-card .feature-card-icon {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1.5rem;
    }
    .feature-card .feature-card-content {
        width: 100%;
    }
}

/* Ширина 350px–770px: в одну строку картинка и текст внутри каждого блока */
@media (min-width: 400px) and (max-width: 770px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    .feature-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
        text-align: left;
    }
    .feature-card .feature-card-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .feature-card .feature-card-content {
        flex: 1;
        min-width: 0;
    }
    .feature-card .feature-card-content h3 {
        margin-bottom: 0.5rem;
    }
}

/* ---------- Корень лендинга (оверлей поверх страницы) ---------- */
.landing.mobile-landing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    overflow-y: auto;
}

/* ---------- Список песен (инжектируется из landing.js) ---------- */
.songs-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.landing-song-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.6);
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.landing-song-card:hover {
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.song-info {
    display: flex;
    flex-direction: column;
}

.song-name {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

.song-level {
    font-size: 13px;
    color: rgba(148, 163, 184, 1);
}

.landing-play-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-play-btn:hover {
    transform: scale(1.05);
}

.landing-play-btn:active {
    transform: scale(0.98);
}

.landing-play-btn.playing {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
}

.play-icon {
    font-size: 18px;
    margin-left: 2px;
}

.landing-play-btn.playing .play-icon {
    margin-left: 0;
}

.landing-no-songs,
.landing-error,
.landing-songs-loading {
    text-align: center;
    padding: 20px;
    color: rgba(148, 163, 184, 1);
    font-size: 15px;
}
