/* ================================================================
   🎨 اكتشف مسارك - Discover Your Path
   Immersive Educational Experience Stylesheet
   ================================================================ */

/* ==================== CSS Custom Properties ==================== */
:root {
    /* Primary Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    /* Base Colors */
    --bg-dark: #0a0a1a;
    --bg-primary: #12122a;
    --bg-secondary: #1a1a3a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.08);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Accent Colors */
    --accent-purple: #667eea;
    --accent-pink: #f093fb;
    --accent-blue: #4facfe;
    --accent-cyan: #00f2fe;
    --accent-gold: #ffd700;

    /* Path Colors */
    --path-medical: #00d9a6;
    --path-engineering: #4facfe;
    --path-business: #ffa726;
    --path-humanities: #ec407a;
    --path-science: #7c4dff;
    --path-art: #ff7043;
    --path-military: #78909c;
    --path-islamic: #26a69a;

    /* Effects */
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
    --shadow-card: 0 15px 35px rgba(0, 0, 0, 0.2);

    /* Borders */
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Global Footer */
    --global-footer-height: 48px;
    --global-footer-offset: calc(var(--global-footer-height) + env(safe-area-inset-bottom, 0px));
}

/* ==================== CSS Reset ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== Ambient Canvas ==================== */
#ambientCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ==================== Sound Toggle ==================== */
.sound-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.sound-toggle svg {
    width: 24px;
    height: 24px;
}

.sound-toggle .sound-off {
    display: none;
}

.sound-toggle.muted .sound-on {
    display: none;
}

.sound-toggle.muted .sound-off {
    display: block;
}

/* ==================== Main App Container ==================== */
.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-bottom: var(--global-footer-offset);
}

/* ==================== Global Footer - منصة إرحب الرقمية ==================== */
.irheb-global-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    min-height: var(--global-footer-height);
    padding: 0.35rem 0.75rem;
    padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(10, 10, 26, 0.84) 0%, rgba(10, 10, 26, 0.96) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.28);
    line-height: 1.3;
}
.irheb-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 600;
    transition: color 0.2s ease;
}
.irheb-footer-link:hover {
    color: var(--accent-cyan);
}
.irheb-footer-brand {
    color: rgba(255, 255, 255, 0.85);
}
.irheb-footer-dot {
    opacity: 0.4;
    font-weight: 300;
    font-size: 0.65rem;
}
.irheb-footer-url {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* ==================== Stage Base Styles ==================== */
.stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    padding: var(--space-xl);
    padding-bottom: calc(var(--space-xl) + var(--global-footer-offset)); /* مساحة للفوتر كي لا يغطي المحتوى */
    overflow-y: auto;
    box-sizing: border-box;
}

.stage.active {
    opacity: 1;
    visibility: visible;
}

.stage-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

/* ==================== Stage 0: Hook ==================== */
#stage-hook {
    background: radial-gradient(ellipse at center, var(--bg-secondary) 0%, var(--bg-dark) 100%);
}

.hook-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
}

/* irheb Platform Badge */
.irheb-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-xl);
    animation: fadeInDown 0.8s ease 0.5s backwards;
}

.irheb-mini-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.irheb-badge span {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 500;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Page irheb Branding */
.result-irheb-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.result-brand-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    opacity: 0.6;
}

.result-irheb-brand span {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* Pulse Glow Animation for CTA Button */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.6), 0 0 60px rgba(118, 75, 162, 0.3);
    }
}

/* Premium Card Holographic Effects */
.premium-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(125deg,
            transparent 0%,
            rgba(255, 255, 255, 0.03) 25%,
            transparent 50%,
            rgba(102, 126, 234, 0.05) 75%,
            transparent 100%);
    pointer-events: none;
    animation: holographic 8s linear infinite;
}

@keyframes holographic {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 200%;
    }
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 35px 60px rgba(0, 0, 0, 0.5),
        0 0 120px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* أثناء تصدير البطاقة كصورة - إيقاف الحركة لصورة أنيقة */
.premium-card.card-exporting .card-shine {
    display: none !important;
}

.premium-card.card-exporting::after {
    display: none !important;
}

.premium-card.card-exporting:hover {
    transform: none;
}

.premium-card.card-exporting .name-entry-in-card {
    display: none !important;
}

.premium-card.card-exporting .avatar-glow {
    animation: none !important;
}

.premium-card.card-exporting * {
    animation: none !important;
    transition: none !important;
}

/* ضمان إزالة أي gradients/pseudo-elements داخل البطاقة أثناء التصدير (Safari/html2canvas) */
.premium-card.card-exporting,
.premium-card.card-exporting *,
.premium-card.card-exporting::before,
.premium-card.card-exporting::after,
.premium-card.card-exporting *::before,
.premium-card.card-exporting *::after {
    background-image: none !important;
    filter: none !important;
    backdrop-filter: none !important;
}

.premium-card.card-exporting::before,
.premium-card.card-exporting::after,
.premium-card.card-exporting *::before,
.premium-card.card-exporting *::after {
    content: none !important;
    animation: none !important;
    transition: none !important;
}

