:root {
    --purple: #9333ea;
    --purple-light: #c084fc;
    --cyan: #06b6d4;
    --cyan-light: #22d3ee;
    --magenta: #d946ef;
    --bg-dark: #050508;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: rgba(248, 250, 252, 0.72);
    --text-muted: rgba(248, 250, 252, 0.48);
    --success: #34d399;
    --error: #f87171;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-glow: 0 0 80px rgba(147, 51, 234, 0.25), 0 0 120px rgba(6, 182, 212, 0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-yekan, "Yekan Bakh VF", Tahoma, system-ui, sans-serif);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.bg-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(147, 51, 234, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 80% 80%, rgba(6, 182, 212, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(217, 70, 239, 0.12) 0%, transparent 50%),
        linear-gradient(160deg, #0a0612 0%, #050508 40%, #030810 100%);
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 12s ease-in-out infinite;
}

.bg-orb-1 { width: 420px; height: 420px; background: rgba(147, 51, 234, 0.35); top: -120px; right: -80px; }
.bg-orb-2 { width: 360px; height: 360px; background: rgba(6, 182, 212, 0.3); bottom: -100px; left: -60px; animation-delay: -4s; }
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 20%, transparent 80%);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.05); }
    66% { transform: translate(-15px, 20px) scale(0.97); }
}

.page {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow), inset 0 1px 0 var(--glass-highlight);
}

.header { text-align: center; margin-bottom: 24px; animation: fadeUp 0.7s ease both; }

.logo-wrap { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.logo-wrap img { width: min(200px, 70vw); height: auto; filter: drop-shadow(0 8px 32px rgba(147, 51, 234, 0.4)); }
.logo-text {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--purple-light), var(--cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(147,51,234,0.25), rgba(6,182,212,0.2));
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--cyan-light);
    margin-bottom: 12px;
}

.badge-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--cyan-light);
    box-shadow: 0 0 8px var(--cyan);
    animation: pulse 2s ease infinite;
}

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

.header h1 {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--purple-light), var(--cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.header p.subtitle { font-size: 0.9rem; color: var(--text-secondary); }

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
    animation: fadeUp 0.7s 0.08s ease both;
}

.plan-card {
    position: relative;
    padding: 16px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s, background 0.22s;
    text-align: center;
}

.plan-card:hover {
    border-color: rgba(6, 182, 212, 0.35);
    transform: translateY(-2px);
}

.plan-card.is-selected {
    border-color: rgba(168, 85, 247, 0.55);
    background: linear-gradient(135deg, rgba(147,51,234,0.18), rgba(6,182,212,0.1));
    box-shadow: 0 8px 32px rgba(147, 51, 234, 0.25);
}

.plan-card input { position: absolute; opacity: 0; pointer-events: none; }

.plan-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cyan-light);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(6,182,212,0.3);
    background: rgba(6,182,212,0.1);
    margin-bottom: 8px;
}

.plan-title { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.plan-price { font-size: 1.05rem; font-weight: 800; color: #fff; }
.plan-price small { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); }

.info-card { padding: 24px; margin-bottom: 18px; animation: fadeUp 0.7s 0.12s ease both; }
.info-card h2 {
    font-size: 1rem; font-weight: 700; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.info-card h2 svg { flex-shrink: 0; color: var(--cyan-light); }
.info-card p { font-size: 0.875rem; color: var(--text-secondary); text-align: justify; }

.features { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.features li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 0.85rem; color: var(--text-secondary);
}
.features li::before {
    content: '';
    flex-shrink: 0;
    width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/12px no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/12px no-repeat;
}

.price-card {
    padding: 24px; margin-bottom: 18px; text-align: center;
    animation: fadeUp 0.7s 0.16s ease both;
    position: relative; overflow: hidden;
}
.price-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(147,51,234,0.08), rgba(6,182,212,0.06));
    pointer-events: none;
}
.price-label { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; position: relative; }
.price-amount {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
    font-weight: 800; position: relative; line-height: 1.2;
    background: linear-gradient(135deg, #fff 30%, var(--cyan-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.price-currency {
    font-size: 1rem; font-weight: 500; color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
}
.price-period { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; position: relative; }

.checkout-card { padding: 24px; margin-bottom: 18px; animation: fadeUp 0.7s 0.2s ease both; }
.checkout-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 18px; }

.uid-display,
.user-display {
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.08);
    margin-bottom: 18px;
    text-align: center;
}

.uid-label,
.user-label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }

.uid-value,
.user-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--success);
    letter-spacing: 0.02em;
}

.user-value { color: var(--cyan-light); }

.uid-display small,
.user-display small { display: block; margin-top: 8px; font-size: 0.75rem; color: var(--text-muted); }

.alert {
    padding: 14px 16px; border-radius: var(--radius-sm);
    font-size: 0.85rem; margin-bottom: 16px; line-height: 1.6;
}
.alert-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}
.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fcd34d;
}

.btn-pay {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple) 0%, var(--magenta) 50%, var(--cyan) 100%);
    background-size: 200% 200%;
    box-shadow: 0 8px 32px rgba(147, 51, 234, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-pay:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(147, 51, 234, 0.5);
}

.btn-pay:disabled, .btn-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    animation: none;
    pointer-events: none;
}

.secure-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 14px;
}

.footer {
    text-align: center;
    animation: fadeUp 0.7s 0.24s ease both;
}

.footer-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-note a { color: var(--cyan-light); text-decoration: none; }

.result-card {
    width: 100%;
    max-width: 440px;
    padding: 32px 28px;
    text-align: center;
}

.result-icon { font-size: 3rem; margin-bottom: 12px; }
.result-card h1 { font-size: 1.35rem; font-weight: 800; margin-bottom: 12px; }
.result-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }
.order-code { font-size: 0.82rem; color: var(--text-muted); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 380px) {
    .page { padding: 24px 16px 40px; }
    .plan-grid { grid-template-columns: 1fr; }
}
