/* ==========================================================
   Exam Yemen - Premium V2 Style
   Dark mode base, neon accents, deep glassmorphism
   ========================================================== */

:root {
    --bg-surface: #0f172a;      /* Slate 900 */
    --bg-darker: #020617;       /* Slate 950 */
    --glass-bg: rgba(30, 41, 59, 0.4); /* Slate 800 with opacity */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --primary: #38bdf8;         /* Light Blue */
    --primary-glow: rgba(56, 189, 248, 0.5);
    --secondary: #22d3ee;       /* Cyan */
    --accent: #818cf8;          /* Indigo */
    --green: #4ade80;
    --red: #f87171;
    
    --text-primary: #f8fafc;    /* Slate 50 */
    --text-muted: #94a3b8;      /* Slate 400 */
    
    --font-heading: 'Alexandria', sans-serif;
    --font-body: 'Cairo', sans-serif;
    
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* -----------------------------------
   Animated Background Orbs
   ----------------------------------- */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: drift 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    bottom: -200px;
    left: -100px;
    animation-delay: -5s;
    animation-duration: 25s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation-delay: -10s;
    animation-duration: 30s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* -----------------------------------
   Typography & Utils
   ----------------------------------- */
.text-green { color: var(--green); }
.text-blue { color: var(--primary); }

.mt-4 { margin-top: 2rem; }
.justify-center { justify-content: center; }

/* -----------------------------------
   Glassmorphism
   ----------------------------------- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
}

/* -----------------------------------
   Navigation
   ----------------------------------- */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn-nav {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.mobile-menu-btn {
    display: none;
    font-size: 2rem;
    cursor: pointer;
}

/* -----------------------------------
   Hero Section
   ----------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 var(--primary-glow); }
    70% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Buttons */
.hero-cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-primary, .btn-secondary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.8rem;
    border-radius: var(--border-radius-md);
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary ion-icon, .btn-secondary ion-icon {
    font-size: 2rem;
}

.btn-text {
    display: flex;
    flex-direction: column;
}

.btn-text span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.btn-text strong {
    font-size: 1.1rem;
    font-weight: 700;
}

.glow-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 10px 30px var(--primary-glow);
    border: 1px solid rgba(255,255,255,0.1);
}

.glow-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px var(--primary-glow);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
}

.stats {
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-item ion-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    perspective: 1000px;
}

.floating-mockup {
    position: relative;
    transform-style: preserve-3d;
    animation: floating 6s ease-in-out infinite;
}

.floating-mockup img {
    width: 100%;
    max-width: 350px;
    display: block;
    margin: 0 auto;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 40px var(--primary-glow);
    border: 8px solid #1e293b;
}

@keyframes floating {
    0% { transform: translateY(0px) rotateY(-5deg); }
    50% { transform: translateY(-20px) rotateY(0deg); }
    100% { transform: translateY(0px) rotateY(-5deg); }
}

.deco-card {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10;
}

.deco-card ion-icon {
    font-size: 2rem;
    background: rgba(255,255,255,0.05);
    padding: 0.5rem;
    border-radius: 12px;
}

.deco-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.deco-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.card-1 {
    top: 20%;
    right: -20px;
}

.card-2 {
    bottom: 10%;
    left: -20px;
}

.float-anim {
    animation: floatingCard 4s ease-in-out infinite alternate;
}

.float-anim-reverse {
    animation: floatingCard 5s ease-in-out infinite alternate-reverse;
}

@keyframes floatingCard {
    from { transform: translateY(0px); }
    to { transform: translateY(15px); }
}

/* -----------------------------------
   Features Section
   ----------------------------------- */
.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header h2 span {
    color: var(--primary);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.blue-glow { box-shadow: inset 0 0 20px var(--primary-glow); border: 1px solid var(--primary); }
.purple-glow { box-shadow: inset 0 0 20px rgba(129, 140, 248, 0.5); border: 1px solid var(--accent); }
.green-glow { box-shadow: inset 0 0 20px rgba(74, 222, 128, 0.3); border: 1px solid var(--green); }

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* -----------------------------------
   How It Works (Steps)
   ----------------------------------- */
.how-it-works {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hiw-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hiw-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    padding: 10px;
}

.hiw-image img {
    width: 100%;
    border-radius: calc(var(--border-radius-lg) - 10px);
    display: block;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.5);
}

.play-btn:hover {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 30px var(--primary-glow);
}

.hiw-text h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.hiw-text h2 span {
    color: var(--accent);
}

.step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step-num {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.step-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-info p {
    color: var(--text-muted);
}

/* -----------------------------------
   User Guide Section
   ----------------------------------- */
.user-guide {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
}

.guide-step.reverse {
    flex-direction: row-reverse;
}

.guide-content {
    flex: 1;
}

.step-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.guide-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.guide-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.guide-list {
    list-style: none;
    padding: 0;
}

.guide-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.guide-list ion-icon {
    color: var(--secondary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.guide-visual {
    flex: 1;
    position: relative;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-frame {
    position: relative;
    width: 100%;
    max-width: 380px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 6px solid #1e293b;
}

.mockup-frame img {
    width: 100%;
    display: block;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.8;
    animation: pulse-ring-anim 2s infinite;
}

@keyframes pulse-ring-anim {
    0% { transform: translate(-50%, -50%) scale(0.8); box-shadow: 0 0 0 0 var(--primary-glow); }
    70% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 20px rgba(56, 189, 248, 0); }
    100% { transform: translate(-50%, -50%) scale(0.8); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.success-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--green), #059669);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 2.5rem;
    border: 6px solid var(--bg-darker);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* -----------------------------------
   CTA Section
   ----------------------------------- */
.cta-section {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.cta-box {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(2, 6, 23, 0.8));
    border: 1px solid rgba(56, 189, 248, 0.2);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-box p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* -----------------------------------
   Footer
   ----------------------------------- */
footer {
    margin-top: 4rem;
}

.footer-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
}

.footer-content .logo {
    font-size: 2rem;
    margin-bottom: 0;
}

.footer-content p {
    color: var(--text-muted);
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    font-size: 1.8rem;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* -----------------------------------
   Animations Utilities
   ----------------------------------- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }

/* -----------------------------------
   Responsive Design
   ----------------------------------- */
@media (max-width: 992px) {
    .hero-container, .hiw-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero h1 { font-size: 2.8rem; }
    
    .hero p { margin: 0 auto 2.5rem; }
    
    .hero-cta { justify-content: center; }
    
    .stats { justify-content: center; }
    
    .deco-card { display: none; }

    .guide-step, .guide-step.reverse {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .guide-list li {
        justify-content: center;
        text-align: right;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 { font-size: 2.2rem; }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}