/* ⚠️ إصلاح خطأ html2canvas مع CSS Variables و Gradients */
/* استبدال المتغيرات بقيم ثابتة أثناء التصدير */
.premium-card.card-exporting {
    background: #1a1a3a !important;
}

/* إخفاء جميع العناصر ذات التأثيرات الإشكالية */
.premium-card.card-exporting .card-bg-effects {
    display: none !important;
}

.premium-card.card-exporting .card-gradient-overlay,
.premium-card.card-exporting .card-pattern,
.premium-card.card-exporting .card-shine {
    display: none !important;
}

.premium-card.card-exporting::after {
    display: none !important;
}

/* إزالة كل التدرجات عند التصدير لتجنب خطأ addColorStop في html2canvas */
.premium-card.card-exporting {
    background: #1a1a3a !important;
}

.premium-card.card-exporting .avatar-glow {
    background: transparent !important;
}

.premium-card.card-exporting .pro-title-badge {
    background: rgba(102, 126, 234, 0.25) !important;
}

/* استبدال الـ gradients بألوان ثابتة */
.premium-card.card-exporting .avatar-ring {
    background: #667eea !important;
}

.premium-card.card-exporting .path-icon,
.premium-card.card-exporting .card-check,
.premium-card.card-exporting .primary-btn,
.premium-card.card-exporting .core-sphere {
    background: #667eea !important;
}

.premium-card.card-exporting .pro-title-prefix {
    background: #ffd700 !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.premium-card.card-exporting .progress-fill {
    background: #667eea !important;
}

.premium-card.card-exporting .info-card {
    background: rgba(255, 255, 255, 0.05) !important;
}

.premium-card.card-exporting .personality-section {
    background: rgba(102, 126, 234, 0.1) !important;
}

.premium-card.card-exporting .card-badge {
    background: rgba(255, 215, 0, 0.15) !important;
}

/* تحسين قص الحروف العربية في التصدير (ترويسة البطاقة) */
.premium-card.card-exporting .card-logo-section .platform-name {
    font-size: 12px !important;
    line-height: 1.8 !important;
    letter-spacing: 0 !important;
    padding: 3px 0 2px !important;
    display: inline-block !important;
    overflow: visible !important;
}

.premium-card.card-exporting .logo-text,
.premium-card.card-exporting .premium-card-header,
.premium-card.card-exporting .card-logo-section {
    line-height: 1.6 !important;
    overflow: visible !important;
}

/* Card 3D Tilt on Hover */
@media (hover: hover) {
    .premium-card {
        transition: transform 0.4s ease, box-shadow 0.4s ease;
        perspective: 1000px;
    }
}

/* Golden Accent for Top Performers */
.pro-title-prefix {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Animated Score Counter */
.score-value {
    font-family: 'Cairo', monospace;
    letter-spacing: -1px;
}

/* Card Watermark */
.premium-card-body::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: url('/uni/assets/icons/logo.png') center/contain no-repeat;
    opacity: 0.03;
    pointer-events: none;
}

.cinematic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.3) 0%,
            transparent 30%,
            transparent 70%,
            rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

.hook-text-container {
    margin-bottom: var(--space-3xl);
}

.hook-line {
    font-size: var(--font-size-2xl);
    font-weight: 300;
    opacity: 0;
    transform: translateY(30px);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.02em;
}

.hook-line.line-1 {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.5s;
}

.hook-line.line-2 {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.5s;
}

.hook-line .highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Primary Button */
.primary-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-lg);
    font-weight: 600;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--border-radius-xl);
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 2.5s;
    transition: var(--transition-smooth);
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.primary-btn:active {
    transform: translateY(0);
}

.pulse-btn {
    animation: fadeInUp 0.8s ease forwards, pulse 2s ease-in-out infinite;
    animation-delay: 2.5s, 3.5s;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.primary-btn:hover .btn-icon svg {
    transform: translateX(-5px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 3.5s;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 6px;
    height: 10px;
    background: var(--text-muted);
    border-radius: 3px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease infinite;
}

/* ==================== Stage 1: Gender Selection ==================== */
#stage-gender {
    background: radial-gradient(ellipse at top, var(--bg-secondary) 0%, var(--bg-dark) 100%);
}

.stage-header {
    margin-bottom: var(--space-3xl);
}

.stage-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    font-weight: 300;
}

.gender-cards {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    flex-wrap: wrap;
}

.gender-card {
    position: relative;
    width: 200px;
    height: 260px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    transition: var(--transition-smooth);
    overflow: hidden;
    font-family: inherit;
    color: var(--text-primary);
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.gender-card:hover .card-glow {
    opacity: 0.15;
}

.gender-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-card);
}

