*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --vk-blue: #0077ff;
    --vk-blue-dark: #0066dd;
    --vk-blue-light: #e8f2ff;
    --accent: #6366f1;
    --accent-light: #eef2ff;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 48px rgba(15, 23, 42, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(20px, 5vw, 64px);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.logo__icon {
    display: flex;
    flex-shrink: 0;
}

.logo__img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.logo__accent {
    color: var(--vk-blue);
}

.header__nav {
    display: flex;
    gap: 28px;
}

.header__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.header__link:hover {
    color: var(--vk-blue);
}

/* ── Hero ── */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 48px) clamp(20px, 5vw, 64px) clamp(48px, 8vw, 80px);
    width: 100%;
}

.hero__badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--vk-blue-light);
    color: var(--vk-blue);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 100px;
    margin-bottom: 20px;
    letter-spacing: 0.01em;
}

.hero__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
}

.hero__vk {
    color: var(--vk-blue);
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-muted);
    margin: 0 0 36px;
    max-width: 480px;
    line-height: 1.7;
}

.hero__stats {
    display: flex;
    gap: clamp(24px, 4vw, 48px);
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero__stats li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero__stats strong {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.hero__stats span {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ── Login card ── */

.login-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: clamp(28px, 4vw, 40px);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--vk-blue), var(--accent));
}

.login-card__title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.login-card__desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 28px;
    line-height: 1.6;
}

.login-form__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.login-form__input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.login-form__input-wrap:focus-within {
    border-color: var(--vk-blue);
    box-shadow: 0 0 0 4px rgba(0, 119, 255, 0.12);
}

.login-form__prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--vk-blue);
    flex-shrink: 0;
}

.login-form__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 16px 14px 0;
    font-size: 1rem;
    font-family: var(--font);
    color: var(--text);
    outline: none;
    min-width: 0;
}

.login-form__input::placeholder {
    color: var(--text-light);
}

.login-form__input-wrap:has(.login-form__input--error) {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.login-form__error {
    color: #ef4444;
    font-size: 0.82rem;
    margin: 8px 0 0;
    font-weight: 500;
}

.login-form__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 20px;
    padding: 14px 24px;
    background: var(--vk-blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.login-form__btn:hover {
    background: var(--vk-blue-dark);
    box-shadow: 0 4px 16px rgba(0, 119, 255, 0.35);
}

.login-form__btn:active {
    transform: scale(0.98);
}

.login-card__note {
    font-size: 0.78rem;
    color: var(--text-light);
    text-align: center;
    margin: 20px 0 0;
    line-height: 1.5;
}

.login-card__note a {
    color: var(--vk-blue);
    text-decoration: none;
}

.login-card__note a:hover {
    text-decoration: underline;
}

/* --- Verify step --- */
.verify-step__link {
    display: block;
    padding: 12px 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--vk-blue);
    font-size: 0.9rem;
    word-break: break-all;
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}

.verify-step__link:hover {
    border-color: var(--vk-blue);
    background: rgba(0, 119, 255, 0.04);
}

.verify-step__mock {
    margin: 12px 0 0;
    padding: 10px 14px;
    background: #fff8e6;
    border: 1px solid #f5d78e;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: #8a6d1a;
    line-height: 1.5;
}

.verify-step__hint {
    margin: 16px 0 0;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: #991b1b;
    line-height: 1.55;
}

.verify-step__hint strong {
    display: block;
    margin-bottom: 6px;
}

.verify-step__hint p {
    margin: 0;
}

.verify-step__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.verify-step__back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--font);
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.verify-step__back:hover {
    color: var(--vk-blue);
}

.login-form__btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ── Features ── */

.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 64px) clamp(48px, 8vw, 80px);
    width: 100%;
}

.features__header {
    text-align: center;
    margin-bottom: 40px;
}

.features__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.features__subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 1rem;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.feature-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-card--reposts .feature-card__icon {
    background: #fef3c7;
    color: #d97706;
}

.feature-card--likes .feature-card__icon {
    background: #fce7f3;
    color: #db2777;
}

.feature-card--friends .feature-card__icon {
    background: var(--vk-blue-light);
    color: var(--vk-blue);
}

.feature-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.feature-card__text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.65;
}

.feature-card__tag {
    display: inline-block;
    margin-top: 20px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 100px;
    background: var(--bg);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── About ── */

.about {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: clamp(48px, 8vw, 80px) clamp(20px, 5vw, 64px);
}

.about__inner {
    max-width: 720px;
    margin: 0 auto;
}

.about__title {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    text-align: center;
    margin: 0 0 40px;
    letter-spacing: -0.02em;
}

.about__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about__steps li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 24px;
}

