:root {
  --bg-color: #2c3e50;
  --ui-bg: rgba(255, 255, 255, 0.9);
  --accent-red: #e74c3c;
  --accent-blue: #3498db;
  --accent-green: #2ecc71;
  --text-color: #333;
}

body {
  margin: 0;
  padding: 0;
  background-color: #1a1a1a;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

#game-container {
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
}

canvas {
  display: block;
  background-color: #7f8c8d;
}

#ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Stats Bar */
#stats-bar {
  display: flex;
  justify-content: space-between;
  background: var(--ui-bg);
  padding: 10px 15px;
  border-bottom: 2px solid #bdc3c7;
  pointer-events: auto;
  font-size: 14px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-color);
  font-weight: bold;
}

.stat-item .value {
  color: #2980b9;
  font-family: monospace;
  font-size: 16px;
}

/* Hats/Strikes */
#hats-display {
  display: flex;
  gap: 3px;
}

.hat-slot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #ccc;
  border: 2px solid #999;
}

.hat-slot.filled {
  background-color: var(--accent-red);
  border-color: #c0392b;
  box-shadow: 0 0 5px var(--accent-red);
}

/* Clutter Bar */
.bar-container {
  width: 80px;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  overflow: hidden;
}

#clutter-bar {
  height: 100%;
  background-color: var(--accent-green);
  transition: width 0.2s, background-color 0.2s;
}

#clutter-bar.warning { background-color: #f39c12; }
#clutter-bar.danger { background-color: var(--accent-red); }

/* Complaint Progress */
#complaint-progress-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 8px;
  color: white;
  pointer-events: none;
}

.progress-label {
  font-size: 12px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.progress-bar-bg {
  width: 200px;
  height: 15px;
  background: #444;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #666;
}

#complaint-bar {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  width: 0%;
  transition: width 0.1s linear;
}

/* Screens */
#start-screen, #message-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 62, 80, 0.95);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  text-align: center;
  z-index: 100;
}

#notification-overlay {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(39, 174, 96, 0.9);
  padding: 15px 40px;
  border-radius: 50px;
  color: white;
  text-transform: uppercase;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 50;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: translateX(-50%) scale(0.5); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}

.instructions {
  background: rgba(255,255,255,0.1);
  padding: 20px;
  border-radius: 8px;
  margin: 20px;
  text-align: left;
  max-width: 400px;
}

.instructions ul {
  padding-left: 20px;
}

button {
  padding: 12px 30px;
  font-size: 18px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  background: var(--accent-green);
  color: white;
  font-weight: bold;
  transition: transform 0.1s;
  outline: none;
}

button:hover {
  transform: scale(1.05);
  background: #27ae60;
}

.hidden {
  display: none !important;
}

kbd {
  background-color: #eee;
  border-radius: 3px;
  border: 1px solid #b4b4b4;
  box-shadow: 0 1px 1px rgba(0,0,0,.2), 0 2px 0 0 rgba(255,255,255,.7) inset;
  color: #333;
  display: inline-block;
  font-size: .85em;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  white-space: nowrap;
}