.card-icon {
    width: 80px;
    height: 80px;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.card-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.gender-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* إذا كانت الأيقونة سوداء فنجعلها فاتحة على الخلفية الداكنة */
.gender-card .card-icon img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.gender-card:hover .card-icon img,
.gender-card.selected .card-icon img {
    opacity: 1;
}

.gender-card:hover .card-icon {
    color: var(--accent-purple);
    transform: scale(1.1);
}

.card-label {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.card-check {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition-smooth);
}

.card-check svg {
    width: 16px;
    height: 16px;
}

.gender-card.selected {
    border-color: var(--accent-purple);
    background: rgba(102, 126, 234, 0.15);
}

.gender-card.selected .card-glow {
    opacity: 0.25;
}

.gender-card.selected .card-check {
    opacity: 1;
    transform: scale(1);
}

/* ==================== Stage 2: Narrative ==================== */
#stage-narrative {
    background: radial-gradient(ellipse at bottom, var(--bg-secondary) 0%, var(--bg-dark) 100%);
}

.narrative-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3xl);
}

.narrative-text {
    text-align: center;
}

.narrative-line {
    font-size: var(--font-size-2xl);
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    margin-bottom: var(--space-md);
}

.stage.active .narrative-line {
    animation: fadeInUp 0.8s ease forwards;
}

.stage.active .narrative-line.delay-1 {
    animation-delay: 0.3s;
}

.stage.active .narrative-line.delay-2 {
    animation-delay: 0.6s;
}

.stage.active .narrative-line.delay-3 {
    animation-delay: 0.9s;
}

.stage.active .narrative-line.delay-4 {
    animation-delay: 1.2s;
}

.stage.active .narrative-line.delay-5 {
    animation-delay: 1.5s;
}

.glow-text {
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
}

.emphasis {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Progress Path */
.progress-path {
    width: 100%;
    max-width: 400px;
    height: 100px;
    position: relative;
}

.path-svg {
    width: 100%;
    height: 100%;
}

.path-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.path-progress {
    stroke: url(#pathGradient);
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    stroke: var(--accent-purple);
}

.stage.active .path-progress {
    animation: drawPath 2s ease forwards;
    animation-delay: 1s;
}

.path-traveler {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
    opacity: 0;
}

.stage.active .path-traveler {
    animation: travelPath 2s ease forwards;
    animation-delay: 1s;
}

.traveler-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0.5;
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-base);
    font-weight: 500;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition-smooth);
    opacity: 0;
}

.stage.active .secondary-btn {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 2s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* ==================== Stage 3: Questions ==================== */
#stage-questions {
    background: var(--bg-dark);
    padding: var(--space-xl);
    padding-bottom: calc(var(--space-xl) + var(--global-footer-offset));
    overflow-y: auto;
    overflow-x: hidden;
    align-items: flex-start;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
}

.questions-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: calc(var(--space-3xl) + var(--global-footer-offset)); /* هامش إضافي فوق الفوتر */
}

/* ==================== Questions Header - شعار ارحب ==================== */
.questions-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-xl);
    transition: var(--transition-smooth);
}

.header-brand:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-card);
}

.header-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.4));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ==================== Scene & Question Boxes ==================== */
.scene-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-lg);
    position: relative;
    text-align: center;
}

.scene-label {
    position: absolute;
    top: -12px;
    right: var(--space-lg);
    background: var(--bg-dark);
    padding: 4px 12px;
    font-size: var(--font-size-xs);
    color: var(--accent-purple);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
}

.question-box {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(79, 172, 254, 0.08) 100%);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-xl);
    position: relative;
    text-align: center;
}

.question-label {
    position: absolute;
    top: -12px;
    right: var(--space-lg);
    background: var(--bg-dark);
    padding: 4px 12px;
    font-size: var(--font-size-xs);
    color: var(--accent-cyan);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
}

.question-box .question-text {
    margin: 0;
    font-size: var(--font-size-xl);
}

.question-text.standalone {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-xl);
}

/* Mobile Responsive for header */
@media (max-width: 768px) {
    .questions-header {
        margin-bottom: var(--space-lg);
        padding: var(--space-sm) 0;
    }

    .header-brand {
        padding: var(--space-xs) var(--space-md);
    }

    .header-logo {
        width: 36px;
        height: 36px;
    }

    .header-title {
        font-size: var(--font-size-base);
    }

    .header-subtitle {
        font-size: 0.7rem;
    }

    .scene-box,
    .question-box {
        padding: var(--space-md) var(--space-lg);
        margin-bottom: var(--space-md);
    }

    .scene-label,
    .question-label {
        font-size: 0.7rem;
        padding: 3px 8px;
        top: -10px;
    }

    .question-box .question-text {
        font-size: var(--font-size-lg);
    }

    .question-text.standalone {
        font-size: var(--font-size-xl);
        margin-bottom: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .header-brand {
        gap: var(--space-sm);
    }

    .header-logo {
        width: 32px;
        height: 32px;
    }

    .header-title {
        font-size: 0.95rem;
    }
}

/* Journey Progress */
.journey-progress {
    margin-bottom: var(--space-2xl);
    position: relative;
}

.progress-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 2px;
}

.progress-markers {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-sm);
    padding: 0 var(--space-xs);
}

