:root {
    --bg-color: #f4f6f9;
    --text-color: #333;
    --card-bg: #ffffff;
    --button-bg: #4CAF50;
    --button-hover: #45a049;
    --ball-text: #ffffff;
}

[data-theme='dark'] {
    --bg-color: #1a1a1a;
    --text-color: #f4f6f9;
    --card-bg: #2d2d2d;
    --button-bg: #2e7d32;
    --button-hover: #1b5e20;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding-top: 80px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

h1 {
    margin-bottom: 30px;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
}

.game {
    margin: 20px 0;
    font-size: 18px;
    padding: 10px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.ball {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    margin: 5px;
    color: var(--ball-text);
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

button {
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: var(--button-bg);
    color: white;
    transition: background-color 0.3s, transform 0.1s;
    font-weight: bold;
}

button:hover {
    background-color: var(--button-hover);
}

button:active {
    transform: scale(0.98);
}

#theme-btn {
    background-color: var(--text-color);
    color: var(--bg-color);
}
