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

:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #eaeaea;
    --accent-color: #0f3460;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--accent-color) 100%);
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* شريط التنقل */
.navbar {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* الأقسام */
.section {
    min-height: 100vh;
    padding: 100px 0 50px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
    display: none;
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* القسم الرئيسي */
.hero {
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 50px;
}

.hero-content {
    animation: zoomIn 0.8s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s ease infinite;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #a0a0a0;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* الأزرار */
.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(108, 99, 255, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* شبكة الألعاب */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    animation: fadeIn 0.6s ease-out backwards;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }
.game-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(108, 99, 255, 0.4);
}

.game-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.1);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.btn-download {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.btn-download:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    color: #a0a0a0;
    font-size: 0.9rem;
}

/* صندوق البحث */
.search-box {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.3);
}

.btn-search {
    padding: 1rem 2rem;
    background: var(--primary-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-search:hover {
    transform: rotate(360deg);
    background: var(--secondary-color);
}

/* قائمة المتصدرين */
.trending-list {
    max-width: 800px;
    margin: 0 auto;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    animation: slideInLeft 0.6s ease-out backwards;
}

.trending-item:nth-child(1) { animation-delay: 0.1s; }
.trending-item:nth-child(2) { animation-delay: 0.2s; }
.trending-item:nth-child(3) { animation-delay: 0.3s; }

.trending-item:hover {
    transform: translateX(-10px);
    box-shadow: 0 5px 20px rgba(108, 99, 255, 0.3);
}

.rank {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 50px;
}

.trending-item img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

.trending-info {
    flex: 1;
}

.trending-info h3 {
    margin-bottom: 0.5rem;
}

.btn-download-small {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download-small:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* الخلفيات */
.wallpapers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.wallpaper-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallpaper-item:hover {
    transform: scale(1.05);
}

.wallpaper-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.btn-download-wallpaper {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.wallpaper-item:hover .btn-download-wallpaper {
    opacity: 1;
}

/* قسم من نحن */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content > p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: #c0c0c0;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* نموذج التواصل */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 1rem 1.5rem;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.3);
}

.btn-submit {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(108, 99, 255, 0.4);
}

/* الفوتر */
.footer {
    background: rgba(26, 26, 46, 0.95);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

/* التجاوبية للجوال */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
    
    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .trending-item {
        flex-direction: column;
        text-align: center;
    }
    
    .rank {
        font-size: 1.5rem;
    }
}
