:root {
    --bg: #04100a;
    --bg-soft: #0a1711;
    --panel: rgba(7, 19, 13, 0.84);
    --panel-strong: rgba(10, 25, 17, 0.96);
    --line: rgba(115, 255, 182, 0.08);
    --line-strong: rgba(73, 209, 125, 0.28);
    --text: #f1fbf4;
    --muted: #96b1a0;
    --accent: #49d17d;
    --accent-strong: #8df6ae;
    --accent-soft: rgba(73, 209, 125, 0.14);
    --success: #6df0a0;
    --danger: #ff7676;
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.46);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(73, 209, 125, 0.18), transparent 34%),
        radial-gradient(circle at 85% 8%, rgba(31, 107, 64, 0.22), transparent 28%),
        radial-gradient(circle at 15% 100%, rgba(141, 246, 174, 0.1), transparent 24%),
        linear-gradient(180deg, #07120d 0%, #030806 100%);
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
}

a {
    color: inherit;
}

.page-shell {
    position: relative;
    overflow-x: hidden;
    padding-bottom: 108px;
}

.ambient {
    position: fixed;
    inset: auto;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.ambient-top {
    top: -80px;
    right: -70px;
    background: rgba(73, 209, 125, 0.24);
}

.ambient-bottom {
    bottom: 20%;
    left: -90px;
    background: rgba(19, 92, 49, 0.24);
}

.calculator-page {
    position: relative;
    z-index: 1;
    padding-top: 22px;
    padding-bottom: 48px;
}

.hero-card,
.glass-card,
.mobile-bottom-bar {
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.hero-card {
    margin-bottom: 24px;
    padding: 22px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
        linear-gradient(180deg, rgba(12, 27, 19, 0.92), rgba(6, 12, 9, 0.97));
    box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-layout {
    display: grid;
    gap: 18px;
}

.hero-card h1,
.section-head h2,
.summary-top h2 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 3.45rem);
    line-height: 0.95;
    font-weight: 700;
}

.hero-copy {
    margin: 16px 0 0;
    max-width: 58ch;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.hero-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-chip {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.stat-chip span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.stat-chip strong {
    display: block;
    margin-top: 6px;
    font-size: 1.12rem;
    font-weight: 700;
}

.glass-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--panel), var(--panel-strong));
    box-shadow: var(--shadow);
}

.section-card,
.summary-card {
    padding: 20px;
}

.section-head,
.summary-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-head h2,
.summary-top h2 {
    font-size: 1.45rem;
    line-height: 1.1;
}

.section-badge,
.summary-currency {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid rgba(73, 209, 125, 0.22);
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 700;
}

.section-copy,
.summary-note,
.hint-text,
.value-caption,
.total-meta {
    color: var(--muted);
    line-height: 1.55;
}

.pricing-stack,
.chat-grid {
    display: grid;
    gap: 14px;
}

.field-card {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 500;
}

.form-label i {
    color: var(--accent);
    cursor: pointer;
}

.form-control {
    min-height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 10, 16, 0.85);
    color: var(--text);
    font-size: 1.05rem;
    padding: 14px 16px;
    box-shadow: none;
}

.form-control:focus {
    border-color: rgba(73, 209, 125, 0.52);
    box-shadow: 0 0 0 0.18rem rgba(73, 209, 125, 0.18);
    background: rgba(6, 10, 16, 0.96);
    color: var(--text);
}

.form-control::-webkit-outer-spin-button,
.form-control::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}

.value-caption,
.hint-text {
    display: block;
    margin-top: 8px;
}

.chat-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.chat-option:hover {
    transform: translateY(-1px);
    border-color: rgba(73, 209, 125, 0.24);
    background: rgba(255, 255, 255, 0.04);
}

.chat-option.is-active {
    border-color: rgba(73, 209, 125, 0.3);
    background: linear-gradient(180deg, rgba(73, 209, 125, 0.1), rgba(255, 255, 255, 0.03));
}

.chat-option .form-check-input {
    margin-top: 3px;
    min-width: 1.2rem;
    min-height: 1.2rem;
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.28);
}

.chat-option .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.chat-option span {
    display: grid;
    gap: 4px;
}

