body {
  margin:0;
  font-family:'Poppins', sans-serif;
  background:#121212;
  color:#ffffff;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  height:100vh;
  overflow:hidden;
}

.game-container {
  width: 340px;
  padding:15px;
  background:#1e1e1e;
  border-radius:16px;
  box-shadow:0 0 20px rgba(0,0,0,0.5);
}

.header, .controls, .modes {
  margin-bottom:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.controls input {
  width: 70px;
  padding:6px;
  border-radius:8px;
  border:none;
  background:#2a2a2a;
  color:#fff;
  font-size:14px;
}

.controls button {
  padding:6px 12px;
  background:#2ecc71;
  border:none;
  border-radius:10px;
  color:#000;
  font-weight:600;
  transition:all 0.2s;
}
.controls button:hover { background:#27ae60; }

.modes button {
  flex:1;
  margin:0 2px;
  padding:6px 0;
  border-radius:10px;
  border:none;
  background:#2a2a2a;
  color:#fff;
  font-weight:600;
  transition:all 0.2s;
}
.modes button.active { background:#2ecc71; color:#000; }
.modes button:hover:not(.active){ background:#333; }

canvas {
  display:block;
  margin:0 auto;
  background:#222;
  border-radius:12px;
}

.legend {
  font-size:12px;
  margin-top:8px;
  text-align:center;
  color:#bbb;
}

.history-container {
  max-height: 120px;
  overflow-y:auto;
  padding:8px;
  border-radius:10px;
  background:rgba(255,255,255,0.05);
  margin-bottom:5px;
}

.history-item {
  display:flex;
  justify-content:space-between;
  padding:2px 4px;
  font-size:13px;
}

.history-item .won { color:#2ecc71; }
.history-item .lost { color:#ff4b4b; }

.win-box {
  text-align:center;
  font-size:16px;
  margin:8px 0;
  font-weight:bold;
  color:#ffffff;
  background:rgba(255,255,255,0.05);
  padding:4px 8px;
  border-radius:8px;
}

button { cursor:pointer; font-family:'Poppins', sans-serif; }