:root {
    /* Color Palette derived from Admin Panel */
    --primary: #686cff;
    --primary-rgb: 104, 108, 255;
    --secondary: #8592a3;
    --dark-bg: #101316;
    --dark-card: #202326;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #686cff 0%, #9c9eff 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(104, 108, 255, 0.4) 0%, rgba(104, 108, 255, 0) 70%);

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;

    /* Animations */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(var(--primary-rgb), 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Header */
.header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(16, 19, 22, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-flow: row nowrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 16px;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* App Mockups */
.app-mockup {
    position: relative;
    z-index: 2;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s ease;
    border: 8px solid #202326;
    background: #000;
    overflow: hidden;
}

.app-mockup.mobile {
    max-width: 320px;
    transform: rotate(-5deg) translateY(-20px);
}

.app-mockup.mobile:hover {
    transform: rotate(0deg) translateY(0);
}

.app-mockup img {
    display: block;
    width: 100%;
    height: auto;
}

/* TV Experience Section */
.tv-experience {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--dark-bg) 0%, #0d0f12 100%);
    position: relative;
    overflow: hidden;
}

.tv-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    text-align: center;
}

.tv-text {
    max-width: 700px;
}

.tv-mockup {
    position: relative;
    width: 100%;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 0 0 10px #202326, 0 40px 80px rgba(0, 0, 0, 0.6);
    background: #000;
}

.tv-mockup img {
    width: 100%;
    border-radius: 4px;
    /* Slight inner radius */
    display: block;
}

.tv-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(104, 108, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.visual-circle {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    z-index: 1;
}

.hero-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(104, 108, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* Features Section */
.features {
    padding: 120px 0;
    position: relative;
    background: #0d0f12;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(104, 108, 255, 0.3);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(104, 108, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--primary);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
}

/* Download Section */
.download {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.download-card {
    background: var(--gradient-primary);
    border-radius: 40px;
    padding: 80px 40px;
    text-align: center;
    position: relative;
    z-index: 10;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(104, 108, 255, 0.2);
}

.download-content {
    position: relative;
    z-index: 2;
}

.download-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: white;
}

.download-desc {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 48px;
    color: rgba(255, 255, 255, 0.9);
}

.download-card .btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.download-card .btn-primary:hover {
    background: #f8f9fa;
    color: #5054cc;
}

.download-glow {
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(104, 108, 255, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

/* FAQ Section */
.faq {
    padding: 120px 0;
    position: relative;
    background: #0d0f12;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(104, 108, 255, 0.3);
}

.faq-item[open] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(104, 108, 255, 0.3);
}

.faq-question {
    padding: 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    color: var(--text-main);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary);
    transition: var(--transition);
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px 24px;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: -8px;
    padding-top: 16px;
}

/* Downloader App Code */
.downloader-info {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.downloader-info p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.downloader-code {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 28px;
    border-radius: 16px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 4px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.downloader-code:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #0a0c0e;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo img {
    height: 40px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .header .container {
        padding: 0 16px;
    }

    .nav {
        display: none;
        /* simple mobile hide for now, could add hamburger */
    }

    .header-right {
        gap: 16px;
    }

    .language-selector {
        margin-left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .download-title {
        font-size: 2rem;
    }
}

/* Animations Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

/* Legal Pages & Contact Styles */
.page-header {
    padding: 160px 0 80px;
    background: linear-gradient(180deg, rgba(16, 19, 22, 0.9) 0%, var(--dark-bg) 100%);
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.page-content {
    padding: 0 0 120px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-text {
    background: var(--dark-card);
    padding: 60px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-text h2 {
    font-size: 1.75rem;
    margin: 48px 0 24px;
    color: var(--text-main);
}

.legal-text h2:first-child {
    margin-top: 0;
}

.legal-text h3 {
    font-size: 1.25rem;
    margin: 32px 0 16px;
    color: var(--primary);
}

.legal-text p,
.legal-text ul {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
}

.legal-text ul {
    padding-left: 24px;
    list-style: disc;
}

.legal-text li {
    margin-bottom: 8px;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 32px;
}

.info-icon {
    width: 48px;
    height: 48px;
    background: rgba(104, 108, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.info-content h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.info-content p {
    margin-bottom: 0;
}

.contact-form {
    background: var(--dark-card);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 60px;
    }

    .legal-text {
        padding: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Language Switcher */
.language-selector {
    position: relative;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 180px;
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px;
    display: none;
    /* JS will toggle this */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.lang-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.lang-link {
    display: block;
    padding: 10px 12px;
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 0.9rem;
}

.lang-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* RTL Support (Arabic) */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .logo {
    gap: 12px;
}

html[dir="rtl"] .nav {
    margin-right: auto;
    margin-left: 0;
}

html[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn-icon {
    margin-left: 8px;
    margin-right: 0;
}

html[dir="rtl"] .feature-icon,
html[dir="rtl"] .info-icon {
    margin-left: 0;
}

html[dir="rtl"] .legal-text ul {
    padding-left: 0;
    padding-right: 24px;
}

html[dir="rtl"] .feature-card:hover {
    transform: translateY(-10px);
}

html[dir="rtl"] .language-selector {
    margin-left: 0;
    margin-right: 20px;
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}