.progress-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition-normal);
}

.progress-marker.active {
    background: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-purple);
}

.progress-marker.completed {
    background: var(--accent-cyan);
}

/* Question Scene */
.question-scene {
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: var(--space-md);
}

.scene-container {
    text-align: center;
    width: 100%;
    animation: sceneEnter 0.6s ease;
}

.scene-text {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.question-text {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 auto var(--space-xl);
    line-height: 1.7;
    max-width: 760px;
    text-wrap: balance;
}

/* Choice Cards */
.choices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .choices-grid {
        grid-template-columns: 1fr;
    }
}

/* عرض الجوال: مرحلة الأسئلة - إظهار كل العناصر بأناقة */
@media (max-width: 768px) {
    #stage-questions {
        padding: var(--space-md) var(--space-lg);
        padding-bottom: calc(var(--space-2xl) + var(--global-footer-offset));
    }

    .questions-container {
        padding-bottom: calc(var(--space-2xl) + var(--global-footer-offset));
    }

    .journey-progress {
        margin-bottom: var(--space-lg);
    }

    .question-scene {
        padding-top: 0;
    }

    .scene-text {
        font-size: var(--font-size-base);
        margin-bottom: var(--space-lg);
        line-height: 1.7;
        padding: 0 var(--space-xs);
    }

    .question-text {
        font-size: var(--font-size-xl);
        margin-bottom: var(--space-lg);
        padding: 0 var(--space-xs);
    }

    .choices-grid {
        gap: var(--space-md);
        max-width: 100%;
    }

    .choice-card {
        padding: var(--space-lg);
        gap: var(--space-sm);
    }

    .choice-icon {
        font-size: 2rem;
    }

    .choice-text {
        font-size: var(--font-size-sm);
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    #stage-questions {
        padding: var(--space-sm) var(--space-md);
        padding-bottom: calc(var(--space-2xl) + var(--global-footer-offset));
    }

    .scene-text {
        font-size: 0.95rem;
        margin-bottom: var(--space-md);
    }

    .question-text {
        font-size: 1.05rem;
        margin-bottom: var(--space-md);
    }

    .choice-card {
        padding: var(--space-md) var(--space-lg);
    }

    .choice-icon {
        font-size: 1.75rem;
    }

    .choice-text {
        font-size: 0.9rem;
    }
}

.choice-card {
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--space-xl);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    overflow: hidden;
    font-family: inherit;
    color: var(--text-primary);
    text-align: center;
}

.choice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.choice-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-card);
}

.choice-card:hover::before {
    opacity: 0.1;
}

.choice-card.selected {
    border-color: var(--accent-purple);
    background: rgba(102, 126, 234, 0.2);
}

.choice-card.selected::before {
    opacity: 0.15;
}

.choice-icon {
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
}

.choice-text {
    font-size: var(--font-size-base);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Feedback Message */
.feedback-message {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(102, 126, 234, 0.2);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease forwards;
}

.feedback-message p {
    color: var(--text-secondary);
    font-style: italic;
}

/* ==================== Stage 4: Suspense ==================== */
#stage-suspense {
    background: var(--bg-dark);
}

.suspense-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xl);
}

/* Orbit Animation */
.orbit-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 {
    width: 100px;
    height: 100px;
    animation: orbit 3s linear infinite;
}

.orbit-2 {
    width: 150px;
    height: 150px;
    animation: orbit 4s linear infinite reverse;
}

.orbit-3 {
    width: 200px;
    height: 200px;
    animation: orbit 5s linear infinite;
}

.orbit::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.core-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    animation: corePulse 2s ease-in-out infinite;
}

.sphere-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
}

/* Suspense Text */
.suspense-text {
    text-align: center;
}

.suspense-line {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    opacity: 0;
    margin-bottom: var(--space-sm);
}

#suspenseLine1 {
    animation: fadeInOut 3s ease forwards;
    animation-delay: 0s;
}

#suspenseLine2 {
    animation: fadeInOut 3s ease forwards;
    animation-delay: 1s;
}

#suspenseLine3 {
    animation: fadeInOut 3s ease forwards;
    animation-delay: 2s;
}

/* Loading Dots */
.loading-dots {
    display: flex;
    gap: var(--space-sm);
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: var(--accent-purple);
    border-radius: 50%;
    animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ==================== Stage 5: Result ==================== */
#stage-result {
    background: radial-gradient(ellipse at center, var(--bg-secondary) 0%, var(--bg-dark) 100%);
    padding: var(--space-2xl);
    overflow-y: auto;
    overflow-x: hidden;
    align-items: flex-start;
    justify-content: flex-start;
}

#stage-result .result-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-top: var(--space-lg);
    padding-bottom: calc(var(--space-3xl) + var(--global-footer-offset));
}

.result-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.result-container>.result-section:first-child {
    margin-top: 0;
}

.result-section {
    opacity: 0;
    transform: translateY(30px);
}

.result-section.visible {
    animation: fadeInUp 0.8s ease forwards;
}

