/* ===================================
   NawaOS Website - Professional Theme
   =================================== */

/* CSS Variables */
:root {
    --primary: #9400D3;
    --primary-light: #B041FF;
    --primary-dark: #6A0DAD;
    --secondary: #00D4FF;
    --accent: #FF6B35;

    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f17;
    --bg-card: #13131d;
    --bg-card-hover: #1a1a28;

    --text-primary: #ffffff;
    --text-secondary: #8b8b9e;
    --text-muted: #5c5c6d;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(148, 0, 211, 0.4);

    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-bg: radial-gradient(ellipse at top, #1a1a2e 0%, var(--bg-primary) 70%);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 60px rgba(148, 0, 211, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition-fast: 0.15s ease;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ar: 'Cairo', 'Inter', sans-serif;
}

/* RTL Support */
html[dir="rtl"] {
    --font-primary: var(--font-ar);
}

html[dir="ltr"],
html:not([dir]) {
    --font-primary: var(--font-en);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-nav {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.9rem;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(148, 0, 211, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(148, 0, 211, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-download {
    padding: 18px 40px;
    font-size: 1.1rem;
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 40px rgba(148, 0, 211, 0.4);
}

.btn-download:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 50px rgba(148, 0, 211, 0.5);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(148, 0, 211, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at center, black, transparent);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content {
    max-width: 580px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(148, 0, 211, 0.1);
    border: 1px solid rgba(148, 0, 211, 0.2);
    border-radius: 100px;
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero-badge svg {
    color: var(--secondary);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title span {
    display: block;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Hero Mockup */
.hero-visual {
    position: relative;
}

.hero-mockup {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.mockup-dots {
    display: flex;
    gap: 6px;
}

.mockup-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.mockup-dots .dot:nth-child(1) {
    background: #ff5f57;
}

.mockup-dots .dot:nth-child(2) {
    background: #febc2e;
}

.mockup-dots .dot:nth-child(3) {
    background: #28c840;
}

.mockup-title {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mockup-content {
    display: flex;
    min-height: 280px;
}

.mockup-sidebar {
    width: 60px;
    padding: 16px 0;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.sidebar-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.sidebar-icon.active {
    background: rgba(148, 0, 211, 0.2);
    color: var(--primary-light);
}

.sidebar-icon svg {
    width: 20px;
    height: 20px;
}

.mockup-main {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-content: start;
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.app-card:hover {
    background: rgba(148, 0, 211, 0.1);
    border-color: var(--border-hover);
}

.app-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.app-icon.steam {
    background: linear-gradient(135deg, #1b2838, #2a475e);
}

.app-icon.lutris {
    background: linear-gradient(135deg, #ff6600, #ee5500);
}

.app-icon.retroarch {
    background: linear-gradient(135deg, #000, #333);
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(148, 0, 211, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===================================
   Sections
   =================================== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(148, 0, 211, 0.1);
    border: 1px solid rgba(148, 0, 211, 0.2);
    border-radius: 100px;
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ===================================
   Features
   =================================== */
.features {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===================================
   Gaming Section
   =================================== */
.gaming {
    background: var(--gradient-bg);
}

.gaming-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.gaming-content .section-tag {
    margin-bottom: 12px;
}

.gaming-content .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.gaming-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.platforms-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.platform-item:hover {
    border-color: var(--border-hover);
    transform: translateX(-4px);
}

.platform-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 0, 211, 0.1);
    border-radius: var(--radius-sm);
    color: var(--primary-light);
}

.platform-icon svg {
    width: 24px;
    height: 24px;
}

.platform-info h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.platform-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Gaming Visual */
.gaming-visual {
    position: relative;
    height: 400px;
}

.gaming-cards {
    position: relative;
    height: 100%;
}

.game-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: float 4s ease-in-out infinite;
}

.game-card svg {
    color: var(--primary-light);
}

.gc-1 {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.gc-2 {
    top: 30%;
    right: 10%;
    animation-delay: 1s;
}

.gc-3 {
    top: 55%;
    left: 10%;
    animation-delay: 2s;
}

.gc-4 {
    top: 75%;
    right: 20%;
    animation-delay: 3s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ===================================
   Screenshots
   =================================== */
.screenshots {
    background: var(--bg-primary);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
}

.screenshot-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/10;
}

.screenshot-item.large {
    grid-row: span 2;
    aspect-ratio: auto;
}

.screenshot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: var(--transition);
}

.screenshot-placeholder:hover {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

.screenshot-placeholder svg {
    opacity: 0.5;
}

.screenshot-placeholder span {
    font-size: 0.9rem;
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.screenshot-img:hover {
    border-color: var(--border-hover);
    transform: scale(1.02);
}

/* ===================================
   Download Section
   =================================== */
.download {
    background: var(--bg-secondary);
}

.download-card {
    position: relative;
    padding: 64px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    text-align: center;
    overflow: hidden;
}

.download-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top, rgba(148, 0, 211, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(0, 212, 255, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.download-content {
    position: relative;
    z-index: 1;
}

.download-content h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.download-content>p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.download-specs {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 32px;
}

.spec {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spec svg {
    color: var(--primary-light);
}

.spec-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.spec-value {
    font-weight: 600;
}

.download-note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.credentials-box {
    margin-top: 24px;
    padding: 20px 28px;
    background: rgba(148, 0, 211, 0.08);
    border: 1px solid rgba(148, 0, 211, 0.2);
    border-radius: var(--radius-md);
    display: inline-block;
}

.credentials-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 12px;
}

.credentials-info {
    display: flex;
    gap: 32px;
    justify-content: center;
}

.credential {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credential-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.credential-value {
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--bg-primary);
    padding: 64px 0 32px;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 280px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

/* ===================================
   RTL Styles
   =================================== */
html[dir="rtl"] body {
    font-family: var(--font-ar);
}

html[dir="rtl"] .hero-container {
    direction: rtl;
}

html[dir="rtl"] .platform-item:hover {
    transform: translateX(4px);
}

html[dir="rtl"] .gaming-content .section-title {
    text-align: right;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gaming-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .gaming-content .section-title {
        text-align: center;
    }

    .gaming-visual {
        display: none;
    }

    .screenshots-grid {
        grid-template-columns: 1fr 1fr;
    }

    .screenshot-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-actions .btn-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links.mobile-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        padding: 16px 24px;
        border-bottom: 1px solid var(--border-color);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .screenshot-item.large {
        grid-column: span 1;
    }

    .download-card {
        padding: 40px 24px;
    }

    .download-specs {
        flex-direction: column;
        gap: 20px;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-stats {
        flex-wrap: wrap;
    }

    .stat-divider {
        display: none;
    }
}