
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #101c25;
  color: white;
  overflow: hidden;
}

#game {
  width: 100%;
  height: 100dvh;
  position: relative;
}

#scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#scene canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(12, 25, 34, 0.85);
  backdrop-filter: blur(8px);
}

#topbar strong {
  display: block;
  font-size: 15px;
  letter-spacing: 1px;
}

#topbar small {
  color: #a9c8c1;
}

#user-area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

button {
  border: 0;
  border-radius: 9px;
  padding: 11px 15px;
  background: #8bcbb0;
  color: #10251e;
  font-weight: bold;
  cursor: pointer;
}

button:active {
  transform: scale(0.96);
}

.panel {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90%, 390px);
  padding: 23px;
  border-radius: 18px;
  background: rgba(16, 28, 37, 0.95);
  border: 1px solid #45605d;
  box-shadow: 0 12px 35px #0008;
}

.panel h1 {
  font-size: 23px;
  line-height: 1.3;
}

.panel p {
  color: #c3d2d0;
  font-size: 14px;
  line-height: 1.6;
}

label {
  display: block;
  margin: 13px 0 6px;
  font-size: 13px;
}

input {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #58706c;
  border-radius: 8px;
  background: #1d3039;
  color: white;
  outline: none;
}

input:focus {
  border-color: #8bcbb0;
}

.auth-buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.auth-buttons button {
  flex: 1;
}

#auth-status {
  overflow-wrap: anywhere;
  font-size: 13px;
}

#city-info {
  top: 90px;
  left: 15px;
  transform: none;
  width: min(85%, 310px);
  padding: 15px;
}

#city-info p {
  margin-bottom: 0;
}

#controls {
  position: absolute;
  z-index: 2;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

#controls button {
  width: 48px;
  height: 44px;
  padding: 0;
  font-size: 18px;
  background: rgba(139, 203, 176, 0.9);
  touch-action: none;
}

#controls div {
  display: flex;
  gap: 5px;
}

#loading {
  position: absolute;
  z-index: 5;
  bottom: 10px;
  right: 12px;
  font-size: 11px;
  color: #d6e9df;
}

[hidden] {
  display: none !important;
}

@media (min-width: 700px) {
  #controls {
    left: auto;
    right: 35px;
    transform: none;
  }
}
