/* ── Design Tokens ──────────────────────────────────── */
:root {
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --accent-soft: rgba(88, 101, 242, 0.15);

    --bg-page: #1e1f22;
    --bg-main: #313338;
    --bg-card: #2b2d31;
    --bg-surface: #383a40;
    --bg-overlay: #404249;

    --text-primary: #f2f3f5;
    --text-secondary: #b5bac1;
    --text-muted: #80848e;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.14);

    --green: #23a559;
    --green-soft: rgba(35, 165, 89, 0.15);
    --green-text: #2dc770;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Background Canvas ─────────────────────────────── */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ── Layout ────────────────────────────────────────── */
.container {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Logo ──────────────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: border-radius 0.2s ease;
}

.logo-icon:hover {
    border-radius: 16px;
}

.logo-text {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* ── Main ──────────────────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0 80px;
}

/* ── Badge ─────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--green-soft);
    color: var(--green-text);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 28px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Title ─────────────────────────────────────────── */
.title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.accent {
    color: var(--accent);
}

.subtitle {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 440px;
    line-height: 1.5;
    margin-bottom: 48px;
}

/* ── Notify Section ────────────────────────────────── */
.notify-section {
    width: 100%;
    max-width: 480px;
    margin-bottom: 48px;
}

.notify-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s ease;
}

.input::placeholder {
    color: var(--text-muted);
}

.input:focus {
    border-color: var(--accent);
}

.input.input-error {
    border-color: #da373c;
}

.btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

/* ── GDPR Checkbox ─────────────────────────────────── */
.gdpr-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    text-align: left;
}

.gdpr-check input[type="checkbox"] {
    display: none;
}

.checkmark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-main);
    position: relative;
    margin-top: 1px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.gdpr-check input[type="checkbox"]:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.gdpr-check input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkmark.checkmark-error {
    border-color: #da373c;
}

.gdpr-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.gdpr-text a {
    color: var(--accent);
    text-decoration: none;
}

.gdpr-text a:hover {
    text-decoration: underline;
}

/* ── Form Message ──────────────────────────────────── */
.form-message {
    font-size: 13px;
    font-weight: 500;
    min-height: 20px;
}

.form-message.success {
    color: var(--green-text);
}

.form-message.error {
    color: #da373c;
}

/* ── Unsubscribe Section ───────────────────────────── */
.unsub-section {
    width: 100%;
    max-width: 480px;
    margin-bottom: 32px;
}

.unsub-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-danger {
    background: #da373c;
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #c0292e;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease;
}

.back-home:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* ── Feature Cards ─────────────────────────────────── */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: left;
    transition: border-color 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.feature-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.feature-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Footer ────────────────────────────────────────── */
.footer {
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-links {
    margin-top: 6px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-surface);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-overlay);
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 640px) {
    .logo-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .logo-icon svg {
        width: 26px;
        height: 26px;
    }

    .logo-text {
        font-size: 26px;
    }

    .title {
        font-size: 32px;
    }

    .subtitle {
        font-size: 15px;
        max-width: 100%;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }

    .notify-section,
    .unsub-section {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .logo {
        gap: 10px;
    }

    .logo-icon {
        width: 42px;
        height: 42px;
    }

    .logo-icon svg {
        width: 22px;
        height: 22px;
    }

    .logo-text {
        font-size: 22px;
    }

    .title {
        font-size: 26px;
    }

    .subtitle {
        font-size: 14px;
    }

    .main {
        padding: 20px 0 60px;
    }

    .badge {
        font-size: 12px;
        padding: 5px 12px;
    }

    .feature-card {
        padding: 20px 16px;
    }
}