.about__step-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--vk-blue);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}

.about__steps strong {
    display: block;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 4px;
}

.about__steps p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ── Footer ── */

.footer {
    margin-top: auto;
    padding: 32px clamp(20px, 5vw, 64px);
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer__link {
    color: var(--vk-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer__link:hover {
    text-decoration: underline;
}

.footer__support {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.footer__help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0d4a7a 0%, #1a9e9e 100%);
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(13, 74, 122, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.footer__help-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 74, 122, 0.28);
}

.footer__copy {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: var(--text-light);
}

.footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 12px;
}

/* ── Legal / info pages ── */

.legal {
    flex: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 48px) clamp(20px, 5vw, 64px) clamp(48px, 8vw, 80px);
    width: 100%;
}

.legal__card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 40px);
    box-shadow: var(--shadow-sm);
}

.legal__title {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
}

.legal__updated,
.legal__lead {
    margin: 0 0 24px;
    color: var(--text-muted);
}

.legal__section {
    margin-bottom: 28px;
}

.legal__section h2 {
    margin: 0 0 12px;
    font-size: 1.1rem;
}

.legal__section p,
.legal__section li {
    color: var(--text-muted);
}

.legal__section ul,
.legal__section ol {
    margin: 0;
    padding-left: 1.25rem;
}

.legal__section li + li {
    margin-top: 8px;
}

.legal__section a {
    color: var(--vk-blue);
}

.legal__contact-email {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--vk-blue);
    text-decoration: none;
}

.legal__packages {
    list-style: none;
    padding: 0;
}

.legal__packages li {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.legal__packages li + li {
    margin-top: 10px;
}

.legal__note {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.legal__cta-wrap {
    margin: 28px 0 0;
    text-align: center;
}

.legal__cta {
    display: inline-flex;
    text-decoration: none;
    width: auto;
}

.legal__requisites {
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    overflow: hidden;
}

.legal__requisites-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr;
    gap: 8px 16px;
    padding: 14px 16px;
}

.legal__requisites-row + .legal__requisites-row {
    border-top: 1px solid var(--border);
}

.legal__requisites dt {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.legal__requisites dd {
    margin: 0;
    color: var(--text-muted);
}

.legal__requisites-inn {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    color: var(--text);
}

.payment-partner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.payment-partner__logo-link {
    display: inline-flex;
}

.payment-partner__logo {
    display: block;
    height: 40px;
    width: auto;
}

.payment-partner p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ── Responsive ── */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero__content {
        text-align: center;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__stats {
        justify-content: center;
    }

    .features__grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .header__nav {
        display: none;
    }

    .hero__stats {
        flex-wrap: wrap;
        gap: 20px;
    }

    .hero__stats li {
        flex: 1;
        min-width: 80px;
        align-items: center;
        text-align: center;
    }
}

/* ── Modals (landing page) ── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay--open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 24px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal--alert {
    padding: 0;
    overflow: hidden;
    max-width: 400px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 90dvh);
}

.modal--alert .modal__header,
.modal--alert .modal__footer {
    flex-shrink: 0;
}

.modal--alert .modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #0d4a7a 0%, #1a9e9e 100%);
    color: #fff;
}

.modal__header--welcome {
    background: #5181b8;
}

.modal__header-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.modal__close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.modal__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.modal__body {
    padding: 20px 18px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
}

.modal__body p {
    margin: 0 0 12px;
}

.modal__body p:last-child {
    margin-bottom: 0;
}

.modal__body--welcome {
    text-align: center;
    padding: 22px 20px;
}

.modal__body--welcome p {
    margin: 0 0 14px;
}

.modal__body--welcome p:last-child {
    margin-bottom: 0;
}

.welcome-balance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0 0 18px;
    padding: 18px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8ec 100%);
    border: 1px solid rgba(232, 93, 106, 0.2);
}

.welcome-balance__icon {
    font-size: 1.6rem;
    line-height: 1;
    color: #e85d6a;
}

.welcome-balance__amount {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: #1a2b3c;
}

.welcome-balance__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal__footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    background: #f1f5f9;
    border-top: 1px solid var(--border);
}

.modal__footer .btn {
    min-width: 96px;
    padding: 10px 20px;
}

.btn {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background var(--transition), opacity var(--transition);
}

.btn--primary {
    background: var(--vk-blue);
    color: #fff;
}

.btn--primary:hover:not(:disabled) {
    background: var(--vk-blue-dark);
}