.chat-option strong {
    font-size: 1rem;
    font-weight: 600;
}

.chat-option a {
    color: var(--muted);
    text-decoration: none;
}

.chat-option a:hover {
    color: var(--accent);
}

.section-foot {
    margin-top: 12px;
}

.validation-text {
    margin-top: 8px;
    color: var(--danger);
    font-size: 0.94rem;
}

.currency-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.currency-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
}

.currency-pill input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
}

.currency-pill span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border-radius: inherit;
}

.currency-pill.is-active span {
    color: var(--bg);
    border-color: rgba(73, 209, 125, 0.35);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.rate-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.rate-line-label {
    color: var(--text);
    font-weight: 600;
}

.rate-line-value {
    text-align: right;
}

.summary-card {
    position: sticky;
    top: 20px;
}

.summary-tools {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(73, 209, 125, 0.1);
    background: linear-gradient(180deg, rgba(73, 209, 125, 0.07), rgba(255, 255, 255, 0.02));
}

.summary-tools-head {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.summary-tools-label {
    color: var(--muted);
    font-size: 0.95rem;
}

.total-block {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(73, 209, 125, 0.14), rgba(73, 209, 125, 0.03)),
        rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(73, 209, 125, 0.18);
}

.total-label {
    color: var(--muted);
    font-size: 0.92rem;
}

.total-amount {
    margin-top: 8px;
    font-size: clamp(2rem, 7vw, 3.15rem);
    line-height: 0.95;
    font-weight: 700;
}

.total-meta {
    margin-top: 10px;
    font-size: 0.95rem;
}

.summary-list {
    display: grid;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-row span {
    color: var(--muted);
}

.summary-row strong {
    text-align: right;
    font-weight: 700;
}

.summary-row-accent {
    border-color: rgba(33, 194, 119, 0.18);
    background: rgba(33, 194, 119, 0.08);
}

.summary-row-accent strong {
    color: var(--success);
}

.summary-note {
    margin: 16px 0 18px;
    font-size: 0.95rem;
}

.btn-order,
.btn-modal {
    border: 0;
    border-radius: 18px;
    min-height: 56px;
    font-weight: 700;
}

.btn-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #041008;
    box-shadow: 0 16px 32px rgba(73, 209, 125, 0.28);
}

.btn-order:hover,
.btn-order:focus {
    color: #041008;
    background: linear-gradient(135deg, #59dc8b, #a7ffbf);
}

.btn-order.disabled,
.btn-order[disabled] {
    pointer-events: none;
    opacity: 0.55;
    box-shadow: none;
}

.btn-order-compact {
    min-height: 50px;
    min-width: 128px;
    padding-inline: 18px;
}

.mobile-bottom-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(6, 16, 11, 0.92);
    box-shadow: var(--shadow);
}

.mobile-bar-label {
    color: var(--muted);
    font-size: 0.82rem;
}

.mobile-bar-value {
    margin-top: 4px;
    font-size: 1.28rem;
    font-weight: 700;
}

.modal-crypto {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(11, 24, 17, 0.98), rgba(6, 12, 9, 0.98));
    color: var(--text);
}

.modal-crypto .modal-header,
.modal-crypto .modal-footer {
    border-color: rgba(255, 255, 255, 0.08);
}

.modal-crypto ul {
    padding-left: 18px;
    color: var(--muted);
}

.btn-modal {
    padding: 0 22px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.btn-modal:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

@media (min-width: 768px) {
    .calculator-page {
        padding-top: 34px;
    }

    .hero-card,
    .section-card,
    .summary-card {
        padding: 28px;
    }

    .hero-layout {
        grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
        align-items: end;
    }

    .pricing-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-stack .field-card:last-child {
        grid-column: span 2;
    }

    .chat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-shell {
        padding-bottom: 36px;
    }

    .mobile-bottom-bar {
        display: none;
    }
}

@media (min-width: 1200px) {
    .section-card,
    .summary-card {
        padding: 30px;
    }
}

@media (max-width: 767.98px) {
    .summary-card {
        position: static;
    }

    .hero-card h1 {
        max-width: 9ch;
    }
}