/* Personality Mirror - أول قسم في النتيجة */
.personality-mirror {
    text-align: center;
    scroll-margin-top: var(--space-xl);
}

.mirror-frame {
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-xl);
    padding: var(--space-2xl);
    overflow: hidden;
}

.mirror-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(102, 126, 234, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.mirror-title {
    font-size: var(--font-size-lg);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    font-weight: 400;
}

.personality-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    color: var(--accent-purple);
}

.personality-icon svg {
    width: 100%;
    height: 100%;
}

.personality-text {
    font-size: var(--font-size-xl);
    line-height: 1.8;
    color: var(--text-primary);
}

/* Primary Path */
.primary-path {
    text-align: center;
}

.path-reveal {
    position: relative;
}

.reveal-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
}

.path-label {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.path-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-xl);
    padding: var(--space-2xl);
    transition: var(--transition-smooth);
}

.primary-card {
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-glow);
}

.path-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-lg);
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.path-icon.small {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
}

.path-name {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.path-description {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.7;
}

/* Secondary Path */
.secondary-path {
    text-align: center;
}

.secondary-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.secondary-card {
    max-width: 400px;
    margin: 0 auto;
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.secondary-card .path-name {
    font-size: var(--font-size-lg);
    margin-bottom: 0;
}

/* Specializations */
.specializations {
    text-align: center;
}

.section-title {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    font-weight: 400;
}

.specialization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md);
}

.spec-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition-normal);
    cursor: default;
}

.spec-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.spec-icon {
    font-size: 1.8rem;
}

.spec-name {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Continue Button */
.continue-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--font-size-base);
    font-weight: 500;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition-smooth);
    margin: var(--space-xl) auto 0;
}

.continue-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.continue-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.continue-btn:hover svg {
    transform: translateX(-5px);
}

/* ==================== Stage 6: Feedback ==================== */
#stage-feedback {
    background: var(--bg-dark);
}

.feedback-content {
    text-align: center;
    max-width: 600px;
}

.feedback-title {
    font-size: var(--font-size-xl);
    font-weight: 400;
    margin-bottom: var(--space-2xl);
    color: var(--text-secondary);
}

.feedback-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.feedback-btn {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: inherit;
    color: var(--text-primary);
    text-align: right;
}

.feedback-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.feedback-emoji {
    font-size: 2rem;
}

.feedback-text {
    font-size: var(--font-size-lg);
}

.feedback-response {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    animation: fadeInUp 0.5s ease;
}

.feedback-response.hidden {
    display: none;
}

.response-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
    color: var(--accent-cyan);
}

.response-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.response-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: var(--transition-normal);
}

.response-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ==================== Stage 7: Card ==================== */
#stage-card {
    background: radial-gradient(ellipse at top, var(--bg-secondary) 0%, var(--bg-dark) 100%);
    padding: var(--space-lg) var(--space-xl);
    overflow-y: auto;
    overflow-x: hidden;
    align-items: flex-start;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
}

#stage-card .card-section {
    width: 100%;
    min-height: min-content;
    padding-top: var(--space-md);
    padding-bottom: calc(var(--space-3xl) + var(--global-footer-offset));
}

.card-section {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 400;
    margin-bottom: var(--space-xl);
    color: var(--text-secondary);
}

/* Shareable Card */
.shareable-card {
    background: linear-gradient(135deg, #1a1a3a 0%, #2d1f4a 50%, #1a1a3a 100%);
    border-radius: var(--border-radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    border: 1px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.shareable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    position: relative;
}

.card-logo svg {
    width: 40px;
    height: 40px;
}

.card-brand {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.card-body {
    position: relative;
}

.student-info {
    margin-bottom: var(--space-lg);
}

.name-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-xl);
    font-family: inherit;
    color: var(--text-primary);
    text-align: center;
    transition: var(--transition-normal);
}

.name-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(102, 126, 234, 0.1);
}

.name-input::placeholder {
    color: var(--text-muted);
}

.card-personality {
    margin-bottom: var(--space-lg);
}

.personality-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-xl);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.card-path {
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: rgba(102, 126, 234, 0.15);
    border-radius: var(--border-radius-md);
}

.card-path-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.card-path-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--accent-purple);
}

.card-specializations {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}

.card-spec {
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.card-date,
.card-id {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* Action Buttons */
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: var(--border-radius-md);
    font-family: inherit;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.download-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.share-btn:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.parent-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Restart Button */
.restart-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: 1px solid var(--text-muted);
    border-radius: var(--border-radius-md);
    font-family: inherit;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-normal);
}

.restart-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.restart-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================== Modals ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-xl);
    padding: var(--space-2xl);
    max-width: 500px;
    width: 100%;
    animation: modalEnter 0.3s ease;
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-content h3 {
    text-align: center;
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-xl);
}

/* Share Options */
.share-options {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-glass);
    border: var(--border-glass);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: inherit;
    color: var(--text-primary);
    min-width: 90px;
}

.share-option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.share-option svg {
    width: 32px;
    height: 32px;
}

