:root {
    color-scheme: dark;
    --bg: #07070d;
    --surface: #101019;
    --surface-2: #161622;
    --border: rgba(255, 255, 255, .09);
    --text: #f7f7fb;
    --muted: #a3a3b2;
    --purple: #8b5cf6;
    --purple-2: #a78bfa;
    --cyan: #22d3ee;
    --green: #34d399;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 8% 15%, rgba(124, 58, 237, .12), transparent 28rem),
        radial-gradient(circle at 90% 48%, rgba(8, 145, 178, .08), transparent 26rem),
        var(--bg);
    color: var(--text);
    font-family: "Tajawal", sans-serif;
    line-height: 1.5;
}

button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.pricing-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 72px;
    padding: 0 clamp(18px, 4vw, 64px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 7, 13, .82);
    backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-size: 1.12rem; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.topbar-back { justify-self: start; display: inline-flex; align-items: center; gap: 9px; color: #d4d4de; font-weight: 700; }
.topbar-back:hover { color: #fff; }
.topbar-cta {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    background: #fff;
    color: #11111a;
    font-weight: 800;
    transition: transform .2s, box-shadow .2s;
}
.topbar-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,255,255,.12); }

main { overflow: hidden; }
.pricing-hero {
    position: relative;
    max-width: 980px;
    margin: 0 auto;
    padding: 88px 24px 72px;
    text-align: center;
}
.hero-glow { position: absolute; pointer-events: none; filter: blur(70px); opacity: .32; border-radius: 50%; }
.hero-glow-one { width: 300px; height: 220px; background: var(--purple); top: 30px; right: 12%; }
.hero-glow-two { width: 240px; height: 180px; background: #0891b2; bottom: 0; left: 12%; }
.eyebrow, .section-kicker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #c4b5fd;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .03em;
}
.eyebrow {
    padding: 8px 14px;
    border: 1px solid rgba(167, 139, 250, .24);
    border-radius: 999px;
    background: rgba(124, 58, 237, .1);
}
.pricing-hero h1 {
    position: relative;
    margin: 22px 0 18px;
    font-size: clamp(2.4rem, 6vw, 4.9rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}
.pricing-hero h1 span {
    background: linear-gradient(90deg, #c4b5fd, #a78bfa 45%, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.pricing-hero > p { position: relative; max-width: 650px; margin: 0 auto; color: var(--muted); font-size: 1.1rem; }
.hero-points { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 26px; color: #d7d7e1; font-size: .9rem; }
.hero-points span { display: inline-flex; align-items: center; gap: 7px; }
.hero-points i { color: var(--green); }
.hero-calculator-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 36px;
    color: #ddd6fe;
    font-weight: 800;
}
.hero-calculator-link i { animation: bounce 1.8s infinite; }
@keyframes bounce { 50% { transform: translateY(4px); } }

.packages-section, .calculator-section, .trust-strip, .final-cta {
    width: min(1380px, calc(100% - 40px));
    margin-inline: auto;
}
.packages-section { padding: 56px 0 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.section-heading h2, .calculator-intro h2 { margin: 7px 0 0; font-size: clamp(1.75rem, 3vw, 2.65rem); line-height: 1.2; }
.section-heading > p { max-width: 500px; margin: 0; color: var(--muted); font-size: .92rem; }
.packages-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}
.package-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 25px 20px 20px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(155deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
    box-shadow: 0 18px 45px rgba(0,0,0,.15);
    transition: transform .25s, border-color .25s, background .25s;
}
.package-card:hover { transform: translateY(-6px); border-color: rgba(167,139,250,.35); background: linear-gradient(155deg, rgba(124,58,237,.1), rgba(255,255,255,.025)); }
.package-card.featured {
    border-color: rgba(139, 92, 246, .65);
    background: linear-gradient(155deg, rgba(124,58,237,.18), rgba(20,20,31,.92));
    box-shadow: 0 25px 65px rgba(91, 33, 182, .18);
}
.popular-badge {
    position: absolute;
    top: -13px;
    right: 50%;
    transform: translateX(50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 5px 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #9333ea);
    font-size: .72rem;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(124,58,237,.35);
}
.package-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.package-audience { color: var(--muted); font-size: .72rem; font-weight: 600; }
.package-head h3 { margin: 3px 0 0; font-size: 1.25rem; }
.package-price { display: flex; direction: ltr; align-items: start; color: #fff; }
.package-price strong { font-size: 2.1rem; line-height: 1; letter-spacing: -.04em; }
.package-price span { margin: 2px 0 0 3px; color: #c4b5fd; font-weight: 800; }
.credits-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin: 20px 0 14px; }
.credits-total strong { font-size: 1.4rem; color: #ddd6fe; }
.credits-total span { color: var(--muted); font-size: .82rem; }
.credits-total em { width: 100%; color: var(--green); font-style: normal; font-size: .73rem; font-weight: 800; }
.generation-estimates { display: grid; gap: 8px; padding: 13px 0; border-block: 1px solid var(--border); }
.generation-estimates div { display: flex; gap: 8px; align-items: center; color: #d5d5df; font-size: .78rem; }
.generation-estimates i { width: 18px; color: #a78bfa; text-align: center; }
.generation-estimates strong { color: #fff; font-size: .9rem; }
.package-card ul { margin: 16px 0 22px; padding: 0; list-style: none; display: grid; gap: 8px; }
.package-card li { display: flex; align-items: start; gap: 7px; color: var(--muted); font-size: .76rem; }
.package-card li i { margin-top: 4px; color: var(--green); font-size: .68rem; }
.package-cta {
    margin-top: auto;
    display: grid;
    place-items: center;
    min-height: 44px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 12px;
    background: rgba(255,255,255,.055);
    font-size: .84rem;
    font-weight: 800;
}
.featured .package-cta { border-color: transparent; background: linear-gradient(135deg, #7c3aed, #9333ea); }
.package-cta:hover { background: #fff; color: #11111a; }
.estimate-note { display: flex; align-items: start; gap: 8px; margin: 18px 4px 0; color: #858594; font-size: .76rem; }
.estimate-note i { margin-top: 3px; color: #a78bfa; }

.calculator-section {
    display: grid;
    grid-template-columns: minmax(250px, .7fr) minmax(560px, 1.3fr);
    gap: clamp(35px, 7vw, 100px);
    align-items: center;
    padding: 86px clamp(24px, 5vw, 72px);
    border: 1px solid var(--border);
    border-radius: 30px;
    background:
        radial-gradient(circle at 15% 20%, rgba(124,58,237,.15), transparent 40%),
        #0d0d16;
}
.calculator-intro > p { margin: 16px 0 0; color: var(--muted); }
.calculator-benefit { display: flex; gap: 13px; align-items: center; margin-top: 28px; }
.calculator-benefit > i { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 14px; background: rgba(139,92,246,.14); color: #c4b5fd; }
.calculator-benefit div { display: grid; gap: 2px; }
.calculator-benefit strong { font-size: .9rem; }
.calculator-benefit span { color: var(--muted); font-size: .78rem; }
.calculator-card { padding: 20px; border: 1px solid rgba(255,255,255,.11); border-radius: 24px; background: rgba(22,22,34,.92); box-shadow: 0 28px 80px rgba(0,0,0,.26); }
.calculator-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 5px; border-radius: 14px; background: #0b0b12; }
.calculator-tab { min-height: 46px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 800; }
.calculator-tab.active { background: #242436; color: #fff; box-shadow: 0 5px 15px rgba(0,0,0,.25); }
.calculator-tab i { margin-left: 6px; color: #a78bfa; }
.calculator-panel { padding: 22px 2px 20px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > span { color: #b9b9c5; font-size: .76rem; font-weight: 700; }
.field select, .number-control {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    outline: none;
    background: #0d0d15;
}
.field select { padding: 0 13px; appearance: none; cursor: pointer; }
.field select:focus, .number-control:focus-within { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,.12); }
.field[hidden] { display: none; }
.number-control { display: grid; grid-template-columns: 42px 1fr 42px; overflow: hidden; }
.number-control button { border: 0; background: rgba(255,255,255,.045); color: #c4b5fd; cursor: pointer; font-size: 1.2rem; }
.number-control button:hover { background: rgba(139,92,246,.15); }
.number-control input { min-width: 0; border: 0; outline: 0; background: transparent; text-align: center; font-weight: 800; appearance: textfield; }
.number-control input::-webkit-inner-spin-button { appearance: none; }
.calculation-result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(139,92,246,.28);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(124,58,237,.13), rgba(34,211,238,.045));
}
.result-main, .recommended-package { display: grid; align-content: center; }
.result-main > span, .recommended-package > span { color: var(--muted); font-size: .73rem; }
.result-main > div { direction: rtl; display: flex; align-items: baseline; gap: 6px; }
.result-main strong { font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1; letter-spacing: -.04em; }
.result-main em { color: #c4b5fd; font-style: normal; font-size: .82rem; font-weight: 800; }
.result-main small, .recommended-package small { color: #9393a2; font-size: .69rem; }
.recommended-package { padding-right: 15px; border-right: 1px solid var(--border); }
.recommended-package strong { margin: 4px 0 2px; color: #67e8f9; font-size: 1.25rem; }
.result-cta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 47px;
    margin-top: 4px;
    border-radius: 12px;
    background: #fff;
    color: #11111a;
    font-weight: 900;
}
.result-cta:hover { background: #ddd6fe; }
.calculator-disclaimer { display: flex; gap: 7px; align-items: start; margin: 12px 4px 0; color: #858594; font-size: .68rem; }
.calculator-disclaimer i { margin-top: 3px; color: #a78bfa; }

.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 70px; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--border); }
.trust-strip > div { display: grid; grid-template-columns: 40px 1fr; align-items: center; padding: 24px; background: #0e0e17; }
.trust-strip i { grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(139,92,246,.12); color: #c4b5fd; }
.trust-strip strong { font-size: .86rem; }
.trust-strip span { color: var(--muted); font-size: .72rem; }
.final-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-top: 28px;
    margin-bottom: 70px;
    padding: clamp(28px, 5vw, 55px);
    border-radius: 26px;
    background:
        radial-gradient(circle at 85% 20%, rgba(34,211,238,.16), transparent 34%),
        linear-gradient(135deg, #29145a, #151525 65%);
}
.final-cta span { color: #c4b5fd; font-size: .78rem; font-weight: 800; }
.final-cta h2 { margin: 5px 0 7px; font-size: clamp(1.5rem, 3vw, 2.4rem); }
.final-cta p { margin: 0; color: #b7b7c5; }
.final-cta > a { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px; border-radius: 13px; background: #fff; color: #15151d; font-weight: 900; }
footer { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 20px; padding: 26px 24px calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); color: var(--muted); font-size: .78rem; }
.footer-brand { color: #fff; }
.footer-brand img { width: 26px; height: 26px; }
footer p { margin: 0; }
footer > a:last-child { color: #c4b5fd; font-weight: 700; }

@media (max-width: 1180px) {
    .packages-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .package-card.featured { order: -1; }
}
@media (max-width: 850px) {
    .pricing-topbar { height: 62px; padding-inline: 16px; }
    .brand > span, .topbar-back > span { display: none; }
    .topbar-cta { min-height: 38px; padding-inline: 13px; font-size: .78rem; }
    .pricing-hero { padding: 65px 18px 48px; }
    .section-heading { display: block; }
    .section-heading > p { margin-top: 12px; }
    .packages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calculator-section { grid-template-columns: 1fr; padding: 42px 22px; }
    .trust-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .pricing-topbar { grid-template-columns: 45px 1fr auto; }
    .brand { justify-self: center; }
    .topbar-cta span { display: none; }
    .topbar-cta { width: 40px; padding: 0; justify-content: center; }
    .pricing-hero h1 { font-size: 2.45rem; }
    .pricing-hero > p { font-size: .95rem; }
    .hero-points { gap: 10px 15px; font-size: .76rem; }
    .packages-section, .calculator-section, .trust-strip, .final-cta { width: min(100% - 24px, 1380px); }
    .packages-grid { grid-template-columns: 1fr; gap: 12px; }
    .package-card.featured { order: 0; margin-top: 10px; }
    .package-head h3 { font-size: 1.35rem; }
    .generation-estimates div, .package-card li { font-size: .82rem; }
    .calculator-section { padding: 34px 14px; border-radius: 22px; }
    .calculator-card { padding: 13px; border-radius: 18px; }
    .field-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .calculation-result { grid-template-columns: 1fr; }
    .recommended-package { padding: 12px 0 0; border-right: 0; border-top: 1px solid var(--border); }
    .result-cta { grid-column: auto; }
    .trust-strip { grid-template-columns: 1fr; }
    .trust-strip > div { padding: 18px; }
    .final-cta { display: grid; text-align: center; }
    .final-cta > a { justify-content: center; }
    footer { display: grid; justify-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
