/* ─── Global Styles & Variables ─── */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --primary-50:   #fff4e6;
    --primary-100:  #ffe8cc;
    --primary-200:  #ffd8a8;
    --primary-300:  #ffc078;
    --primary-400:  #ffa94d;
    --primary-500:  #ff922b; /* Main */
    --primary-600:  #fd7e14;
    --primary-700:  #f76707;
    --primary-800:  #e8590c;
    --primary-900:  #d9480f;

    /* Accent Blue Palette */
    --accent-50:    #eff6ff;
    --accent-100:   #dbeafe;
    --accent-200:   #bfdbfe;
    --accent-300:   #93c5fd;
    --accent-400:   #60a5fa;
    --accent-500:   #3b82f6;
    --accent-600:   #2563eb;
    --accent-700:   #1d4ed8;
    --accent-800:   #1e40af;
    --accent-900:   #1e3a8a;

    /* Semantic Mappings */
    --brand:        var(--primary-500);
    --brand-light:  var(--primary-400);
    --brand-dark:   var(--primary-600);

    --action:       var(--accent-600);
    --action-hover: var(--accent-700);
    --action-soft:  var(--accent-50);
    
    /* Panel & Surface */
    --panel-bg:     #0b1120;
    --panel-border: rgba(255,255,255,0.06);
    --surface:      #ffffff;

    --radius-card:  28px;
    --radius-input: 14px;
    --radius-btn:   14px;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Tajawal', sans-serif;
    background-color: #f1f5f9;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

/* ─── Animations ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes marquee-y {
    from { transform: translateY(0); }
    to   { transform: translateY(-50%); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px var(--accent-100); }
    50% { box-shadow: 0 0 35px var(--accent-300); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60%  { transform: translateX(-4px); }
    40%, 80%  { transform: translateX( 4px); }
}
@keyframes spin { 
    from { transform: rotate(0); } 
    to { transform: rotate(360deg); } 
}

.fade-up { animation: fadeUp 0.55s cubic-bezier(.22,1,.36,1) both; }
.fade-in { animation: fadeIn 0.5s ease both; }
.animate-shake { animation: shake 0.4s ease; }

/* Delays */
.d1 { animation-delay: 0.06s; }
.d2 { animation-delay: 0.12s; }
.d3 { animation-delay: 0.18s; }
.d4 { animation-delay: 0.24s; }
.d5 { animation-delay: 0.30s; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 100px; border: 2px solid #f8fafc; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Refined Components */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    border-radius: var(--radius-card);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-card);
}

.btn-premium {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: white !important;
    border: none;
    border-radius: var(--radius-btn);
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255, 146, 43, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-premium:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 146, 43, 0.4);
}

.no-scroll::-webkit-scrollbar { display: none; }
.no-scroll { -ms-overflow-style: none; scrollbar-width: none; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { 
    background: #cbd5e1; 
    border-radius: 10px; 
    border: 2px solid #f1f5f9; 
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-300); }

/* Decorative Panel */
.left-panel {
    background-color: var(--panel-bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 110% -10%, rgba(255,146,43,0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at -10% 110%, rgba(37,99,235,0.12) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%,  rgba(255,255,255,0.02) 0%, transparent 70%);
}
.left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* Auth Card */
.auth-card {
    background: var(--surface);
    border-radius: var(--radius-card);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        0 8px 32px rgba(0,0,0,0.07),
        0 24px 64px rgba(0,0,0,0.05);
}

/* ─── Common UI Elements ─── */

.logo-mark {
    width: 48px; height: 48px;
    background: var(--brand);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px var(--accent-200);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.logo-mark:hover { 
    transform: scale(1.05); 
    box-shadow: 0 8px 32px var(--accent-300);
    background: linear-gradient(135deg, var(--brand) 0%, var(--action) 100%);
}

.divider {
    display: flex; align-items: center; gap: 14px;
    color: #94a3b8; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
}
.divider::before, .divider::after { content:''; flex:1; height:1px; background:#e2e8f0; }

.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.section-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--action) 100%);
    box-shadow: 0 0 10px var(--accent-200);
    flex-shrink: 0;
}
.section-title { font-size: 14px; font-weight: 900; color: #0f172a; letter-spacing: -.01em; }
.section-sub { font-size: 11px; font-weight: 500; color: #94a3b8; margin-right: auto; }

/* ─── Buttons ─── */

.btn-primary, .btn-submit {
    width: 100%;
    padding: 15px 24px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-btn);
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 4px 16px rgba(15,23,42,0.18);
}
.btn-submit { background: var(--brand); box-shadow: 0 6px 20px var(--primary-200); font-weight: 900; }


.btn-primary:hover, .btn-submit:hover { 
    background: #ffffff; 
    color: var(--brand); 
    transform: translateY(-1px); 
    box-shadow: 0 8px 24px rgba(15,23,42,0.24); 
}
.btn-submit:hover { background: var(--primary-hover); box-shadow: 0 8px 28px var(--primary-200); }
.btn-primary:active, .btn-submit:active { transform: translateY(0px) scale(0.99); }

.btn-google {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px 20px;
    background: #ffffff;
    color: #1e293b;
    border: 1.5px solid #e2e8f0;
    border-radius: 13px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px; font-weight: 700;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: all .18s;
}
.btn-google:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); }