.share-option[data-platform="whatsapp"]:hover {
    color: #25d366;
}

.share-option[data-platform="twitter"]:hover {
    color: #1da1f2;
}

.share-option span {
    font-size: var(--font-size-sm);
}

/* Parent View */
.parent-view {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.parent-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.parent-subtitle {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.parent-content {
    text-align: right;
}

.parent-section {
    margin-bottom: var(--space-xl);
}

.parent-section h4 {
    color: var(--accent-purple);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-base);
}

.parent-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.parent-list {
    list-style: none;
    padding: 0;
}

.parent-list li {
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.parent-list li::before {
    content: '•';
    color: var(--accent-cyan);
}

/* ==================== Loading Overlay ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay.hidden {
    display: none;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.loader-ring:nth-child(1) {
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
}

.loader-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-top-color: var(--accent-cyan);
    animation-duration: 1s;
}

.loader-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-top-color: var(--accent-pink);
    animation-duration: 0.8s;
}

/* ==================== Keyframe Animations ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    20% {
        opacity: 1;
        transform: translateY(0);
    }

    80% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0.5;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1.02);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes travelPath {
    0% {
        left: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 1;
    }
}

@keyframes orbit {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes corePulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.3);
    }
}

@keyframes loadingDot {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes sceneEnter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes particleFade {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* ==================== Utility Classes ==================== */
.hidden {
    display: none !important;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Responsive Styles ==================== */
@media (max-width: 768px) {
    :root {
        --font-size-2xl: 1.5rem;
        --font-size-3xl: 2rem;
        --font-size-4xl: 2.5rem;
    }

    .stage {
        padding: var(--space-lg);
        padding-bottom: calc(var(--space-lg) + var(--global-footer-offset));
    }

    .gender-cards {
        flex-direction: column;
        align-items: center;
    }

    .gender-card {
        width: 100%;
        max-width: 280px;
        height: 200px;
    }

    .choices-grid {
        grid-template-columns: 1fr;
    }

    .share-options {
        flex-wrap: wrap;
    }

    .card-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hook-line {
        font-size: var(--font-size-xl);
    }

    .narrative-line {
        font-size: var(--font-size-lg);
    }

    .primary-btn {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--font-size-base);
    }

    .modal-content {
        padding: var(--space-lg);
    }
}

/* ==================== Additional Styles for MVC Version ==================== */

/* Logo Container */
.logo-container {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

/* ========== شعار موحد: إرحب + البوصلة ========== */
.unified-brand {
    position: relative;
}

.compass-irheb-hero {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: heroLogoAppear 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.compass-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 10;
}

.compass-ring.outer {
    width: 100%;
    height: 100%;
    border-color: rgba(102, 126, 234, 0.25);
    border-width: 2px;
    animation: ringPulse 4s ease-in-out infinite;
}

.compass-ring.mid {
    width: 85%;
    height: 85%;
    border-color: rgba(79, 172, 254, 0.15);
    animation: ringPulse 4s ease-in-out infinite 0.3s;
}

.compass-ring.inner {
    width: 70%;
    height: 70%;
    border-color: rgba(255, 255, 255, 0.06);
    animation: ringPulse 4s ease-in-out infinite 0.6s;
}

@keyframes ringPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

.compass-needles {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    animation: compassSlowSpin 30s linear infinite;
    z-index: 20;
}

@keyframes compassSlowSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.irheb-heart {
    position: relative;
    z-index: 0;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(26, 26, 58, 0.95) 0%, rgba(18, 18, 42, 0.98) 100%);
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(102, 126, 234, 0.2),
        0 0 40px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(102, 126, 234, 0.08);
}

.irheb-in-compass {
    width: 62px;
    height: 62px;
    object-fit: contain;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.3));
}

.unified-brand .brand-name {
    margin-bottom: var(--space-xs);
}

.unified-brand .brand-tagline {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    opacity: 0.9;
}

@keyframes heroLogoAppear {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.irheb-heart {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.unified-brand:hover .irheb-heart {
    transform: scale(1.03);
    box-shadow:
        0 0 0 1px rgba(102, 126, 234, 0.3),
        0 0 50px rgba(102, 126, 234, 0.15),
        inset 0 0 30px rgba(102, 126, 234, 0.1);
}

/* Legacy compass (if used elsewhere) */
.compass-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-lg);
    color: var(--accent-purple);
    animation: compassSpin 20s linear infinite;
}

@keyframes compassSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.compass-svg {
    width: 100%;
    height: 100%;
}

.compass-needle {
    transform-origin: center center;
    animation: needleWobble 3s ease-in-out infinite;
}

@keyframes needleWobble {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

.brand-name {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xs);
}

.brand-tagline {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Journey Info */
.journey-info {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    margin-top: var(--space-2xl);
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 3s;
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.info-item svg {
    width: 18px;
    height: 18px;
}

/* Family Section */
.family-section {
    text-align: center;
}

.family-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    justify-content: center;
}

.family-icon {
    font-size: 2.5rem;
}

.family-name {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.family-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: var(--space-lg);
    padding-right: var(--space-lg);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.family-score .score-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--accent-cyan);
}

