 :root {
    --bg: #edf3f6;
    --bg-2: #dfeaf1;
    --panel: rgba(255, 255, 255, 0.28);
    --panel-2: rgba(255, 255, 255, 0.14);
    --border: rgba(96, 119, 136, 0.2);
    --text: #1d2a38;
    --muted: #5e6d7c;
    --blue: #2d7bd8;
    --blue-dark: #1d5fb4;
    --green: #35c2b0;
    --shadow: 0 8px 20px rgba(34, 50, 74, 0.08);
}

body.dark-theme {
    --bg: #0f1722;
    --bg-2: #1a2433;
    --panel: rgba(21, 30, 40, 0.9);
    --panel-2: rgba(35, 52, 68, 0.9);
    --border: rgba(158, 177, 198, 0.18);
    --text: #edf5ff;
    --muted: #cfe4ff;
    --blue: #6db1ff;
    --blue-dark: #8ac2ff;
    --green: #53dcc0;
    --shadow: 0 12px 24px rgba(2, 6, 12, 0.45);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Manrope", sans-serif;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    color: var(--text);
    transition: background 0.25s ease, color 0.25s ease;
}

body {
    display: flex;
    justify-content: center;
}

button {
    font: inherit;
}

a {
    color: var(--blue-dark);
}

.account-link {
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 440px);
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.auth-brand {
    display: inline-block;
    margin-bottom: 28px;
    color: var(--text);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.06em;
    text-decoration: none;
}

.auth-card h1 {
    margin: 0;
    color: var(--text);
    font-size: 1.8rem;
}

.auth-intro {
    margin: 10px 0 22px;
    color: var(--muted);
    line-height: 1.5;
}

.auth-card form {
    display: grid;
    gap: 10px;
}

.auth-card label {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.auth-card input {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.24);
    color: var(--text);
}

.auth-submit {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    margin-top: 12px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #3a8fe3, #2b75ca);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.auth-error,
.auth-success {
    padding: 11px 13px;
    border-radius: 9px;
    font-size: 0.86rem;
    line-height: 1.4;
}

.auth-error {
    background: rgba(255, 225, 220, 0.8);
    color: #8c3f2b;
}

.auth-success {
    background: rgba(218, 249, 238, 0.8);
    color: #17654f;
}

.auth-link {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

.dashboard-actions {
    display: grid;
    gap: 10px;
}

.subscription-list {
    margin: 24px 0;
}

.subscription-list h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 1.05rem;
}

.subscription-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-2);
}

.subscription-item + .subscription-item {
    margin-top: 10px;
}

.subscription-item h3 {
    margin: 0;
    font-size: 1rem;
}

.subscription-item p {
    margin: 5px 0 8px;
    color: var(--muted);
    font-size: 0.85rem;
}

.subscription-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.status-active {
    background: rgba(218, 249, 238, 0.85);
    color: #17654f;
}

.status-cancelled,
.status-expired {
    background: rgba(235, 239, 243, 0.9);
    color: #62717d;
}

.status-pending {
    background: rgba(255, 239, 201, 0.9);
    color: #86601d;
}

.cancel-button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(185, 92, 64, 0.4);
    border-radius: 8px;
    background: transparent;
    color: #8c3f2b;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.page {
    width: 100%;
    max-width: 1260px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 16px 32px 0;
}

header {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.brand {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: var(--text);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    border-radius: 999px;
    padding: 4px 8px 4px 10px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.lang-pill {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    padding: 5px 10px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    border: none;
    background: transparent;
    cursor: pointer;
}

.lang-pill.active {
    background: rgba(58, 74, 90, 0.06);
    color: var(--text);
}

body.dark-theme .lang-pill.active {
    background: rgba(255, 255, 255, 0.08);
}

.icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--panel-2);
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    cursor: pointer;
}

.icon-btn::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 6px;
    top: 6px;
    border-radius: 50%;
    background: linear-gradient(180deg, #5a6470, #2f3c4e);
    box-shadow: 8px 0 0 0 rgba(255,255,255,0.08);
}

