:root {
    --bg-color: #0c0d12;
    --text-color: #e0e0e0;
    --accent-color: #8c7ae6;
    --card-bg: #1a1c24;
}

/* General & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

body[dir="rtl"] {
    font-family: 'Cairo', 'Poppins', sans-serif;
    text-align: right;
}

h1, h2 {
    color: var(--accent-color);
    text-align: center;
    text-shadow: 0 0 10px rgba(140, 122, 230, 0.5);
}

section {
    padding: 100px 5%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Background Animation */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
    animation: zoomOut 20s infinite alternate;
}

.stars::after {
    content: '';
    position: absolute;
    top: -2000px;
    left: -2000px;
    bottom: -2000px;
    right: -2000px;
    background-image: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.8;
}

@keyframes zoomOut {
    from {
        transform: scale(0.8);
    }
    to {
        transform: scale(1.2);
    }
}

/* Navigation */
nav {
    position: fixed;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(12, 13, 18, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background 0.3s ease;
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--accent-color);
}

.lang-switcher {
    display: flex;
    gap: 10px;
}

.lang-switcher button {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease;
}

.lang-switcher button.active {
    background: var(--accent-color);
    color: #fff;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(140, 122, 230, 0.2), rgba(26, 28, 36, 0));
}

.hero-content {
    animation: fadeIn 2s ease-in-out;
}

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2em;
    max-width: 600px;
    margin-bottom: 40px;
    opacity: 0.8;
}

.cta-button {
    background-color: var(--accent-color);
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(140, 122, 230, 0.3);
}

/* Rules Section */
.rules-section {
    background: linear-gradient(135deg, rgba(26, 28, 36, 0), rgba(140, 122, 230, 0.1));
}

.rules-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 50px;
}

.rules-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    max-width: 350px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(140, 122, 230, 0.2);
}

.rules-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(140, 122, 230, 0.2);
}

.rules-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.rules-card p {
    font-size: 1em;
    color: #ccc;
}


/* Product Cards */
.product-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 50px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    max-width: 350px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(140, 122, 230, 0.2);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 30px rgba(140, 122, 230, 0.2);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    color: #fff;
    margin-bottom: 5px;
    font-size: 1.3em;
}

.product-card p {
    font-size: 1em;
    color: #ccc;
    margin-bottom: 15px;
}

.price {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.4em;
}

/* Contact Section */
.contact-button {
    background: linear-gradient(90deg, #8c7ae6, #6c5ce7);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(140, 122, 230, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(140, 122, 230, 0.6);
}

/* Product Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    position: relative;
}

.modal-body {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-button:hover {
    transform: rotate(90deg);
}

.modal-image-container {
    flex: 1;
    min-width: 300px;
    position: relative;
    overflow: hidden;
}

.modal-image-container img, .modal-image-container video {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.modal-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.modal-thumbnails img, .modal-thumbnails video {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, border 0.2s ease;
}

.modal-thumbnails img:hover, .modal-thumbnails img.active,
.modal-thumbnails video:hover, .modal-thumbnails video.active {
    opacity: 1;
    border: 2px solid var(--accent-color);
}

.modal-details {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.modal-details h3 {
    font-size: 2em;
    margin-bottom: 10px;
}

.modal-details .price {
    font-size: 1.8em;
    margin-bottom: 20px;
    display: block;
}

.modal-details p {
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }
    .product-grid, .rules-grid {
        flex-direction: column;
        align-items: center;
    }
    .modal-body {
        flex-direction: column;
        align-items: center;
    }
    .modal-content {
        padding: 20px;
    }
}

/* DevTools Modal Styles */
#devtools-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#devtools-modal .modal-content {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    text-align: center;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 30px rgba(140, 122, 230, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#devtools-modal.show-modal {
    opacity: 1;
}

#devtools-modal.show-modal .modal-content {
    transform: scale(1);
}

#devtools-modal #devtools-title {
    font-size: 2.2em;
    color: var(--accent-color);
    margin-bottom: 15px;
}

#devtools-modal #devtools-description {
    font-size: 1.2em;
    color: #ccc;
}