.family-score .score-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* Path Score Bar */
.path-score {
    margin-top: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.score-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease;
}

.score-percentage {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--accent-purple);
    min-width: 50px;
    text-align: left;
}

/* Card Family Badge */
.card-family-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(102, 126, 234, 0.2);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
}

/* Secondary Info */
.secondary-info {
    flex: 1;
    text-align: right;
}

.secondary-score {
    font-size: var(--font-size-sm);
    color: var(--accent-cyan);
}

/* Feedback Section */
.feedback-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.feedback-section h3 {
    font-size: var(--font-size-lg);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.feedback-btn.selected {
    border-color: var(--accent-purple);
    background: rgba(102, 126, 234, 0.2);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-card);
    animation: toastEnter 0.3s ease;
}

.toast-exit {
    animation: toastExit 0.3s ease forwards;
}

@keyframes toastEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastExit {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    font-size: var(--font-size-sm);
}

.toast-success {
    border-right: 3px solid var(--accent-cyan);
}

.toast-error {
    border-right: 3px solid #ef5350;
}

.toast-info {
    border-right: 3px solid var(--accent-purple);
}

/* Loading Text */
.loading-text {
    margin-top: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Section Label */
.section-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

/* ==================== Print Styles ==================== */
@media print {
    body {
        background: white;
        color: black;
    }

    .stage {
        position: relative;
        page-break-inside: avoid;
    }

    .shareable-card {
        box-shadow: none;
        border: 2px solid #333;
    }

    .sound-toggle,
    .card-actions,
    .restart-btn {
        display: none;
    }
}

/* ==================== High Contrast Mode ==================== */
@media (prefers-contrast: high) {
    :root {
        --bg-glass: rgba(255, 255, 255, 0.15);
        --border-glass: 2px solid rgba(255, 255, 255, 0.3);
    }
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== Path-Specific Colors ==================== */
[data-path="medical"] .primary-card {
    border-color: var(--path-medical);
    box-shadow: 0 0 40px rgba(0, 217, 166, 0.3);
}

[data-path="engineering"] .primary-card {
    border-color: var(--path-engineering);
    box-shadow: 0 0 40px rgba(79, 172, 254, 0.3);
}

[data-path="business"] .primary-card {
    border-color: var(--path-business);
    box-shadow: 0 0 40px rgba(255, 167, 38, 0.3);
}

[data-path="humanities"] .primary-card {
    border-color: var(--path-humanities);
    box-shadow: 0 0 40px rgba(236, 64, 122, 0.3);
}

[data-path="science"] .primary-card {
    border-color: var(--path-science);
    box-shadow: 0 0 40px rgba(124, 77, 255, 0.3);
}

[data-path="art"] .primary-card {
    border-color: var(--path-art);
    box-shadow: 0 0 40px rgba(255, 112, 67, 0.3);
}

[data-path="military"] .primary-card {
    border-color: var(--path-military);
    box-shadow: 0 0 40px rgba(120, 144, 156, 0.3);
}

[data-path="islamic"] .primary-card {
    border-color: var(--path-islamic);
    box-shadow: 0 0 40px rgba(38, 166, 154, 0.3);
}

/* ==================== Premium Career Card Styles ==================== */

/* Card Intro Section */
.card-intro {
    text-align: center;
    margin-bottom: var(--space-2xl);
    position: relative;
}

.card-intro-compact {
    margin-bottom: var(--space-lg);
}

.card-intro-compact .card-main-title {
    font-size: var(--font-size-xl);
    margin-bottom: 2px;
}

.card-intro-compact .card-subtitle {
    font-size: var(--font-size-base);
}

.confetti-container {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 100px;
    pointer-events: none;
    overflow: hidden;
}

.card-main-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.title-icon {
    font-size: 2rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.card-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
}

/* Name Entry Section */
.name-entry-section {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.name-label {
    display: block;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.name-input-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.premium-name-input {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--font-size-xl);
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
}

.premium-name-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.premium-name-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(102, 126, 234, 0.2), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.premium-name-input:focus+.input-glow {
    opacity: 1;
}

.name-hint {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

/* Premium Card */
.premium-card {
    position: relative;
    max-width: 480px;
    margin: 0 auto var(--space-xl);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    background: linear-gradient(145deg, #1e1e3f 0%, #2a1f4e 30%, #1a1a3a 70%, #15152e 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Card Background Effects */
.card-bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.card-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
}

.card-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.card-shine {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 40%,
            rgba(255, 255, 255, 0.03) 45%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.03) 55%,
            transparent 60%);
    animation: cardShine 4s ease-in-out infinite;
}

@keyframes cardShine {

    0%,
    100% {
        transform: translateX(-30%) translateY(-30%) rotate(25deg);
    }

    50% {
        transform: translateX(30%) translateY(30%) rotate(25deg);
    }
}

/* Premium Card Header */
.premium-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

/* حقل الاسم داخل البطاقة - واضح ومرئي */
.name-entry-in-card {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.name-entry-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    text-align: center;
}

.name-input-in-card {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-lg);
    font-family: inherit;
    font-weight: 500;
    text-align: center;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: var(--border-radius-md);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.name-input-in-card::placeholder {
    color: var(--text-muted);
}

.name-input-in-card:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(102, 126, 234, 0.12);
}

.name-entry-hint {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--space-sm);
    text-align: center;
}

.card-logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.irheb-logo {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.card-logo-section .platform-name {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.card-logo-section .compass-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-purple);
}

.card-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 4px var(--space-sm);
    background: rgba(102, 126, 234, 0.15);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(102, 126, 234, 0.25);
}

