:root {
    /* Rich, dark, layered color palette */
    --bg-base: #03050a;
    --bg-surface: #0a0f1c;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #3b82f6;     /* Bright blue */
    --secondary-color: #8b5cf6;   /* Rich purple */
    --accent-color: #f59e0b;      /* Amber / Gold */
    --success-color: #10b981;
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --card-bg: #111827;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Smoother, snappier transition */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base); 
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color); 
}

/* Text Selection */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans Arabic', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl; /* Arabic support */
    overflow-x: hidden;
    position: relative;
    font-size: 16px;
}

/* Complex Mesh Gradient Background */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
    filter: blur(60px);
    animation: pulseBg 15s alternate infinite ease-in-out;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s ease;
}

@keyframes pulseBg {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 3vw, 1.3rem); font-weight: 600; }
p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; }

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), #60a5fa, var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block; /* Fix for gradient cut-off on some browsers */
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(3, 5, 10, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: var(--transition);
}

header.scrolled {
    padding: 0.25rem 0;
    background: rgba(3, 5, 10, 0.85);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    transition: var(--transition);
}

header.scrolled .navbar { padding: 1rem 0; }

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    position: relative;
    z-index: 10;
}

.logo img {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}
.logo:hover img {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
    z-index: 10;
}

/* Buttons - Premium Modern Look */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.7rem 1.6rem;
    border-radius: 10px; 
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.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;
    z-index: -1;
}

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

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.5);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

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

/* Tooltip / Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 50%;
    transform: translateX(50%) translateY(100px);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show {
    transform: translateX(50%) translateY(0);
    opacity: 1;
}

/* Copy Icon Hover */
.copy-icon {
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.copy-icon:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-app-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.05);
    animation: float 6s ease-in-out infinite;
}

.hero-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
}

.hero-title {
    margin-bottom: 1.5rem;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
}
.hero-title .gradient-text {
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-title .highlight {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #f43f5e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 520px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* Floating Stats Bar */
.trust-bar {
    display: flex;
    gap: 3rem;
    padding: 1.5rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    display: inline-flex;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.stat-item h4 i { color: var(--accent-color); font-size: 1rem; }

.stat-item p {
    font-size: 0.85rem;
    margin: 0;
}

/* Hero Image Graphics */
.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.glow-circle {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulseBg 8s alternate infinite;
}

.hero-image {
    width: 380px;
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255,255,255,0.08);
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}
.hero-image:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.glass-card > * { position: relative; z-index: 1; }

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255,255,255,0.05);
}
.glass-card:hover::before { opacity: 1; }

/* Features Section */
.features {
    padding: 8rem 0;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Staggered Grid Layout */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Style variants for cards to make them less boring */
.features-grid .glass-card:nth-child(2n) {
    transform: translateY(30px);
}
.features-grid .glass-card:nth-child(2n):hover {
    transform: translateY(22px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.glass-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.glass-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.glass-card p {
    font-size: 0.95rem;
    margin: 0;
}

/* App Info Section */
.app-info {
    padding: 6rem 0;
    position: relative;
}
.app-info::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(10, 15, 28, 0) 0%, rgba(15, 23, 42, 0.5) 50%, rgba(10, 15, 28, 0) 100%);
    z-index: -1;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2.5rem;
    background: var(--glass-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.info-table th, .info-table td {
    padding: 1.25rem 1.5rem;
    text-align: right;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
.info-table tr:nth-child(even) { background: rgba(255,255,255,0.01); }

.info-table th {
    color: var(--text-secondary);
    font-weight: 500;
    width: 45%;
}

.info-table td {
    font-weight: 600;
    color: var(--text-primary);
}

.code-box {
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.8), rgba(15, 20, 35, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.code-box::after {
    content: ''; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 25px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    z-index: -1;
}

.code-box h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.code-display-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0,0,0,0.3);
    padding: 1rem 2rem;
    border-radius: 16px;
    border: 1px dashed rgba(255,255,255,0.2);
    margin: 1rem 0 2rem;
}

.code-display-wrapper .code {
    font-size: 3rem;
    letter-spacing: 8px;
    font-weight: 800;
    font-family: monospace;
    color: #fff;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
}

/* Alternatives and Footer */
.alternatives {
    padding: 8rem 0;
}

footer {
    background: #020408;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 5rem 0 2rem;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    margin-bottom: 1.75rem;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.footer-links li { margin-bottom: 1rem; }
.footer-links a { color: var(--text-secondary); display: inline-block; }
.footer-links a:hover { color: var(--primary-color); transform: translateX(-5px); }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .hero-grid, .info-grid { grid-template-columns: 1fr; gap: 4rem; text-align: center; }
    .hero-actions, .trust-bar { justify-content: center; }
    .hero-image-wrapper { order: -1; }
    .features-grid .glass-card:nth-child(2n) { transform: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
}

@media (max-width: 768px) {
    header { padding: 0.5rem 0; }
    .nav-links {
        position: absolute; top: 100%; left: 0; width: 100%;
        background: rgba(3, 5, 10, 0.98);
        -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
        flex-direction: column; gap: 0; padding: 1rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        visibility: hidden; transition: var(--transition);
    }
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        visibility: visible;
    }
    .nav-links a { padding: 1.25rem 2rem; display: block; border-bottom: 1px solid rgba(255,255,255,0.02); }
    .nav-links a::after { display: none; }
    .menu-toggle { display: block; }
    .trust-bar { flex-direction: column; gap: 1.5rem; text-align: right; }
    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding-bottom: 0.5rem;
    }
    .stat-item:last-child { border-bottom: none; padding-bottom: 0; }
    .hero-title { font-size: 2.25rem; }
    .code-display-wrapper { flex-direction: column; gap: 0.5rem; }
    .hide-mobile { display: none !important; }
}

/* ---------------- ANIMATIONS ---------------- */
.zoom-hover {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.zoom-hover:hover {
    transform: scale(1.05);
}
/* Staggered entrance animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* Timeline UI for Tutorial.html & Activation.html */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0; right: 40px;
    height: 100%; width: 2px;
    background: linear-gradient(180deg, var(--primary-color) 0%, rgba(59, 130, 246, 0.1) 100%);
    z-index: 0;
}

.timeline-step {
    position: relative;
    padding-right: 100px;
    margin-bottom: 4rem;
    z-index: 1;
}

.step-number {
    position: absolute;
    right: 15px; top: 0;
    width: 50px; height: 50px;
    background: var(--bg-surface);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; font-weight: 800; color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    z-index: 2;
}
.step-number::before {
    content: ''; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%; border: 1px dashed rgba(59, 130, 246, 0.5);
    animation: rotate 10s linear infinite;
}

@keyframes rotate { 100% { transform: rotate(360deg); } }

.timeline-content {
    background: var(--glass-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}
.timeline-content:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), inset 0 0 20px rgba(59, 130, 246, 0.05);
}

.timeline-content h3 { margin-bottom: 1rem; color: #60a5fa; font-size: 1.5rem; }
.timeline-content ul li {
    position: relative; padding-right: 1.75rem; margin-bottom: 1rem; color: var(--text-secondary);
}
.timeline-content ul li::before {
    content: '\f058'; font-family: 'Font Awesome 5 Free'; font-weight: 900;
    position: absolute; right: 0; top: 3px; color: var(--success-color); font-size: 1rem;
}

@media (max-width: 768px) {
    .timeline::before { right: 20px; }
    .timeline-step { padding-right: 0; padding-top: 60px; }
    .step-number { right: 50%; transform: translateX(50%); top: 0; }
}
