/**
 * Только главная страница (/) — оболочка до лендинга.
 * Без правил игры: они в styles.css + redesign.css на /game/.
 */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow: hidden;
}

/* Токены и фон — фрагмент из redesign.css (без top-bar, грифа, настроек) */
body.gp-theme-2026 {
    --gp-bg: #020617;
    --gp-bg-card: #0f172a;
    --gp-border: #1e293b;
    --gp-text: #f8fafc;
    --gp-muted: #94a3b8;
    --gp-accent: #22d3ee;
    --gp-accent-2: #a78bfa;

    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color-scheme: dark;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--gp-text);
    background: var(--gp-bg);
}

body.gp-theme-2026::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(900px 500px at 15% 0%, rgba(34, 211, 238, 0.18), transparent 60%),
        radial-gradient(900px 500px at 85% 10%, rgba(167, 139, 250, 0.16), transparent 60%),
        radial-gradient(1200px 800px at 50% 100%, rgba(34, 211, 238, 0.08), transparent 65%),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

body.gp-theme-2026 a {
    color: var(--gp-text);
}

body.gp-theme-2026 :focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.85);
    outline-offset: 2px;
}

/* Прелоадер (как в styles.css + палитра темы) */
.app-preloader {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(2, 6, 23, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.app-preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.app-preloader-spinner {
    width: 64px;
    height: 64px;
    border: 5px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--gp-accent, #22d3ee);
    border-radius: 50%;
    animation: app-preloader-spin 1s linear infinite;
}

.app-preloader-text {
    font-size: 1rem;
    text-align: center;
}

body.app-ready .app-preloader,
body.mobile-landing-active .app-preloader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes app-preloader-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Баннер Telegram (мобильные) */
.telegram-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: white;
    padding: 10px 15px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 9999;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.telegram-banner:hover {
    background: linear-gradient(135deg, #229ED9 0%, #2AABEE 100%);
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.3);
}

.telegram-banner .telegram-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    animation: telegram-pulse 2s ease-in-out infinite;
}

.telegram-banner .telegram-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: 0.3px;
}

@keyframes telegram-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (max-width: 768px) {
    .telegram-banner {
        display: flex !important;
    }
}

/* Редкий блок из index (если покажется) */
@keyframes shell-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(245, 213, 6, 1); }
    50% { transform: scale(1.3); box-shadow: 0 0 15px rgba(245, 213, 6, 1); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(245, 213, 6, 1); }
}

#audioWarning {
    animation: shell-pulse 2s infinite;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.7);
}
