/* 
  InfinityAlgo Academy - The "Midnight Crystal" Design System
  Ultra-Premium, Minimalist, Data-Focused aesthetic.
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Tajawal:wght@300;400;500;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Sophisticated Color Palette */
    --bg-dark: #020408;
    --bg-surface: #0a0e14;
    --bg-card: rgba(15, 20, 28, 0.7);

    --accent: #6366f1;
    /* Royal Indigo */
    --accent-glow: rgba(99, 102, 241, 0.15);
    --cyan: #22d3ee;

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-dim: #475569;

    --border-light: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(99, 102, 241, 0.3);

    --radius-main: 16px;
    --font-main: 'Plus Jakarta Sans', 'Tajawal', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Base Aesthetics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

/* Background Texture: Cyber Grid */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
}

/* Mesh Gradients */
.mesh-gradient {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(34, 211, 238, 0.1) 0px, transparent 50%);
    z-index: -3;
    filter: blur(80px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography Enhancements */
h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mono {
    font-family: var(--font-mono);
}

/* Buttons: The "Glass-Shadow" Style */
.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    border: 1px solid transparent;
}

.btn-primary {
    background: #fff;
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

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

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

/* Header: Modern Floating */
.site-header {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1000px;
    background: rgba(10, 14, 20, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    z-index: 1000;
    padding: 12px 24px;
    transition: var(--transition);
}

.site-header.scrolled {
    top: 12px;
    background: rgba(10, 14, 20, 0.9);
}

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

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

/* Hero Section: Centered & Dramatic */
.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    text-align: center;
}

.badge {
    display: inline-flex;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border-accent);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    margin-bottom: 24px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Features: The Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 24px;
    margin-top: 60px;
}

.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 240px;
}

.bento-item:hover {
    border-color: var(--border-accent);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.bento-item.span-2 {
    grid-column: span 2;
}

.bento-item.row-2 {
    grid-row: span 2;
}

.bento-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 20px;
}

/* Statistics */
.stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 60px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin: 80px 0;
}

.stat-val {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Preview Image Card */
.preview-card {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-radius: 32px;
    padding: 12px;
    border: 1px solid var(--border-light);
    margin-top: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.preview-card img {
    border-radius: 24px;
    display: block;
    width: 100%;
}

/* Store Section: Products Grid */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 32px 24px;
    transition: var(--transition);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centered alignment */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.product-card:hover::before {
    opacity: 1;
}

.product-tag {
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 14px;
    border-radius: 100px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: inline-block;
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.product-card h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    line-height: 1.3;
    color: #fff;
    font-weight: 800;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 90%;
}

.product-price {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    color: var(--accent);
    margin: 10px 0 24px;
    display: block;
    font-weight: 900;
    text-shadow: 0 0 20px var(--primary-glow);
}

.btn-sm {
    padding: 14px 28px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
    border-radius: 12px;
}

.strength-list {
    margin: 0 0 24px 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.strength-list li {
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-list li::before {
    content: '✦';
    color: var(--accent);
    font-size: 0.7rem;
}

.profit-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: inline-block;
}

.category-title {
    grid-column: 1 / -1;
    font-size: 1.8rem;
    margin-top: 60px;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
}

.category-title i {
    color: var(--accent);
}

/* Footer */
footer {
    padding: 100px 0 50px;
    border-top: 1px solid var(--border-light);
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}

.footer-logo {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
}

.footer-link:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 968px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-item,
    .bento-item.span-2,
    .bento-item.row-2 {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        min-height: auto;
        padding: 30px;
    }

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

    .site-header {
        width: calc(100% - 24px);
    }

    .nav-links {
        display: none;
    }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s all ease;
}

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