:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-color: #ef4444;
    --panel-bg: #1e293b;
}

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

h1, h2 { color: var(--accent-color); }

/* Settings Icon */
#btn-settings {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s;
}
#btn-settings:hover {
    transform: rotate(45deg);
}

/* Setup Screen */
#setup-screen { margin-top: 100px; }
.btn-group button {
    background-color: var(--panel-bg);
    color: white;
    border: 2px solid var(--accent-color);
    padding: 15px 30px;
    font-size: 1.2rem;
    margin: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
}
.btn-group button:hover { background-color: var(--accent-color); }

/* Game Screen */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 30px auto;
}
canvas {
    border-radius: 50%;
    border: 4px solid var(--panel-bg);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
    transition-property: transform;
    /* Duration and easing are now handled strictly by JS */
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid white;
    z-index: 10;
}

.controls button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    margin: 10px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: bold;
}
.controls button:disabled { background-color: #64748b; cursor: not-allowed; }

#bag-stats { margin-top: 20px; font-size: 0.9rem; color: #94a3b8; line-height: 1.6; }

/* Modals */
.overlay {
    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-color: var(--panel-bg);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--accent-color);
    max-width: 400px;
    width: 90%;
}

.modal-title { font-size: 1.5rem; margin-bottom: 10px; font-weight: bold; color: var(--accent-color); }
.modal-text { font-size: 1.2rem; margin-bottom: 15px; }
.modal-action { font-size: 1rem; font-style: italic; color: #94a3b8; margin-bottom: 20px; }

.modal-close, .btn-danger {
    padding: 10px 20px; cursor: pointer; border-radius: 4px; font-weight: bold; border: none; margin: 5px;
}
.modal-close { background-color: white; color: black; }
.btn-danger { background-color: #dc2626; color: white; }

/* Settings specifics */
.settings-group { margin: 15px 0 25px 0; text-align: left; }
.settings-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #94a3b8; }
.settings-group select, .settings-group input[type="number"] { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 4px; background: var(--bg-color); color: white; border: 1px solid #334155; }
.settings-actions { margin-top: 30px; display: flex; justify-content: space-between; }