* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #f5f5f5;
}

/* التنسيقات العامة للنص باللغة العربية */
body[dir="rtl"] {
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* الهيدر */
header {
    background-color: #171a21;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dark-mode header {
    background-color: #0e1117;
}

.logo h1 {
    font-size: 2rem;
    color: #66c0f4;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

nav ul li a i {
    margin-left: 0.5rem;
}

nav ul li a:hover {
    color: #66c0f4;
}

nav ul li a.active {
    color: #66c0f4;
    font-weight: bold;
}

.user-actions button {
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

.user-actions button i {
    margin-left: 0.5rem;
}

.user-actions button:hover {
    background-color: rgba(102, 192, 244, 0.2);
}

#theme-toggle {
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* المحتوى الرئيسي */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* قسم البطل */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://via.placeholder.com/1200x400');
    background-size: cover;
    background-position: center;
    color: white;
    border-radius: 8px;
}

.dark-mode .hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('https://via.placeholder.com/1200x400');
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: #66c0f4;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #4a9ac4;
}

/* الألعاب المميزة */
.featured-games {
    margin-bottom: 3rem;
}

.featured-games h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #66c0f4;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dark-mode .game-card {
    background-color: #2a2d34;
    color: #f5f5f5;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.game-card h4 {
    padding: 1rem 1rem 0.5rem;
    font-size: 1.2rem;
}

.game-card p {
    padding: 0 1rem 1rem;
    color: #666;
}

.dark-mode .game-card p {
    color: #aaa;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: #5cb85c;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #4cae4c;
}

/* قسم التعليقات */
.comments-section {
    margin-top: 3rem;
}

.comments-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #66c0f4;
}

.comments-container {
    margin-bottom: 2rem;
}

.comment {
    background-color: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-mode .comment {
    background-color: #2a2d34;
    color: #f5f5f5;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #66c0f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-left: 1rem;
}

.comment-author {
    font-weight: bold;
}

.comment-date {
    color: #999;
    font-size: 0.8rem;
    margin-right: 1rem;
}

.dark-mode .comment-date {
    color: #aaa;
}

.comment-text {
    line-height: 1.5;
}

#comment-form {
    margin-top: 2rem;
}

#comment-text {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.dark-mode #comment-text {
    background-color: #2a2d34;
    color: #f5f5f5;
    border-color: #444;
}

#comment-form button {
    background-color: #66c0f4;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#comment-form button:hover {
    background-color: #4a9ac4;
}

/* الفوتر */
footer {
    background-color: #171a21;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.dark-mode footer {
    background-color: #0e1117;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: white;
    margin: 0 0.5rem;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #66c0f4;
}

/* صفحة التواصل */
.connect-section {
    max-width: 800px;
    margin: 0 auto;
}

.connect-section h2 {
    font-size: 2rem;
    color: #66c0f4;
    margin-bottom: 1rem;
}

