body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    min-height: 100vh;
    margin: 0;
    color: #e0e0e0;
}

.container {
    background: #1e1e1e;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 800px;
    min-height: 650px;
    text-align: center;
    box-sizing: border-box;
}

h2 { margin-top: 0; color: #bb86fc; }

/* Setup Screen */
.input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

input[type="number"] {
    padding: 10px;
    border: 2px solid #3a3a3a;
    border-radius: 6px;
    font-size: 16px;
    width: 120px;
    text-align: center;
    background-color: #2c2c2c;
    color: #ffffff;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.btn-primary { background-color: #3700b3; color: #ffffff; }
.btn-primary:hover { background-color: #6200ee; }

.btn-danger { background-color: #cf6679; color: #121212; }
.btn-danger:hover { background-color: #e57373; }

.btn-secondary { background-color: #4a4a4a; color: #ffffff; }
.btn-secondary:hover { background-color: #6c6c6c; }
.btn-secondary:disabled { background-color: #2c2c2c; color: #777777; cursor: not-allowed; }

/* Game Interface */
.game-interface { display: none; }

.bounds-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background-color: #2c2c2c;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.bound-value {
    font-size: 24px;
    font-weight: bold;
    color: #bb86fc;
    min-width: 60px;
}

.mid-value {
    font-size: 32px;
    font-weight: bold;
    color: #ffb86c;
    background: #2c2c2c;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px dashed #ffb86c;
    min-width: 80px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.mid-value:hover {
    background-color: #3a3a3a;
    transform: scale(1.05);
}

.mid-value.copied {
    background-color: #2a6e3b;
    border-color: #4caf50;
    color: #c8e6c9;
}

.btn-choice {
    font-size: 24px;
    padding: 15px 25px;
    border-radius: 8px;
    background-color: #4a4a4a;
    color: white;
}

.btn-choice:hover {
    background-color: #6200ee;
    transform: scale(1.05);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #3a3a3a;
}

/* History Log */
.history-log {
    margin-top: 25px;
    text-align: left;
    height: 400px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    padding: 10px;
    background: #1a1a1a;
    box-sizing: border-box;
}

.history-log h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #aaaaaa;
    position: sticky;
    top: 0;
    background: #1a1a1a;
    padding-bottom: 5px;
    border-bottom: 1px solid #3a3a3a;
    z-index: 1;
}

.history-item {
    padding: 8px;
    border-bottom: 1px solid #2c2c2c;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:last-child { border-bottom: none; }

.history-item.current {
    background-color: #2a5a3a;
    font-weight: bold;
    border-left: 4px solid #4caf50;
}

.exact-math {
    color: #aaaaaa;
    font-size: 12px;
    font-style: italic;
    margin-right: 5px;
}

.error-msg {
    color: #cf6679;
    display: none;
    margin-top: 10px;
    font-weight: bold;
}
