/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core Desert Tones */
    --golden-sand: #D4A373;
    --terracotta-clay: #C1663C;
    --palm-green: #5E8C61;
    
    /* Islamic-Inspired Accents */
    --royal-blue: #1F4E79;
    --emerald-teal: #008080;
    --gold-foil: #C9A227;
    
    /* Playful & Friendly Touches */
    --peach-coral: #FFB38A;
    --sky-blue: #82CFFD;
    --mint: #B9E4C9;
    
    /* Text Colors */
    --text-dark: #2C1810;
    --text-light: #8B4513;
    --text-white: #FFFFFF;
}

body {
    font-family: 'Scheherazade New', 'Amiri', serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--golden-sand) 0%, var(--peach-coral) 100%);
}

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

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--emerald-teal) 100%);
    padding: 1.5rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(31, 78, 121, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}

.nav-brand h1 {
    color: var(--text-white);
    font-size: 1.8rem;
    font-weight: 700;
}

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

.nav-link {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold-foil);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-foil);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.arabic-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Games Grid */
.games-grid {
    padding: 6rem 0 4rem 0;
    background: var(--text-white);
    margin-top: 80px;
}

.games-grid h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--royal-blue);
    position: relative;
}

.games-grid h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-foil), var(--peach-coral));
    border-radius: 2px;
}

.games-header {
    text-align: center;
    margin-bottom: 3rem;
}

.games-subtitle {
    font-size: 1.3rem;
    color: var(--gold-foil);
    margin-bottom: 1rem;
    font-weight: 700;
}

.games-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 1rem auto;
    line-height: 1.6;
}



.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.game-card {
    background: var(--text-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(212, 163, 115, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(193, 102, 60, 0.3);
    border-color: var(--gold-foil);
}

.game-image {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--emerald-teal) 0%, var(--palm-green) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--royal-blue);
}

.game-info p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.game-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-foil), var(--peach-coral));
    color: var(--royal-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 162, 39, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--royal-blue);
    border: 2px solid var(--royal-blue);
}

.btn-secondary:hover {
    background: var(--royal-blue);
    color: var(--text-white);
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--terracotta-clay) 0%, var(--palm-green) 100%);
    color: var(--text-white);
}

.about-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-link {
    margin-top: 2rem;
}

.contact-link a {
    color: var(--gold-foil);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-link a:hover {
    color: var(--peach-coral);
}

.feedback-actions {
    margin-top: 2rem;
}







/* Footer */
footer {
    background: #1e3c72;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: #1e3c72;
}

/* Game Container Styles */
#gameContainer {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Game Details Styles */
.game-details {
    max-width: 600px;
    margin: 0 auto;
}

/* Feedback Form Styles */
.feedback-form {
    max-width: 500px;
    margin: 0 auto;
}

.feedback-form h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.5rem;
}

.feedback-form p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1e3c72;
    font-weight: 600;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3c72;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.form-actions .btn {
    margin: 0 0.5rem;
}

.game-details h2 {
    color: #1e3c72;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 2rem;
}

.game-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
    text-align: center;
}

.game-instructions,
.game-features {
    margin-bottom: 2rem;
}

.game-instructions h3,
.game-features h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.game-instructions p {
    color: #666;
    line-height: 1.6;
}

.game-features ul {
    list-style: none;
    margin-left: 0;
}

.game-features li {
    color: #666;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.game-features li::before {
    content: '🌟';
    position: absolute;
    left: 0;
    top: 0;
}

.game-actions {
    text-align: center;
    margin-top: 2rem;
}

.game-actions .btn {
    margin: 0 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .games-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .about-content,
    .mission-content,
    .donate-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .game-actions .btn {
        display: block;
        margin: 0.5rem auto;
        width: 200px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .arabic-text {
        font-size: 1.5rem;
    }
    
    .game-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: #fff;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Islamic Geometric Patterns */
.islamic-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, #ffd700 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, #1e3c72 2px, transparent 2px),
        radial-gradient(circle at 50% 50%, #ffed4e 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}
