:root {
  --bg-color: #121212;
  --surface-color: #1e1e1e;
  --primary-color: #bb86fc;
  --text-color: #e0e0e0;
  --secondary-color: #03dac6;
  --error-color: #cf6679;
}

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

header {
  padding: 10px 20px;
  background-color: var(--surface-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  z-index: 10;
}

h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary-color);
}

.controls {
  display: flex;
  gap: 20px;
  align-items: center;
}

.stats span {
  font-size: 1.2rem;
  margin-right: 15px;
}

button {
  background-color: var(--primary-color);
  border: none;
  padding: 8px 16px;
  color: #000;
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #a370db;
}

select {
  padding: 8px;
  background-color: var(--surface-color);
  color: var(--text-color);
  border: 1px solid #333;
  border-radius: 4px;
}

main {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: #000;
}

canvas {
  display: block;
  touch-action: none; /* Prevent default touch actions like scroll */
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.hidden {
  display: none !important;
}

.modal-content {
  background: var(--surface-color);
  padding: 30px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 300px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.modal-content label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-content input {
  width: 60px;
  padding: 5px;
  background: #333;
  border: 1px solid #444;
  color: #fff;
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 10px;
  }
  .controls {
    width: 100%;
    justify-content: space-between;
  }
}