.btn-outline {
    flex: 1; padding: 13px 16px; background: #ffffff; color: #334155;
    border: 1.5px solid #e2e8f0; border-radius: var(--radius-btn);
    font-size: 14px; font-weight: 700; text-align: center; text-decoration: none;
    transition: background 0.18s, border-color 0.18s;
}
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }

.btn-soft {
    flex: 1; padding: 13px 16px; background: var(--accent-50); color: var(--accent-700);
    border-radius: var(--radius-btn); font-size: 14px; font-weight: 700;
    text-align: center; text-decoration: none; transition: background 0.18s;
}
.btn-soft:hover { background: var(--accent-100); }

/* Pricing Buttons */
.plan-btn {
    width: 100%; padding: 16px 24px; border-radius: 18px;
    font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center;
    gap: 10px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none; cursor: pointer; text-decoration: none;
}
.plan-btn-primary {
    background: var(--action); color: white;
    box-shadow: 0 10px 20px var(--accent-200);
}
.plan-btn-primary:hover {
    background: var(--action-hover); transform: translateY(-2px);
    box-shadow: 0 12px 24px var(--accent-300);
}
.plan-btn-dark { background: #0f172a; color: white; }
.plan-btn-dark:hover { background: #1e293b; transform: translateY(-2px); }
.plan-btn:active { transform: scale(0.98); }

/* ─── Form Inputs ─── */

.form-input, .reg-input {
    width: 100%; padding: 14px 18px; background: #f8fafc;
    border: 1.5px solid #e2e8f0; border-radius: var(--radius-input);
    font-family: 'Tajawal', sans-serif; font-size: 15px; font-weight: 500;
    color: #0f172a; outline: none; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.reg-input { padding: 13px 16px; border-radius: 13px; font-size: 14px; }

.form-input:focus, .reg-input:focus {
    background: #ffffff; border-color: var(--action);
    box-shadow: 0 0 0 4px var(--accent-100);
}
.form-input:hover:not(:focus), .reg-input:hover:not(:focus) { border-color: #cbd5e1; }

.field-label, .field-lbl {
    display: block; font-size: 12px; font-weight: 800;
    color: #374151; margin-bottom: 7px; letter-spacing: .01em;
}

.pw-wrap { position: relative; }
.pw-toggle {
    position: absolute; top:50%; left:14px; transform: translateY(-50%);
    background:none; border:none; cursor:pointer; color:#94a3b8; padding:4px;
    display:flex; align-items:center; transition: color .2s;
}
.pw-toggle:hover { color:#475569; }

/* ─── Cards & Sections ─── */

.section-card {
    background: #ffffff;
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}

.feat-card {
    display: flex; align-items: center; gap: 12px; padding: 13px 15px;
    background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; transition: background 0.2s, border-color 0.2s;
}
.feat-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }

.feat-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--brand); background: var(--primary-50);
}
.feat-card:hover .feat-icon { background: var(--brand); color: white; }

.stat-card {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 16px;
}

/* ─── Registration Specifics ─── */

.plan-pick-card {
    background: #ffffff; border: 1.5px solid #e2e8f0; border-radius: 16px;
    padding: 23px 15px; cursor: pointer; display: flex; align-items: center;
    gap: 16px; transition: border-color .2s, box-shadow .2s; position: relative;
}
.plan-pick-card:hover { border-color: var(--accent-200); box-shadow: 0 4px 16px var(--accent-50); }
.plan-pick-card.selected {
    border-color: var(--brand); background: var(--accent-50);
    box-shadow: 0 6px 24px var(--accent-100);
}
.plan-radio {
    width: 22px; height: 22px; border: 2px solid #cbd5e1; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: all .18s;
}
.plan-radio::after {
    content: ''; width: 10px; height: 10px; background: #ffffff; border-radius: 50%;
    opacity: 0; transition: opacity .18s;
}
.plan-pick-card.selected .plan-radio { background: var(--brand); border-color: var(--brand); }
.plan-pick-card.selected .plan-radio::after { opacity: 1; }

.plan-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px 24px;
    font-size: 11px;
    font-weight: 900;
    border-radius: 0 0 0 24px;
    background: var(--brand);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 10;
}

.builder-mini-input {
    width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-weight: 800; text-align: center; outline: none; transition: border-color .2s;
}
.builder-mini-input:focus { border-color: var(--action); }

.pay-card {
    background: #0b1120; border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px; padding: 20px; position: relative; overflow: hidden;
}
.pay-card::before {
    content: ''; position: absolute; top: -40px; right: -40px; width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(37,99,235,.25) 0%, transparent 70%);
}

