* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* نوار ناوبری */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo h1 {
    color: #764ba2;
    font-size: 1.8rem;
}

.logo span {
    color: #666;
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #764ba2;
}

/* بخش اصلی */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 1rem;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    padding: 12px 30px;
    font-size: 1.1rem;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    background: #ff5252;
}

/* بخش بازی ها */
.games-section {
    padding: 4rem 5%;
    background: rgba(255, 255, 255, 0.95);
    margin: 2rem 5%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.games-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
    font-size: 2.5rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.game-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    border-color: #764ba2;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.game-card p {
    color: #666;
    font-size: 0.9rem;
}

/* کانتینر بازی */
#game-container {
    padding: 2rem 5%;
    min-height: 500px;
}

/* بازی تیک تاک تو */
.tic-tac-toe {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-gap: 10px;
    margin: 2rem auto;
    justify-content: center;
}

.cell {
    width: 100px;
    height: 100px;
    background: #f8f9fa;
    border: 2px solid #764ba2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: background 0.3s;
}

.cell:hover {
    background: #e9ecef;
}

/* بازی حافظه */
.memory-game {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.memory-instruction {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    color: #856404;
    font-weight: bold;
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    grid-gap: 10px;
    margin: 2rem auto;
    justify-content: center;
}

.memory-card {
    width: 100px;
    height: 100px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s;
    border-radius: 10px;
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card.matched {
    transform: rotateY(180deg);
    cursor: default;
}

.memory-card.show-all {
    transform: rotateY(0deg);
}

.memory-card.show-all .card-front {
    transform: rotateY(0deg);
}

.memory-card.show-all .card-back {
    transform: rotateY(180deg);
}

.card-back, .card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 2rem;
    transition: transform 0.5s;
}

.card-back {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: rotateY(0deg);
}

.card-front {
    background: white;
    border: 2px solid #764ba2;
    transform: rotateY(180deg);
}

.memory-card.matched .card-front {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.memory-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
    font-size: 1.2rem;
}

/* بازی مار */
.snake-game {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.game-board {
    border: 2px solid #333;
    border-radius: 5px;
    margin: 1rem auto;
    background: #f0f0f0;
}

.controls {
    margin: 1rem 0;
}

.control-btn {
    padding: 10px 20px;
    margin: 0 5px;
    background: #764ba2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.control-btn:hover {
    background: #667eea;
}

.game-stats {
    font-size: 1.2rem;
    margin: 1rem 0;
}

.game-over {
    color: #ff6b6b;
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
}

/* بازی مسابقه */
.quiz-game {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.quiz-stats {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.quiz-container {
    margin: 2rem 0;
}

.question {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.option-btn {
    padding: 1rem;
    font-size: 1.1rem;
    background: white;
    border: 2px solid #764ba2;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.option-btn:hover {
    background: #764ba2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.option-btn.correct {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.option-btn.incorrect {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.option-btn:disabled {
    cursor: not-allowed;
    transform: none;
}

.option-btn:disabled:hover {
    background: inherit;
    color: inherit;
}

.quiz-progress {
    margin: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s;
    border-radius: 10px;
}

.quiz-result {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 3px solid #764ba2;
}

.quiz-result h3 {
    color: #764ba2;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.quiz-result p {
    font-size: 1.3rem;
    color: #333;
}

/* بازی ماریو پارتی */
.mario-party-game {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 0 auto;
}

.party-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.players-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 3px solid;
    border-radius: 10px;
    background: white;
}

.player-avatar {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
}

.player-details {
    text-align: right;
    flex-grow: 1;
}

.player-name {
    font-weight: bold;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.player-score, .player-stars {
    font-size: 0.9rem;
    color: #666;
}

.game-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.current-player, .round-info {
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
    border: 2px solid #764ba2;
}

/* صفحه بازی */
.game-board-container {
    margin: 2rem 0;
    padding: 1rem;
    background: #2c3e50;
    border-radius: 10px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    aspect-ratio: 5/4;
    max-width: 600px;
    margin: 0 auto;
}

.board-cell {
    background: #34495e;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    position: relative;
    min-height: 80px;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
}

/* انواع خانه‌ها */
.board-cell.start {
    background: #27ae60;
    border-color: #2ecc71;
}

.board-cell.star {
    background: #f39c12;
    border-color: #f1c40f;
}

.board-cell.star-shop {
    background: #e74c3c;
    border-color: #c0392b;
}

.board-cell.coin {
    background: #f1c40f;
    border-color: #f39c12;
    color: #2c3e50;
}

.board-cell.minigame {
    background: #9b59b6;
    border-color: #8e44ad;
}

.board-cell.event {
    background: #3498db;
    border-color: #2980b9;
}

.board-cell.normal {
    background: #34495e;
    border-color: #7f8c8d;
}

/* کارکترهای بازیکنان */
.player-token {
    position: absolute;
    top: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.player-0 {
    left: 5px;
}

.player-1 {
    right: 5px;
}

/* بخش مینی گیم */
.minigame-container {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 3px solid #764ba2;
}

.minigame {
    text-align: center;
}

.minigame h3 {
    color: #764ba2;
    margin-bottom: 1rem;
}

.minigame p {
    margin-bottom: 1.5rem;
    color: #666;
}

.button-race {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.quick-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.quick-btn:hover {
    transform: scale(1.05);
    background: #ff5252;
}

.countdown-game {
    margin: 2rem 0;
}

.countdown-display {
    font-size: 4rem;
    font-weight: bold;
    color: #764ba2;
    margin: 1rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.countdown-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.countdown-btn:hover {
    transform: scale(1.05);
    background: #45a049;
}

.minigame-timer {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff6b6b;
    margin: 1rem 0;
}

/* لاگ رویدادها */
.event-log {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #764ba2;
}

.event-log h3 {
    color: #764ba2;
    margin-bottom: 1rem;
    text-align: center;
}

.log-messages {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border-radius: 5px;
    padding: 1rem;
}

.log-message {
    padding: 0.5rem;
    margin: 0.5rem 0;
    background: #e9ecef;
    border-radius: 5px;
    border-right: 3px solid #764ba2;
}

/* دکمه های بازی */
.game-buttons {
    margin-top: 1rem;
}

.game-btn {
    padding: 10px 20px;
    margin: 0 10px;
    background: #764ba2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.game-btn:hover {
    background: #667eea;
}

.game-btn.secondary {
    background: #6c757d;
}

.game-btn.secondary:hover {
    background: #5a6268;
}

.party-buttons {
    margin-top: 2rem;
}

.party-btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    background: #764ba2;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 10px;
}

.party-btn:hover {
    background: #667eea;
    transform: translateY(-2px);
}

/* بخش درباره ما و تماس */
.about-section, .contact-section {
    padding: 4rem 5%;
    background: rgba(255, 255, 255, 0.95);
    margin: 2rem 5%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.about-section h2, .contact-section h2 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.about-section p, .contact-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 1.2rem;
}

.contact-info p {
    margin: 1rem 0;
}

/* فوتور */
footer {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 2rem 5%;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.domain-sale {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.2);
    border: 2px solid #ffc107;
    border-radius: 10px;
}

.sale-notice {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffc107;
    margin-bottom: 0.5rem;
}

.designer-credit {
    font-size: 1.1rem;
    color: #fff;
}

.designer-credit strong {
    color: #ffc107;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .memory-board {
        grid-template-columns: repeat(4, 70px);
    }
    
    .memory-card {
        width: 70px;
        height: 70px;
    }
    
    .card-back, .card-front {
        font-size: 1.5rem;
    }
    
    .controls {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .control-btn {
        padding: 8px 16px;
    }
    
    .quiz-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .options {
        grid-template-columns: 1fr;
    }
    
    .option-btn {
        min-height: 60px;
        font-size: 1rem;
    }
    
    .question {
        font-size: 1.2rem;
        padding: 0.8rem;
    }
    
    .party-stats {
        grid-template-columns: 1fr;
    }
    
    .game-board {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
    
    .board-cell {
        min-height: 60px;
        font-size: 0.7rem;
    }
    
    .button-race {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-btn {
        width: 200px;
    }
    
    .sale-notice {
        font-size: 1rem;
    }
    
    .designer-credit {
        font-size: 1rem;
    }
}