/* =========================================================
   منصة طرازي Trazi — الهوية البصرية الحديثة (Glass & Social UI)
   ========================================================= */
:root {
    --bg-dark: #070a12;
    --bg-surface: #0d1322;
    --bg-card: rgba(20, 28, 46, 0.78);
    --bg-card-solid: #141c2e;
    --bg-card-hover: rgba(30, 41, 66, 0.92);
    --primary: #10b981;
    --primary-hover: #059669;
    --calm-blue: #38bdf8;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --gold-xp: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.09);
    --border-glow: rgba(16, 185, 129, 0.35);
    --insta-gradient: linear-gradient(135deg, #10b981 0%, #38bdf8 50%, #a855f7 100%);
    --shadow-soft: 0 12px 35px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.08) 0%, transparent 38%),
        radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(168, 85, 247, 0.06) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
}

/* شريط التمرير العصري */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #070a12; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.container {
    width: 92%;
    max-width: 1140px;
    margin: 0 auto;
}

/* الشريط العلوي الزجاجي (Glass Navbar) */
.navbar {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(7, 10, 18, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--insta-gradient);
    padding: 2px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.logo-icon img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 10px !important;
    object-fit: cover;
    background: #070a12;
}

.logo small,
.logo-text small {
    font-size: 0.85rem;
    background: var(--insta-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.94rem;
    padding: 6px 12px;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

/* الأزرار الحديثة */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.97);
}

.btn-outline {
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.14);
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 60%, #0d9488 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(16, 185, 129, 0.42);
}

.btn-large {
    padding: 16px 38px;
    font-size: 1.12rem;
    border-radius: 16px;
}

.btn-full {
    width: 100%;
    padding: 15px;
    font-size: 1.04rem;
}

/* القسم الرئيسي (Hero) */
.hero-section {
    padding: 55px 0 65px;
    text-align: center;
}

.hero-header {
    max-width: 780px;
    margin: 0 auto 48px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--calm-blue);
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 800;
    margin-bottom: 18px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.12);
}

.hero-header h1 {
    font-size: 2.55rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.28;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-header p {
    color: var(--text-muted);
    font-size: 1.12rem;
    max-width: 640px;
    margin: 0 auto;
}

/* ساحة المقارنة المتحركة */
.comparison-arena {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 22px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.scene-card {
    flex: 1;
    min-width: 300px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-radius: 22px;
    padding: 26px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    position: relative;
}

.stagnation-scene { opacity: 0.88; }
.stagnation-scene:hover { opacity: 1; }

.action-scene {
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.14);
}

.action-scene:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.scene-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 18px;
}

.badge-dim { background: rgba(148, 163, 184, 0.14); color: var(--text-muted); }
.badge-glow { background: rgba(16, 185, 129, 0.16); color: var(--primary); border: 1px solid rgba(16, 185, 129, 0.3); }

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

