:root {
    --bg: #0E0F1B;
    --bg-deep: #08091A;
    --panel: rgba(20, 22, 42, 0.78);
    --panel-strong: #1A1B2E;
    --line: rgba(255, 255, 255, 0.1);
    --line-2: rgba(255, 255, 255, 0.18);
    --text: #F0F0FA;
    --soft: #B8BCD0;
    --muted: #8B90AB;
    --purple: #7B5BFF;
    --purple-2: #9D80FF;
    --purple-deep: #4730D5;
    --orange: #FF6B35;
    --orange-2: #FF8856;
    --orange-deep: #D64A18;
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }

body {
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    font-family: var(--font-sans);
    color: var(--text);
    background:
        radial-gradient(900px 540px at 100% 100%, rgba(123, 91, 255, 0.32), transparent 65%),
        radial-gradient(700px 460px at 0% 0%, rgba(255, 107, 53, 0.12), transparent 60%),
        linear-gradient(180deg, var(--bg), var(--bg-deep));
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.stage {
    width: min(1200px, calc(100vw - 40px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    height: min(720px, calc(100svh - 40px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    margin: max(20px, env(safe-area-inset-top, 20px)) auto max(20px, env(safe-area-inset-bottom, 20px)) auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 18px;
    animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === VISUAL (LEFT) === */
.visual {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    padding: clamp(16px, 1.6vw, 22px);
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(123, 91, 255, 0.1) 0%, var(--panel-strong) 70%, var(--bg-deep) 100%);
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.brand-bar {
    display: flex; align-items: center; gap: 12px;
    justify-content: space-between;
    z-index: 2;
}
.route {
    padding: 5px 11px;
    border-radius: 6px;
    background: rgba(123, 91, 255, 0.14);
    border: 1px solid rgba(157, 128, 255, 0.32);
    color: var(--purple-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.brand {
    display: flex; align-items: center; gap: 12px;
    font-size: 17px; font-weight: 800;
    letter-spacing: -0.005em;
}
.brand-mark {
    width: 38px; height: 38px;
    border-radius: 12px;
    color: var(--orange-2);
    background: linear-gradient(135deg, rgba(123, 91, 255, 0.4), rgba(255, 107, 53, 0.18));
    border: 1px solid var(--line-2);
    display: grid; place-items: center;
}
.brand-mark svg { width: 22px; height: 22px; }

.photo-frame {
    position: relative;
    min-height: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    align-self: center;
    border-radius: 14px;
    overflow: hidden;
    background: #050614;
    border: 1px solid var(--line);
}
.slider, .slide { width: 100%; height: 100%; }
.slide {
    position: absolute; inset: 0;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity 0.9s ease;
}
.slide.active { opacity: 1; }

.counter {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    background: rgba(20, 22, 42, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--line-2);
    color: var(--soft);
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.counter i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--orange-2);
    box-shadow: 0 0 0 0 rgba(255, 136, 86, 0.55);
    animation: livePulse 1.6s infinite;
}
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 136, 86, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(255, 136, 86, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 136, 86, 0); }
}

/* === CARD (RIGHT) === */
.card {
    min-width: 0;
    display: flex; flex-direction: column;
    padding: clamp(20px, 2vw, 30px);
    border-radius: 20px;
    background:
        linear-gradient(160deg, rgba(123, 91, 255, 0.12), transparent 50%),
        var(--panel);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    border: 1px solid var(--line-2);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.card-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(255, 107, 53, 0.4);
    width: fit-content;
}
.card-tag svg { width: 14px; height: 14px; }

h1 {
    margin: clamp(14px, 2vh, 20px) 0 0;
    font-size: clamp(28px, min(3vw, 4.6vh), 42px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.025em;
}
h1 em {
    font-style: italic;
    font-weight: 900;
    background-image: linear-gradient(110deg, var(--orange-2) 0%, var(--purple-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card p {
    margin: 12px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--soft);
    max-width: 38ch;
}

.metrics {
    margin: clamp(18px, 2.6vh, 24px) 0 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.metrics .m {
    padding: 14px 10px;
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(123, 91, 255, 0.12), rgba(255, 107, 53, 0.05));
    border: 1px solid var(--line-2);
    text-align: center;
}
.metrics .m span {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background-image: linear-gradient(110deg, var(--orange-2), var(--purple-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.metrics .m small {
    display: block;
    margin-top: 6px;
    font-size: 10.5px;
    color: var(--soft);
    letter-spacing: 0.02em;
}

.actions {
    margin-top: auto;
    padding-top: clamp(16px, 2.4vh, 22px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.trust-line {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}
.trust-line li { display: inline-flex; align-items: center; gap: 5px; }
.tl-mark { color: var(--orange-2); font-weight: 800; font-size: 12px; }

.btn {
    position: relative;
    min-height: 54px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 0 18px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.btn .arr { width: 18px; height: 18px; opacity: 0.85; transition: transform 0.2s; }
.btn:hover .arr { transform: translateX(3px); }

.btn-primary {
    color: white;
    min-height: 64px;
    font-size: 16.5px;
    background: linear-gradient(180deg, var(--orange-2), var(--orange) 50%, var(--orange-deep));
    box-shadow: 0 18px 40px rgba(255, 107, 53, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn-primary .ic-max-bg { fill: rgba(255, 255, 255, 0.22); }
.btn-primary:hover {
    box-shadow: 0 22px 48px rgba(255, 107, 53, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.btn-ghost {
    color: var(--soft);
    min-height: 50px;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    border: 1px solid var(--line-2);
}
.btn-ghost svg { width: 18px; height: 18px; opacity: 0.85; }
.btn-ghost:hover {
    color: var(--text);
    background: rgba(123, 91, 255, 0.1);
    border-color: rgba(157, 128, 255, 0.4);
}

.btn:focus-visible { outline: 2px solid var(--purple-2); outline-offset: 3px; }

.footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.01em;
}
.footer span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.footer a {
    color: var(--soft);
    text-decoration: underline;
    text-decoration-color: rgba(184, 188, 208, 0.4);
    text-underline-offset: 2px;
    flex-shrink: 0;
}
.footer a:hover { color: var(--orange-2); }

/* === MOBILE === */
@media (min-width: 861px) and (max-width: 1080px) {
    .stage {
        width: calc(100vw - 24px);
        gap: 12px;
    }
    .card { padding: 22px; }
    h1 { font-size: clamp(26px, 3.2vw, 34px); }
    .metrics .m { padding: 12px 8px; }
    .metrics .m span { font-size: 19px; }
}

@media (max-width: 860px) {
    .stage {
        width: min(460px, calc(100vw - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
        height: calc(100svh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        margin: max(8px, env(safe-area-inset-top, 8px)) auto max(8px, env(safe-area-inset-bottom, 8px)) auto;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 0.95fr) auto;
        gap: 8px;
    }
    .visual { padding: 12px; gap: 10px; }
    .brand { font-size: 15px; gap: 10px; }
    .brand-mark { width: 32px; height: 32px; }
    .brand-mark svg { width: 18px; height: 18px; }

    .counter { font-size: 9px; padding: 5px 10px 5px 8px; top: 8px; right: 8px; }
    .counter i { width: 6px; height: 6px; }

    .card { padding: 16px; border-radius: 18px; }
    .card-tag { font-size: 10px; padding: 5px 10px 5px 8px; }
    .card-tag svg { width: 12px; height: 12px; }
    h1 { font-size: clamp(22px, 6vw, 28px); margin-top: 10px; }
    .card p { font-size: 12px; margin-top: 8px; }
    .metrics { margin-top: 12px; gap: 6px; }
    .metrics .m { padding: 10px 6px; }
    .metrics .m span { font-size: 17px; }
    .metrics .m small { font-size: 9.5px; }
    .actions { gap: 6px; padding-top: 10px; grid-template-columns: 1fr; }
    .btn-primary { min-height: 56px; font-size: 14.5px; padding: 0 14px; }
    .btn-ghost { min-height: 44px; font-size: 12.5px; padding: 0 12px; }
    .btn svg { width: 18px; height: 18px; }
    .route { font-size: 9.5px; padding: 4px 9px; }
    .trust-line { gap: 10px; font-size: 9.5px; margin-top: 8px; }
    .trust-line li { gap: 4px; }
    .tl-mark { font-size: 11px; }
    .footer { font-size: 9px; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 8px; margin-top: 10px; }
}

@media (max-width: 380px) {
    .stage { gap: 6px; }
    .visual { padding: 10px; gap: 8px; }
    .card { padding: 12px; }
    .brand { font-size: 13.5px; gap: 8px; }
    .brand-mark { width: 28px; height: 28px; }
    .brand-mark svg { width: 16px; height: 16px; }
    .route { font-size: 8.5px; padding: 3px 7px; }
    .card-tag { font-size: 9px; }
    h1 { font-size: 20px; }
    .card p { font-size: 11.5px; }
    .metrics .m { padding: 8px 4px; }
    .metrics .m span { font-size: 15px; }
    .metrics .m small { font-size: 9px; }
    .btn-primary { min-height: 50px; font-size: 13.5px; }
    .btn-ghost { min-height: 40px; font-size: 11.5px; }
}

@media (max-height: 620px) and (max-width: 860px) {
    .card p { display: none; }
    .metrics { display: none; }
}

@media (min-width: 861px) and (max-height: 720px) {
    .stage {
        height: calc(100dvh - 24px);
        margin: 12px auto;
    }
    h1 { font-size: clamp(26px, 4.6vh, 36px); }
    .btn { min-height: 50px; }
    .card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .slide { transform: none !important; }
}

/* === COOKIE BANNER === */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 14px;
    border-radius: 999px;
    background: rgba(8, 9, 26, 0.94);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    color: var(--soft);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.3;
    max-width: calc(100vw - 16px);
    white-space: nowrap;
    animation: cookieSlide 0.4s ease both;
}
@keyframes cookieSlide {
    from { opacity: 0; transform: translate(-50%, 14px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
.cookie-banner[hidden] { display: none; }
.cookie-text-full { display: inline; }
.cookie-text-short { display: none; }
.cookie-text a { color: var(--orange-2); text-decoration: underline; text-underline-offset: 2px; }
.cookie-accept, .cookie-close {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: filter 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.cookie-accept {
    padding: 7px 13px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--orange-2), var(--orange));
    color: #fff;
    font-size: 11.5px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.45);
}
.cookie-accept:hover { filter: brightness(1.08); }
.cookie-close {
    width: 26px; height: 26px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(240, 240, 250, 0.7);
    font-size: 16px;
    line-height: 1;
    display: grid; place-items: center;
}
.cookie-close:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }
@media (max-width: 480px) {
    .cookie-banner { font-size: 10.5px; padding: 5px 5px 5px 12px; gap: 6px; }
    .cookie-text-full { display: none; }
    .cookie-text-short { display: inline; }
    .cookie-accept { padding: 6px 11px; font-size: 10.5px; }
    .cookie-close { width: 22px; height: 22px; font-size: 14px; }
}
