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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#gameContainer {
    width: 100%;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

header {
    background: #2c3e50;
    padding: 15px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #f1c40f;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.player-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.turn-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #f1c40f;
    box-shadow: 0 0 10px #f1c40f;
}

.scoreboard {
    display: flex;
    gap: 20px;
}

.player-score {
    display: flex;
    gap: 5px;
    font-weight: bold;
}

.player-score span:first-child {
    color: #ecf0f1;
}

.player-score span:last-child {
    color: #f1c40f;
    font-size: 1.2rem;
}

.game-controls {
    display: flex;
    gap: 10px;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

#resetBtn {
    background: #e74c3c;
}

#resetBtn:hover {
    background: #c0392b;
}

#gameArea {
    position: relative;
    padding: 20px;
    display: flex;
    justify-content: center;
}

#carromBoard {
    background: #8B4513;
    border: 8px solid #5D2906;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    display: block;
    max-width: 100%;
    height: auto;
}

#powerMeter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.power-bar {
    width: 100%;
    height: 20px;
    background: #2c3e50;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.power-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 50%;
    background: linear-gradient(to right, #2ecc71, #f1c40f, #e74c3c);
    border-radius: 10px;
    transition: width 0.1s ease;
}

.power-label {
    font-size: 0.9rem;
    font-weight: bold;
}

#aimingLine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

#aimingLine::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #2c3e50;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal h2 {
    color: #f1c40f;
    margin-bottom: 20px;
}

.setting-group {
    margin: 15px 0;
    text-align: left;
}

.setting-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.setting-group select, .setting-group input {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #34495e;
    background: #34495e;
    color: white;
}

#closeSettings, #playAgain {
    margin-top: 20px;
    padding: 10px 25px;
    font-size: 1.1rem;
}

#winnerText {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

#finalScore {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #ecf0f1;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .scoreboard {
        width: 100%;
        justify-content: space-around;
    }
    
    .game-controls {
        width: 100%;
        justify-content: center;
    }
    
    #powerMeter {
        bottom: 15px;
        width: 150px;
    }
    
    .modal-content {
        padding: 20px;
    }
}