.connect-section p {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.dark-mode .contact-card {
    background-color: #2a2d34;
    color: #f5f5f5;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card i {
    font-size: 2rem;
    color: #66c0f4;
    margin-bottom: 1rem;
}

.contact-card h3 {
    margin-bottom: 0.5rem;
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-mode .contact-form {
    background-color: #2a2d34;
    color: #f5f5f5;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
    background-color: #1a1a1a;
    color: #f5f5f5;
    border-color: #444;
}

.contact-form button {
    background-color: #66c0f4;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #4a9ac4;
}

/* النوافذ المنبثقة */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.dark-mode .modal-content {
    background-color: #2a2d34;
    color: #f5f5f5;
}

.close-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.dark-mode .close-btn {
    color: #aaa;
}

.modal h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #66c0f4;
}

.modal .form-group {
    margin-bottom: 1rem;
}

.modal button[type="submit"] {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
}

.register-link {
    text-align: center;
    margin-top: 1rem;
}

.register-link a {
    color: #66c0f4;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* رسائل التنبيه */
.alert {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

.alert-success {
    background-color: #dff0d8;
    color: #3c763d;
}

.dark-mode .alert-success {
    background-color: #3c763d;
    color: #dff0d8;
}

.alert-error {
    background-color: #f2dede;
    color: #a94442;
}

.dark-mode .alert-error {
    background-color: #a94442;
    color: #f2dede;
}

/* المستخدم المسجل */
.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #66c0f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-left: 0.5rem;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }

    nav ul {
        margin: 1rem 0;
    }

    .user-actions {
        margin-top: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .user-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .user-actions button {
        margin: 0.5rem 0;
    }
}
/* صفحة الألعاب */
.games-section {
    margin-top: 2rem;
}

.games-section h2 {
    font-size: 2rem;
    color: #66c0f4;
    margin-bottom: 1.5rem;
}

.filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    width: 250px;
}

.dark-mode .search-box input {
    background-color: #1a1a1a;
    color: #f5f5f5;
    border-color: #444;
}

.search-box button {
    background-color: #66c0f4;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.filter-options select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.dark-mode .filter-options select {
    background-color: #1a1a1a;
    color: #f5f5f5;
    border-color: #444;
}

.game-info {
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

.game-info .genre {
    background-color: #66c0f4;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.game-info .rating {
    color: #ffc107;
}

.game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem 1rem;
}

.game-footer .price {
    font-weight: bold;
    color: #66c0f4;
}

.play-btn, .buy-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.play-btn {
    background-color: #5cb85c;
    color: white;
}

.play-btn i {
    margin-left: 0.3rem;
}

.buy-btn {
    background-color: #f0ad4e;
    color: white;
}

.buy-btn i {
    margin-left: 0.3rem;
}

/* صفحة المتجر */
.store-section h2 {
    font-size: 2rem;
    color: #66c0f4;
    margin-bottom: 1.5rem;
}

.promo-banner {
    background-color: #66c0f4;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.promo-banner a {
    color: white;
    font-weight: bold;
    text-decoration: underline;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.store-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    position: relative;
}

.dark-mode .store-item {
    background-color: #2a2d34;
    color: #f5f5f5;
}

.store-item:hover {
    transform: translateY(-5px);
}

.item-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 0.5rem;
}

.discount-badge, .new-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.discount-badge {
    background-color: #d9534f;
    color: white;
}

.new-badge {
    background-color: #5cb85c;
    color: white;
}

.store-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.store-item h4 {
    padding: 1rem 1rem 0.5rem;
    font-size: 1.1rem;
}

.store-item p {
    padding: 0 1rem 1rem;
    color: #666;
    font-size: 0.9rem;
}

.dark-mode .store-item p {
    color: #aaa;
}

.item-price {
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.dark-mode .original-price {
    color: #777;
}

.final-price {
    font-weight: bold;
    color: #66c0f4;
}

.add-to-cart-btn {
    display: block;
    width: calc(100% - 2rem);
    margin: 0 1rem 1rem;
    padding: 0.7rem;
    background-color: #66c0f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart-btn i {
    margin-left: 0.5rem;
}

.add-to-cart-btn:hover {
    background-color: #4a9ac4;
}

/* عربة التسوق */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

.dark-mode .cart-item {
    border-bottom-color: #444;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-left: 1rem;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h5 {
    margin-bottom: 0.3rem;
}

.cart-item-details p {
    color: #666;
    font-size: 0.9rem;
}

.dark-mode .cart-item-details p {
    color: #aaa;
}

.cart-item-actions {
    display: flex;
    align-items: center;
}

.quantity-btn {
    background-color: #f5f5f5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode .quantity-btn {
    background-color: #444;
    color: white;
}

.quantity-btn i {
    font-size: 0.8rem;
}

.cart-item-actions span {
    margin: 0 0.5rem;
    min-width: 20px;
    text-align: center;
}

.remove-btn {
    background-color: #f5f5f5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.dark-mode .remove-btn {
    background-color: #444;
    color: white;
}

.cart-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    text-align: right;
}

.dark-mode .cart-summary {
    border-top-color: #444;
}

.cart-summary p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

#checkout-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

#checkout-btn:hover {
    background-color: #4cae4c;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .filters {
        flex-direction: column;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .filter-options {
        display: flex;
        gap: 0.5rem;
    }
    
    .filter-options select {
        flex: 1;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .store-grid, .games-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item img {
        margin-left: 0;
        margin-bottom: 1rem;
    }
    
    .cart-item-actions {
        margin-top: 1rem;
        width: 100%;
        justify-content: space-between;
    }
}