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

:root {
    --background: 330 100% 97%; /* #ffe6f0 */
    --primary-pink: 330 100% 69%; /* #ff69b4 */
    --light-pink: 330 100% 85%; /* #ffb3d9 */
    --white: 0 0% 100%; /* #ffffff */
    --dark-gray: 0 0% 20%; /* #333333 */
    --light-gray: 0 0% 95%; /* #f5f5f5 */
    --border: 0 0% 80%; /* #cccccc */
    --success: 120 60% 50%; /* #4CAF50 */
    --error: 0 70% 50%; /* #f44336 */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--dark-gray));
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-screen {
    text-align: center;
    background: hsl(var(--white));
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.1);
    max-width: 600px;
}

.welcome-screen h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: hsl(var(--primary-pink));
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: hsl(var(--dark-gray));
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: hsl(var(--primary-pink));
    color: hsl(var(--white));
}

.btn-primary:hover {
    background: hsl(330 100% 60%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
}

.btn-secondary {
    background: hsl(var(--white));
    color: hsl(var(--primary-pink));
    border: 2px solid hsl(var(--primary-pink));
}

.btn-secondary:hover {
    background: hsl(var(--light-pink));
    transform: translateY(-2px);
}

.how-to-play, .game-rules {
    margin-top: 30px;
    text-align: left;
    background: hsl(var(--light-gray));
    padding: 20px;
    border-radius: 15px;
}

.how-to-play h3, .game-rules h3 {
    color: hsl(var(--primary-pink));
    margin-bottom: 15px;
    text-align: center;
}

.how-to-play ol, .game-rules ul {
    padding-left: 20px;
}

.how-to-play li, .game-rules li {
    margin-bottom: 8px;
}

/* Game Screen Styles */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: hsl(var(--white));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.1);
}

.game-header h1 {
    color: hsl(var(--primary-pink));
    font-size: 2rem;
}

.room-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.room-code {
    font-family: 'Courier New', monospace;
    background: hsl(var(--light-pink));
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: bold;
}

.game-status {
    background: hsl(var(--white));
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.1);
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    min-width: 150px;
}

.player.pink {
    background: linear-gradient(135deg, hsl(var(--light-pink)), hsl(var(--white)));
}

.player.white {
    background: linear-gradient(135deg, hsl(var(--white)), hsl(var(--light-gray)));
}

.player-piece {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid hsl(var(--dark-gray));
}

.pink-piece {
    background: hsl(var(--primary-pink));
}

.white-piece {
    background: hsl(var(--white));
}

.player-name {
    font-weight: bold;
    flex-grow: 1;
}

.player-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: hsl(var(--primary-pink));
}

.turn-indicator {
    text-align: center;
    padding: 15px;
}

.turn-indicator span {
    font-size: 1.2rem;
    font-weight: bold;
    color: hsl(var(--primary-pink));
}

.game-board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

#game-board {
    border: 3px solid hsl(var(--primary-pink));
    border-radius: 15px;
    background: hsl(var(--white));
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2);
}

#valid-moves-overlay {
    position: absolute;
    top: 3px;
    left: 3px;
    pointer-events: none;
    width: 480px;
    height: 480px;
}



.game-messages {
    text-align: center;
    margin-bottom: 20px;
}

.error-message {
    background: hsl(var(--error));
    color: hsl(var(--white));
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

.game-over-message {
    background: hsl(var(--success));
    color: hsl(var(--white));
    padding: 20px;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.game-actions {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container, .game-container {
        padding: 10px;
    }
    
    .welcome-screen {
        padding: 20px;
    }
    
    .welcome-screen h1 {
        font-size: 2rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .player-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .turn-indicator {
        order: -1;
    }
    
    #game-board {
        width: 320px;
        height: 320px;
    }
    
    #valid-moves-overlay {
        width: 320px;
        height: 320px;
    }
    
    .valid-move-hint {
        width: 37px;
        height: 37px;
    }
}

@media (max-width: 480px) {
    #game-board {
        width: 280px;
        height: 280px;
    }
    
    #valid-moves-overlay {
        width: 280px;
        height: 280px;
    }
    
    .valid-move-hint {
        width: 32px;
        height: 32px;
    }
}

/* Animation for piece placement */
@keyframes piecePlace {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.piece-placed {
    animation: piecePlace 0.3s ease-out;
}

/* Bot game section */
.bot-game-section {
    margin: 30px 0;
    padding: 20px;
    background: hsl(var(--light-gray));
    border-radius: 15px;
}

.bot-game-section h3 {
    color: hsl(var(--primary-pink));
    margin-bottom: 15px;
    text-align: center;
}

.bot-difficulty-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.bot-difficulty-buttons .btn {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
}

/* Expandable sections */
.expandable-section {
    margin: 20px 0;
}

.expand-btn {
    width: 100%;
    padding: 15px 20px;
    background: hsl(var(--white));
    border: 2px solid hsl(var(--primary-pink));
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: hsl(var(--primary-pink));
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: hsl(var(--light-pink));
    transform: translateY(-1px);
}

.arrow {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.expandable-content {
    padding: 20px;
    background: hsl(var(--light-gray));
    border-radius: 0 0 10px 10px;
    border: 2px solid hsl(var(--primary-pink));
    border-top: none;
    margin-top: -2px;
}

.expandable-content ol,
.expandable-content ul {
    padding-left: 20px;
    margin: 0;
}

.expandable-content li {
    margin-bottom: 8px;
}

/* Current player highlight */
.player.current-turn {
    background: linear-gradient(135deg, hsl(var(--primary-pink)), hsl(var(--light-pink)));
    color: hsl(var(--white));
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.4);
}

.player.current-turn.white {
    background: linear-gradient(135deg, hsl(var(--dark-gray)), hsl(var(--border)));
    color: hsl(var(--white));
}
