
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #07111c;
  color: white;
  font-family: Arial, sans-serif;
  overflow: hidden;
  width: 100%;
  height: 100dvh;
  touch-action: none;
}

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

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

#topbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 65px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  background: linear-gradient(#07111ce8, #07111c00);
  pointer-events: none;
}

.brand {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
}

.brand span {
  color: #42d98b;
  font-size: 11px;
}

#scoreboard {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #07111cdd;
  padding: 9px 14px;
  border: 1px solid #ffffff22;
  border-radius: 12px;
}

#score {
  font-size: 21px;
  font-weight: 900;
  min-width: 50px;
  text-align: center;
}

.team-name {
  font-size: 10px;
  font-weight: bold;
  color: #b8c9d8;
}

#clock {
  font-size: 13px;
  font-weight: bold;
  color: #d9e7f2;
}

#message {
  position: absolute;
  z-index: 4;
  top: 85px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 18px;
  border-radius: 30px;
  background: #07111cbb;
  border: 1px solid #ffffff22;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
}

#controls {
  position: absolute;
  bottom: 38px;
  left: 0;
  width: 100%;
  padding: 0 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 6;
  pointer-events: none;
}

#joystick-zone {
  width: 125px;
  height: 125px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  touch-action: none;
}

#joystick-base {
  width: 112px;
  height: 112px;
  background: #07111c88;
  border: 2px solid #ffffff55;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

#joystick-stick {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #a9bac8);
  border: 2px solid #ffffffaa;
  box-shadow: 0 4px 14px #0008;
  transform: translate(0, 0);
}

#action-buttons {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: auto;
}

.action {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #ffffff66;
  color: white;
  font-size: 21px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  box-shadow: 0 5px 18px #0006;
  touch-action: none;
}

.action small {
  font-size: 8px;
  font-weight: 900;
}

.pass {
  background: #1879d5dd;
}

.shoot {
  width: 76px;
  height: 76px;
  background: #16a765;
  font-size: 26px;
}

.secondary {
  background: #26394ddd;
  width: 57px;
  height: 57px;
  font-size: 18px;
}

.action:active {
  transform: scale(.92);
  filter: brightness(1.25);
}

#bottom-info {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  color: #ffffff99;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
  z-index: 5;
  pointer-events: none;
}

#loading {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #07111c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.loading-logo {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #42d98b;
}

.loading-text {
  color: #91a6b7;
  font-size: 13px;
}

@media (max-width: 380px) {
  #controls {
    padding: 0 12px;
  }

  #action-buttons {
    gap: 7px;
  }

  .action {
    width: 55px;
    height: 55px;
  }

  .shoot {
    width: 66px;
    height: 66px;
  }

  #joystick-zone {
    width: 110px;
    height: 110px;
  }

  #joystick-base {
    width: 100px;
    height: 100px;
  }
}