.icon-btn.dark::before {
    background: linear-gradient(180deg, #f7d06e, #f0a17d);
    box-shadow: 0 0 0 0 rgba(0,0,0,0);
}

.hero {
    display: grid;
    grid-template-columns: 1.08fr 0.76fr;
    gap: 38px;
    align-items: center;
    padding: 8px 8px 12px;
}

.hero-copy {
    padding-left: 8px;
}

.headline {
    margin: 0;
    font-weight: 800;
    font-size: clamp(3.5rem, 4.8vw, 6.2rem);
    line-height: 0.84;
    letter-spacing: -0.08em;
    color: var(--text);
}

.headline .accent {
    display: block;
    color: #4e9adf;
    background: linear-gradient(180deg, #63b4ef, #2f7ed5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 5px;
}

.lead {
    margin-top: 18px;
    max-width: 480px;
    font-size: 1.08rem;
    line-height: 1.5;
    color: var(--muted);
    font-weight: 500;
}

.benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 26px;
    color: var(--text);
}

.benefit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 10px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.check {
    display: inline-block;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: linear-gradient(180deg, #6ad0c8, #3bb8b0);
    position: relative;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7);
}

.check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.signup {
    width: min(100%, 430px);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 22px 24px 18px;
    margin-top: 8px;
}

h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    text-align: left;
    color: var(--text);
}

.signup p {
    margin: 12px 0 16px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
}

.input-wrap {
    position: relative;
    margin-top: 0;
}

input[type="email"] {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.24);
    padding: 0 18px;
    font-size: 1rem;
    color: var(--text);
    outline: none;
}

input::placeholder {
    color: #8394a3;
}

.cta-button {
    display: block;
    width: 100%;
    margin-top: 16px;
    border: none;
    border-radius: 12px;
    padding: 15px 18px;
    background: linear-gradient(180deg, #3a8fe3, #2b75ca);
    color: white;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(45, 123, 216, 0.24);
}

.legal {
    margin-top: 14px;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--muted);
    text-align: center;
}

.form-status {
    min-height: 1.25rem;
    margin: 10px 0 0;
    color: var(--blue-dark);
    font-size: 0.78rem;
    line-height: 1.4;
    text-align: center;
}

.toggle-wrap {
    margin: 18px auto 0;
    display: flex;
    justify-content: center;
}

.segmented {
    display: inline-flex;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px;
    gap: 4px;
}

.segment {
    border: none;
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.segment.active {
    background: linear-gradient(180deg, #4c90dc, #2d7bd8);
    color: white;
    box-shadow: 0 6px 12px rgba(45, 123, 216, 0.22);
}

.pricing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 20px;
    padding: 10px 0 30px;
}

.database-alert {
    grid-column: 1 / -1;
    margin: 0;
    padding: 16px;
    border: 1px solid rgba(185, 92, 64, 0.35);
    border-radius: 12px;
    background: rgba(255, 235, 225, 0.75);
    color: #8c3f2b;
    text-align: center;
}

.plan {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 18px 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.plan h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
}

.plan .subtitle {
    margin: 8px 0 16px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.price {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: var(--text);
}

.price .currency {
    font-size: 2.2rem;
    line-height: 1;
    margin-top: 10px;
}

.price .value {
    font-size: 3rem;
    line-height: 1;
}

.price .period {
    font-size: 0.82rem;
    line-height: 1.2;
    padding-top: 14px;
    color: var(--muted);
    font-weight: 700;
}

.note {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.6;
}

.features {
    list-style: none;
    padding: 0;
    margin: 22px 0 0;
    display: grid;
    gap: 10px;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.45;
}

.features li {
    position: relative;
    padding-left: 23px;
}

.features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--green);
    font-weight: 900;
}

.plan .start-btn {
    margin-top: auto;
    width: 100%;
    border: none;
    background: linear-gradient(180deg, #4491de, #2f7dd7);
    color: white;
    font-weight: 800;
    border-radius: 12px;
    height: 48px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(52, 123, 208, 0.2);
}

.plan-form {
    margin-top: auto;
}

.plan-form .start-btn {
    margin-top: 0;
}

.plan-login {
    text-align: center;
}

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    padding: 14px 0 24px;
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding-left: 0;
    }

    .signup {
        margin: 0 auto;
    }

    .pricing {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .page {
        padding-left: 18px;
        padding-right: 18px;
    }

    .brand {
        font-size: 1.5rem;
    }

    .headline {
        font-size: 2.8rem;
    }

    .benefits {
        flex-direction: column;
        align-items: flex-start;
    }

    .segmented {
        flex-wrap: wrap;
    }
}