/* =========================================
   CSS Reset & Variables
   ========================================= */
   :root {
    /* Brand Colors extracted from logo (Purple/Blue gradient) */
    --color-primary: #8A2BE2;
    --color-secondary: #007BFF;
    --color-accent: #E100FF;
    
    /* Dark Theme Colors */
    --color-bg: #090A0F;
    --color-surface: rgba(255, 255, 255, 0.03);
    --color-surface-hover: rgba(255, 255, 255, 0.08);
    --color-border: rgba(255, 255, 255, 0.1);
    
    /* Text Colors */
    --color-text: #FFFFFF;
    --color-text-muted: #A0AAB2;
    
    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #007BFF 0%, #8A2BE2 100%);
    --gradient-brand-hover: linear-gradient(135deg, #1E90FF 0%, #9B30FF 100%);
    --gradient-glow: linear-gradient(135deg, rgba(0, 123, 255, 0.5) 0%, rgba(138, 43, 226, 0.5) 100%);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 15px; /* Reduced from default 16px to shrink overall em/rem scaling slightly */
}

body {
    font-family: 'Noto Sans Arabic', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* =========================================
   Typography & Utilities
   ========================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* Background Gradients & Shapes (Simplified for less distraction) */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.2; /* Reduced from 0.6 */
}

.bg-shape-1 {
    width: 600px;
    height: 600px;
    background: rgba(138, 43, 226, 0.1);
    top: -200px;
    right: -200px;
}

.bg-shape-2 {
    width: 700px;
    height: 700px;
    background: rgba(0, 123, 255, 0.1);
    bottom: -300px;
    left: -300px;
}

/* Glassmorphism utility - cleaner */
.glass-card {
    background: rgba(15, 17, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 8px 24px rgba(138, 43, 226, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-brand-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(138, 43, 226, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid var(--color-primary);
}

.btn-outline:hover {
    background: rgba(138, 43, 226, 0.1);
    transform: translateY(-3px);
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

.navbar.scrolled {
    background: rgba(9, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 20px;
    color: white;
}

.logo-icon-placeholder {
    width: 40px;
    height: 40px;
    background: var(--gradient-brand);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    position: relative;
    overflow: hidden;
}

.logo-icon-placeholder::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-20deg) translateX(-30px);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: skewX(-20deg) translateX(-30px); }
    20% { transform: skewX(-20deg) translateX(50px); }
    100% { transform: skewX(-20deg) translateX(50px); }
}

.logo-icon-placeholder.small {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}

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

.btn-nav {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 10px 24px !important;
    border-radius: 50px;
}

.btn-nav:hover {
    background: var(--gradient-brand) !important;
    color: white !important;
    border-color: transparent;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 50px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 550px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(138, 43, 226, 0.08);
    color: #e6b3ff;
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 18px;
}

.hero p {
    font-size: 1.1rem;
    color: #B0B0B0;
    margin-bottom: 35px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 50px;
}

.stats {
    display: flex;
    gap: 40px;
}

.stat-item h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    perspective: 1000px;
}

.mockup-container {
    position: relative;
    width: 300px;
    height: 580px;
}

.mockup-card {
    width: 100%;
    height: 100%;
    border-radius: 40px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 0 40px rgba(138, 43, 226, 0.1);
    background: linear-gradient(180deg, rgba(30,30,40,0.9) 0%, rgba(15,12,25,0.9) 100%);
}

.app-icon-large {
    width: 100px;
    height: 100px;
    border-radius: 30px;
    background: #fff;
    margin-top: 40px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.icon-shape {
    width: 80px;
    height: 80px;
    background: var(--gradient-brand);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
}

.mockup-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.mockup-card p {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 40px;
}

.mockup-ui {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ui-bar {
    width: 100%;
    height: 60px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
}

.ui-boxes {
    display: flex;
    gap: 10px;
}

.ui-box {
    flex: 1;
    height: 100px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
}

.float-element {
    position: absolute;
    background: rgba(15, 17, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.float-element i {
    color: var(--color-primary);
}

.float-1 {
    top: 150px;
    right: -40px;
}

.float-2 {
    bottom: 120px;
    left: -30px;
}

/* =========================================
   Features Section
   ========================================= */
.features {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 35px 25px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(138, 43, 226, 0.2);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: rgba(138, 43, 226, 0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #e6b3ff;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--gradient-brand);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* =========================================
   Reviews Section
   ========================================= */
.reviews {
    padding: 100px 0;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.review-card {
    padding: 30px;
    border-radius: 20px;
    background: rgba(15, 17, 26, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-5px);
    border-color: rgba(138, 43, 226, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.user-info h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.stars {
    color: #FFD700;
    font-size: 0.9rem;
    display: flex;
    gap: 2px;
}

.review-text {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
    position: relative;
}

.review-text::before {
    content: '"';
    font-size: 3rem;
    color: rgba(138, 43, 226, 0.2);
    position: absolute;
    top: -15px;
    right: -10px;
    font-family: serif;
}

/* =========================================
   Download Section
   ========================================= */
.download {
    padding: 50px 0 100px;
}

.download-container {
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(138,43,226,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.download-content h2 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.download-content p {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 40px;
}

.download-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.download-btn {
    min-width: 200px;
}

/* =========================================
   Footer
   ========================================= */
footer {
    border-top: 1px solid var(--color-border);
    padding: 60px 0 20px;
    background: rgba(0,0,0,0.3);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-info p {
    color: var(--color-text-muted);
    margin-top: 20px;
    max-width: 300px;
}

.footer-links h3, .footer-social h3 {
    font-size: 1.1rem;
    margin-bottom: 24px;
    font-weight: 700;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-primary);
    padding-right: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--color-border);
}

.social-icons a:hover {
    background: var(--gradient-brand);
    border-color: transparent;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* =========================================
   Animations & Responsive
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .stats {
        justify-content: center;
    }
    
    .float-1 { right: 0; }
    .float-2 { left: 0; }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-info p {
        margin: 20px auto 0;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .logo {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .nav-links a:not(.btn-nav) {
        display: none; /* Handled by mobile menu JS now */
    }
}

/* =========================================
   UX Enhancements (Preloader, Toast, Mobile Menu)
   ========================================= */

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(138, 43, 226, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    background: var(--gradient-brand);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    right: 50%;
    transform: translateX(50%);
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 10000;
    backdrop-filter: blur(10px);
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.26, 1.55);
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.3);
}

.toast.show {
    bottom: 40px;
}

/* Code Box Enhanced UI */
.code-box-wrapper {
    background: linear-gradient(to right, rgba(138, 43, 226, 0.1), rgba(0, 123, 255, 0.1));
    padding: 3px;
    border-radius: 20px;
    margin: 30px auto;
    max-width: 450px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.code-box-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, var(--color-primary), transparent 30%);
    animation: rotate 4s linear infinite;
    opacity: 0.5;
}

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

.code-box-wrapper.link-box-wrapper {
    max-width: 550px;
    margin-top: 15px;
    background: rgba(255,255,255,0.05);
}

.code-box-wrapper.link-box-wrapper::before {
    display: none;
}

.code-box {
    background: var(--color-bg);
    border-radius: 17px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.code-value {
    font-size: 3rem;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 2px;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.link-value {
    font-size: 1.2rem;
    letter-spacing: normal;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: unset;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-copy-btn {
    padding: 10px 20px;
    font-size: 1rem;
    min-width: 140px;
}

.code-copy-btn.copied {
    background: #2ecc71 !important;
    transform: scale(1.05);
    color: white;
}

.code-copy-btn i {
    font-size: 1.1rem;
    margin-left: 8px; /* For Arabic RTL */
}

@media (max-width: 576px) {
    .code-box {
        flex-direction: column;
        padding: 15px;
    }
    .code-value {
        font-size: 2rem;
    }
    .link-value {
        font-size: 1rem;
    }
    .code-copy-btn {
        width: 100%;
    }
}

/* Copy Button Styling */
.copy-btn {
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.copy-btn:hover {
    background: rgba(138, 43, 226, 0.2) !important;
    transform: translateY(-2px);
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(9, 10, 15, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1000;
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--color-border);
        gap: 40px;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a:not(.btn-nav) {
        display: block;
        font-size: 1.2rem;
    }
    
    body.menu-open {
        overflow: hidden;
    }
}

/* Pulse Animation for CTA */
.pulse-anim {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(138, 43, 226, 0); }
    100% { box-shadow: 0 0 0 0 rgba(138, 43, 226, 0); }
}

/* TV Download Page Specifics */
.tv-code-box {
    background: linear-gradient(to right, rgba(255, 107, 0, 0.2), rgba(255, 153, 0, 0.2));
}

.tv-code-box::before {
    background: conic-gradient(transparent, #ff6b00, transparent 30%);
}

.tv-code-value {
    background: linear-gradient(135deg, #ff9900, #ff6b00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tv-copy-btn {
    background: linear-gradient(135deg, #ff9900, #ff6b00) !important;
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.3) !important;
}

.tv-copy-btn:hover {
    background: linear-gradient(135deg, #ffb84d, #ff8533) !important;
    box-shadow: 0 12px 28px rgba(255, 107, 0, 0.5) !important;
}

.tv-highlight {
    background: rgba(255, 107, 0, 0.2) !important;
    color: #ffcc80 !important;
    border-color: #ff6b00 !important;
}
