main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    font-family: Arial, sans-serif;
    padding: 20px;
}

body {
    background-color: #e8f4fd;
}

h1 {
    margin-bottom: 30px;
    color: #2c3e50;
    text-align: center;
}

/* Mode Selection Styles */
.mode-selection {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 20px;
}

.mode-selection h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.mode-buttons, .difficulty-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.mode-btn, .difficulty-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.mode-btn:hover, .difficulty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.difficulty-selection {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.difficulty-selection h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Game Area Styles */
.game-area {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.game-status {
    margin-bottom: 25px;
}

.game-status p {
    margin: 8px 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

#currentPlayer {
    font-weight: bold;
    color: #e74c3c;
}

#gameMode {
    color: #7f8c8d;
    font-size: 1rem;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 8px;
    margin: 25px auto;
    justify-content: center;
}

.cell {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 100px;
    background-color: #f8f9fa;
    border: 3px solid #3498db;
    border-radius: 8px;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.cell:hover {
    background-color: #e3f2fd;
    transform: scale(1.05);
}

.cell:active {
    transform: scale(0.95);
}

.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

#restartButton, #changeModeButton {
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

#restartButton {
    background-color: #27ae60;
    color: white;
}

#restartButton:hover {
    background-color: #2ecc71;
    transform: translateY(-1px);
}

#changeModeButton {
    background-color: #3498db;
    color: white;
}

#changeModeButton:hover {
    background-color: #5dade2;
    transform: translateY(-1px);
}

p {
    margin-top: 30px;
}

p a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

p a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 600px) {
    .mode-buttons, .difficulty-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-btn, .difficulty-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .board {
        grid-template-columns: repeat(3, 80px);
        grid-template-rows: repeat(3, 80px);
        gap: 6px;
    }
    
    .cell {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    #restartButton, #changeModeButton {
        width: 100%;
        max-width: 200px;
    }
    
    main {
        padding: 10px;
    }
    
    .mode-selection, .game-area {
        padding: 20px;
    }
}