.badge-text {
    font-size: 9px;
    color: var(--text-muted);
}

.badge-year {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--accent-purple);
}

/* Premium Card Body */
.premium-card-body {
    padding: var(--space-xl);
    position: relative;
}

/* Professional Avatar */
.pro-avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.avatar-ring {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary-gradient);
    padding: 4px;
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
    }
}

.avatar-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.avatar-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
}

.avatar-icon svg {
    width: 50px;
    height: 50px;
}

/* Professional Title */
.pro-title-section {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.pro-name {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pro-title-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-radius: var(--border-radius-xl);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.pro-title-prefix {
    font-size: var(--font-size-sm);
    color: var(--accent-gold);
    font-weight: 600;
}

.pro-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--accent-cyan);
}

/* Career Info Grid */
.career-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.info-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-icon {
    font-size: 1.5rem;
}

.info-content {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.info-value {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.score-value {
    color: var(--accent-cyan);
}

/* Personality Section */
.personality-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 215, 0, 0.05);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 215, 0, 0.15);
    margin-bottom: var(--space-lg);
}

.personality-icon {
    font-size: 1.8rem;
}

.personality-info {
    display: flex;
    flex-direction: column;
}

.personality-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.personality-type {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--accent-gold);
}

/* Majors Section */
.majors-section {
    text-align: center;
}

.majors-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.majors-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
}

.major-tag {
    padding: var(--space-xs) var(--space-sm);
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.2);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    color: var(--accent-blue);
}

/* Premium Card Footer */
.premium-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: var(--space-md) var(--space-xl);
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-left span {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.powered-by {
    font-size: 9px;
    color: var(--text-muted);
}

.irheb-brand {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--accent-cyan);
}

.irheb-url {
    font-size: 9px;
    color: var(--accent-purple);
}

/* QR Section */
.qr-section {
    position: absolute;
    bottom: 60px;
    left: var(--space-xl);
    opacity: 0.4;
}

.qr-code {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.qr-code svg {
    width: 100%;
    height: 100%;
}

/* Premium Action Buttons */
.premium-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.premium-btn {
    position: relative;
    padding: var(--space-md) var(--space-2xl);
    border: none;
    border-radius: var(--border-radius-lg);
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.premium-btn .btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: all var(--transition-normal);
}

.premium-btn .btn-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: white;
}

.premium-btn svg {
    width: 20px;
    height: 20px;
}

.download-btn .btn-bg {
    background: var(--primary-gradient);
}

.download-btn:hover .btn-bg {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.share-btn .btn-bg {
    background: linear-gradient(135deg, #00d9a6, #00b894);
}

.share-btn:hover .btn-bg {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 217, 166, 0.4);
}

.premium-btn:active {
    transform: scale(0.98);
}

/* irheb Footer Branding */
.irheb-footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    opacity: 0.65;
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-brand-text span {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.footer-brand-text a {
    font-size: var(--font-size-sm);
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-brand-text a:hover {
    color: var(--accent-purple);
}

/* Mobile Responsive for Premium Card */
@media (max-width: 480px) {
    .premium-card {
        margin: 0 calc(-1 * var(--space-md)) var(--space-xl);
        border-radius: var(--border-radius-lg);
    }

    .premium-card-header {
        padding: var(--space-md);
        flex-direction: column;
        gap: var(--space-md);
    }

    .premium-card-body {
        padding: var(--space-lg);
    }

    .pro-name {
        font-size: var(--font-size-xl);
    }

    .career-info-grid {
        grid-template-columns: 1fr;
    }

    .premium-card-footer {
        flex-direction: column;
        gap: var(--space-md);
        align-items: center;
        text-align: center;
    }

    .footer-right {
        align-items: center;
    }

    .qr-section {
        display: none;
    }

    .premium-actions {
        flex-direction: column;
    }

    .premium-btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .irheb-global-footer {
        min-height: 44px;
        padding-top: 0.3rem;
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    .irheb-footer-link {
        font-size: 0.69rem;
        gap: 0.2rem;
        padding: 0.1rem 0.5rem;
    }
}

/* Print Styles for Card */
@media print {
    .premium-card {
        box-shadow: none;
        border: 2px solid #333;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .card-shine {
        display: none;
    }
}