.pay-tab-bar { display: flex; gap: 4px; background: #f1f5f9; border-radius: 12px; padding: 4px; }
.pay-tab {
    flex: 1; padding: 8px 16px; font-size: 12px; font-weight: 800;
    border: none; border-radius: 9px; cursor: pointer; transition: all .2s;
    background: transparent; color: #94a3b8;
}
.pay-tab.active { background: #ffffff; color: var(--action); box-shadow: 0 2px 8px rgba(0,0,0,.07); }

.iban-field {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px; padding: 14px 16px; position: relative;
}
.iban-copy-btn {
    position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 4px 10px;
    font-size: 10px; font-weight: 800; color: #cbd5e1; cursor: pointer;
}
.iban-copy-btn:hover { background: var(--action); color: white; }

.uname-status {
    border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 12px 14px;
    margin-top: 8px; background: #f8fafc; display: none;
}

/* ─── Pricing Specifics ─── */

.plan-card {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 28px;
    padding: 32px; display: flex; flex-direction: column; position: relative;
    transition: all 0.3s cubic-bezier(.16,1,.3,1); overflow: hidden;
}
.plan-card:hover { border-color: var(--accent-200); box-shadow: 0 20px 40px rgba(15,23,42,0.06); transform: translateY(-4px); }
.plan-card.featured {
    border: 2px solid var(--action); background: linear-gradient(180deg, var(--accent-50) 0%, #ffffff 100%);
}
.plan-card.featured::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, var(--action), var(--accent-400));
}

.plan-price { font-size: 48px; font-weight: 900; letter-spacing: -0.04em; color: #0f172a; }

.feat-row { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: #475569; }
.feat-check {
    width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; background: #f0fdf4; color: #16a34a;
}
.featured .feat-check { background: var(--accent-50); color: var(--action); }

.builder-card {
    background: #0f172a; border-radius: 32px; padding: 48px;
    position: relative; overflow: hidden; color: white;
    border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 24px 48px rgba(0,0,0,0.2);
}
.builder-card::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 389px;
    height: 396px;
    background: radial-gradient(circle, #96e0ff90 0%, transparent 70%);
}

.range-slider {
    -webkit-appearance: none; width: 100%; height: 6px; background: rgba(255,255,255,0.1);
    border-radius: 5px; outline: none; margin: 20px 0;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 20px; height: 20px; background: var(--accent-400);
    border-radius: 50%; cursor: pointer; border: 4px solid #0f172a;
    box-shadow: 0 0 0 2px var(--accent-400); transition: all 0.2s;
}

.builder-input-group {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px; padding: 24px; transition: all 0.3s;
}
.builder-input-group:hover { border-color: var(--accent-400); }

.price-display {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 24px;
    padding: 32px; text-align: center; min-width: 220px; animation: pulse-glow 3s infinite;
}

/* Ticker & Marquee */
.ticker-outer {
    flex: 1; min-height: 0; overflow: hidden; position: relative; margin: 8px 0 24px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 14%, black 86%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 14%, black 86%, transparent 100%);
}
.ticker-track {
    display: flex; flex-direction: column; gap: 10px; animation: marquee-y 50s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }

/* ─── Utils ─── */
.error-box {
    padding: 14px 18px; background: #fef2f2; border: 1px solid #fecaca;
    color: #dc2626; border-radius: 14px; font-size: 13px; font-weight: 700; text-align: center;
}
.custom-check { accent-color: var(--brand); width: 18px; height: 18px; cursor: pointer; }

#payment-section { display: none; }
#payment-section.visible { display: block; }