:root {
    --bg: #0b0d13;
    --surface: #121622;
    --surface-card: #181c28;
    --surface-hover: #1e2433;
    --border: #22293a;
    --border-light: rgba(255, 255, 255, 0.08);

    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --primary: #4a82c4;
    --primary-hover: #3b70b0;
    --primary-glow: rgba(74, 130, 196, 0.35);
    --accent: #6366f1;
    --success: #10b981;

    --pro-gradient: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
    --pro-glow: rgba(245, 158, 11, 0.3);

    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="light"] {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-card: #f0f3f8;
    --surface-hover: #e8ecf4;
    --border: #dbe2ea;
    --border-light: rgba(0, 0, 0, 0.06);

    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #8391a3;

    --primary: #2d68af;
    --primary-hover: #1f508d;
    --primary-glow: rgba(45, 104, 175, 0.22);

    --card-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Навигация */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
    z-index: 101;
}

.nav-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.nav-links-desktop {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.icon-btn:hover {
    background: var(--surface-hover);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.lang-btn {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Бургер-меню */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    z-index: 101;
}

.burger-line {
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.burger-btn.active .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger-btn.active .burger-line:nth-child(2) {
    opacity: 0;
}
.burger-btn.active .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    z-index: 100;
    padding: 90px 24px 36px;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mobile-drawer.open {
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

.mobile-nav-link {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .nav-links-desktop { display: none; }
    .burger-btn { display: flex; }
}

/* Секция Hero */
.hero {
    position: relative;
    overflow: hidden;
    padding: 60px 0 45px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#ambientWaveCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero-emblem-wrapper,
.hero h1,
.hero p,
.hero .cta-group {
    position: relative;
    z-index: 1;
}

.hero-emblem-wrapper {
    position: relative;
    width: 230px;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: ringPulse 3.6s linear infinite;
    pointer-events: none;
}

.pulse-ring:nth-child(1) { animation-delay: 0s; }
.pulse-ring:nth-child(2) { animation-delay: 1.2s; }
.pulse-ring:nth-child(3) { animation-delay: 2.4s; }

@keyframes ringPulse {
    0% { transform: scale(0.35); opacity: 0.45; }
    100% { transform: scale(1.05); opacity: 0; }
}

.emblem-glow {
    position: absolute;
    width: 175px;
    height: 175px;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(74, 130, 196, 0) 70%);
    border-radius: 50%;
}

.floating-logo {
    position: relative;
    width: 135px;
    height: 135px;
    z-index: 2;
    animation: floatBob 2.4s ease-in-out infinite alternate;
    filter: drop-shadow(0 10px 24px var(--primary-glow));
}

.floating-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@keyframes floatBob {
    0% { transform: translateY(-7px); }
    100% { transform: translateY(7px); }
}

.hero h1 {
    font-size: clamp(32px, 5vw, 50px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.18;
    margin-bottom: 18px;
    color: var(--text-main);
}

.hero p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 660px;
    margin: 0 auto 30px;
}

.cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-soon {
    background: var(--surface-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 16px 36px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: default;
    user-select: none;
    box-shadow: none;
    transition: border-color 0.2s;
}

.btn-soon:hover {
    border-color: var(--primary);
}

.btn-soon svg {
    width: 20px;
    height: 20px;
    fill: var(--primary);
}

.apk-meta {
    font-size: 12.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Галерея скриншотов */
.screenshots-section {
    margin: 50px 0 70px;
}

.carousel-wrapper {
    position: relative;
}

.screenshots-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 12px 4px 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    cursor: grab;
    user-select: none;
}

.screenshots-track:active {
    cursor: grabbing;
}

.screenshots-track::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.screenshot-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    transition: transform 0.2s;
}

.screenshot-card:hover {
    transform: translateY(-4px);
}

.screenshot-img-box {
    width: 100%;
    height: 480px;
    background: transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    pointer-events: none;
    -webkit-user-drag: none;
}

.screenshot-caption {
    padding: 18px 8px 12px;
}

.screenshot-caption h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.screenshot-caption p {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.carousel-nav-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 10;
    transition: all 0.15s;
}

.carousel-nav-btn:hover {
    background: var(--primary);
    color: #fff;
}

.carousel-nav-prev { left: -18px; }
.carousel-nav-next { right: -18px; }

@media (max-width: 768px) {
    .carousel-nav-btn { display: none; }
    .screenshot-card { flex: 0 0 240px; }
    .screenshot-img-box { height: 420px; }
}

/* Категории возможностей */
.categories-section {
    margin: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-main);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    gap: 24px;
}

@media (max-width: 640px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--card-shadow);
}

.category-top {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 14px;
}

.category-icon {
    width: 42px;
    height: 42px;
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--primary);
}

.category-top h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main);
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.bullet-point {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 8px;
    flex-shrink: 0;
}

.feature-text strong {
    color: var(--text-main);
    font-weight: 600;
}

.badge-pro {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--pro-gradient);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 2px 8px var(--pro-glow);
}

/* Информационная карточка PRO */
.pricing-section {
    margin: 60px 0;
}

.pricing-card {
    max-width: 620px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px 28px;
    box-shadow: var(--card-shadow);
    position: relative;
}

.pricing-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--pro-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px var(--pro-glow);
}

.pricing-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}

.pricing-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-features li {
    font-size: 14px;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.pricing-features li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 900;
}

.inapp-notice {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.inapp-notice svg {
    width: 28px;
    height: 28px;
    fill: var(--primary);
    flex-shrink: 0;
}

.inapp-notice strong {
    display: block;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 2px;
}

.inapp-notice span {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: block;
}

/* Системные требования */
.specs-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    margin: 50px 0;
    box-shadow: var(--card-shadow);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.spec-box {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}

.spec-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}

.spec-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.spec-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.specs-disclaimer {
    margin-top: 22px;
    padding: 14px 18px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: #d97706;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

[data-theme="dark"] .specs-disclaimer {
    color: #fde68a;
}

.specs-disclaimer svg {
    width: 18px;
    height: 18px;
    fill: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Шаги */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 50px 0 70px;
}

.step-item {
    display: flex;
    gap: 16px;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(74, 130, 196, 0.15);
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.step-content h4 {
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.step-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Футер */
footer {
    border-top: 1px solid var(--border-light);
    padding: 36px 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.legal-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.legal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.15s;
}

.legal-btn:hover {
    color: var(--text-main);
}

.footer-support {
    font-size: 12.5px;
    color: var(--text-muted);
}

.footer-support a {
    color: var(--primary);
    text-decoration: none;
}

/* Модальное окно */
dialog {
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 760px;
    width: 90%;
    max-height: 85vh;
    margin: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.btn-close:hover {
    color: var(--text-main);
    background: var(--surface-hover);
}

.btn-close svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.btn-download {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    padding: 16px 36px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 28px var(--primary-glow);
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px var(--primary-glow);
    color: #ffffff;
}

.btn-download:active {
    transform: translateY(0);
}

.btn-download svg {
    flex-shrink: 0;
}

.modal-body {
    overflow-y: auto;
    max-height: calc(85vh - 120px);
    padding-right: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-body h4 {
    color: var(--text-main);
    font-size: 15px;
    margin: 18px 0 8px;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body ul {
    margin: 8px 0 14px 20px;
}

.modal-body li {
    margin-bottom: 6px;
}