/* مسرح الرسوم المتحركة CSS */
.animation-stage {
    height: 165px;
    background: #060911;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-box { width: 100%; height: 100%; position: relative; }
.tv-screen {
    width: 65px; height: 45px; background: #1e293b; border: 3px solid #334155;
    border-radius: 8px; position: absolute; left: 35px; top: 45px; overflow: hidden;
}
.screen-flicker { width: 100%; height: 100%; background: linear-gradient(45deg, #38bdf8, #818cf8); animation: flicker 2s infinite alternate; }
.couch-person { position: absolute; right: 45px; bottom: 25px; display: flex; flex-direction: column; align-items: center; }
.person-head { width: 26px; height: 26px; border-radius: 50%; background: #94a3b8; margin-bottom: 4px; }
.person-head.sleepy { animation: nodSleep 3s infinite ease-in-out; }
.person-body { width: 42px; height: 38px; background: #475569; border-radius: 12px 12px 4px 4px; }
.floating-zzz { position: absolute; top: -30px; right: -10px; font-size: 0.85rem; color: var(--text-muted); animation: floatUp 3s infinite linear; }

.outdoor-box { width: 100%; height: 100%; background: linear-gradient(180deg, #0c262b 0%, #060911 100%); position: relative; }
.sun-glow { width: 48px; height: 48px; background: radial-gradient(circle, var(--gold-xp), transparent 70%); position: absolute; top: 15px; left: 25px; border-radius: 50%; animation: pulseGlow 2s infinite alternate; }
.xp-popup { position: absolute; top: 18px; right: 22px; background: rgba(245, 158, 11, 0.18); color: var(--gold-xp); border: 1px solid var(--gold-xp); padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; animation: bounceXp 1.8s infinite ease-in-out; }
.active-person { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; animation: walkBounce 0.7s infinite alternate ease-in-out; }
.person-head.happy { background: var(--primary); }
.person-body.moving { background: #10b981; width: 34px; height: 44px; border-radius: 12px 12px 6px 6px; }
.ground-track { position: absolute; bottom: 20px; width: 100%; height: 4px; background: repeating-linear-gradient(90deg, var(--primary) 0px, var(--primary) 20px, transparent 20px, transparent 40px); animation: moveRoad 1.5s infinite linear; }

.scene-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.scene-card p { color: var(--text-muted); font-size: 0.95rem; }

.cta-box { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cta-note { font-size: 0.86rem; color: var(--text-muted); }

/* قسم الأمان النفسي */
.safety-section {
    padding: 65px 0;
    background: rgba(13, 19, 34, 0.65);
    border-top: 1px solid var(--border-color);
}

.section-title { text-align: center; font-size: 1.85rem; font-weight: 800; margin-bottom: 40px; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    padding: 28px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.35);
}

.f-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 10px; font-size: 1.15rem; color: var(--calm-blue); }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* التذييل */
.footer {
    text-align: center;
    padding: 26px 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-top: 1px solid var(--border-color);
    background: rgba(7, 10, 18, 0.9);
}

/* الحركات */
@keyframes flicker { 0% { opacity: 0.35; } 100% { opacity: 0.9; } }
@keyframes nodSleep { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(15deg) translateY(3px); } }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(0); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }
@keyframes pulseGlow { 0% { transform: scale(0.95); opacity: 0.7; } 100% { transform: scale(1.15); opacity: 1; } }
@keyframes bounceXp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes walkBounce { 0% { transform: translateX(-50%) translateY(0); } 100% { transform: translateX(-50%) translateY(-8px); } }
@keyframes moveRoad { 0% { background-position: 0 0; } 100% { background-position: 40px 0; } }

/* =========================================================
   تنسيقات النماذج والتسجيل والبطاقات الموحدة (App Cards & Inputs)
   ========================================================= */
.register-wrapper {
    max-width: 620px;
    margin: 38px auto;
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    padding: 34px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.step-title { font-size: 1.55rem; font-weight: 800; margin-bottom: 8px; }
.step-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; }
.option-group { margin-bottom: 20px; }
.option-label { display: block; font-weight: 700; margin-bottom: 9px; color: var(--calm-blue); font-size: 0.94rem; }

.cards-select {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 12px;
}

.select-card {
    background: rgba(11, 17, 32, 0.85);
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    padding: 15px;
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s ease;
}

.select-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-2px);
}

.select-card.selected {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.14);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.select-card strong { display: block; margin-bottom: 4px; font-size: 0.98rem; color: #fff; }
.select-card span { font-size: 0.8rem; color: var(--text-muted); }

.input-field {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(9, 13, 24, 0.9);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 12px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

select.input-field option {
    background: #0d1322;
    color: #f8fafc;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

/* حلقة الأفاتار بأسلوب إنستقرام */
.trazi-avatar-ring {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    padding: 2.5px;
    background: var(--insta-gradient);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trazi-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #0d1322;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* شريط التنقل السفلي للهواتف (Mobile App Bottom Bar) */
.trazi-mobile-dock {
    display: none;
}

@media (max-width: 768px) {
    body { padding-bottom: 74px; }
    .hero-header h1 { font-size: 1.85rem; }
    .vs-divider { width: 100%; }
    .register-wrapper { padding: 24px 18px; margin: 20px auto; }

    .trazi-mobile-dock {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(7, 10, 18, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        justify-content: space-around;
        align-items: center;
        z-index: 99990;
        padding: 0 8px;
    }

    .trazi-dock-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.7rem;
        font-weight: 700;
        gap: 3px;
        padding: 6px 10px;
        border-radius: 12px;
        transition: 0.2s;
    }

    .trazi-dock-item span.dock-ico { font-size: 1.25rem; line-height: 1; }
    .trazi-dock-item.active, .trazi-dock-item:hover { color: var(--primary); background: rgba(16, 185, 129, 0.1); }
}