* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  touch-action: manipulation;
}

body {
  background: radial-gradient(circle at 50% 20%, #161b2e 0%, #05070c 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  overflow: hidden;
}

.screen {
  display: none;
  width: 100%;
  height: 100vh;
  justify-content: center;
  align-items: center;
}

.screen.active {
  display: flex;
}

/* LOBBY STYLES */
.lobby-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 90%;
  max-width: 360px;
  position: relative;
}

.glow-orb {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 60px;
  background: radial-gradient(ellipse, rgba(0, 229, 255, 0.4) 0%, rgba(255, 122, 0, 0.25) 50%, transparent 80%);
  filter: blur(20px);
  z-index: 0;
}

.brand-title-main {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  z-index: 1;
}

.brand-title-main span {
  color: #ff7a00;
  text-shadow: 0 0 15px rgba(255, 122, 0, 0.7);
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 4px;
  color: #8da2c0;
  margin-bottom: 24px;
  z-index: 1;
}

.games-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  z-index: 1;
}

.game-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 16px;
  text-align: left;
  position: relative;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.active-card {
  border-color: #00e5ff;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
  cursor: pointer;
}

.active-card:hover, .active-card:active {
  transform: translateY(-2px);
  background: rgba(0, 229, 255, 0.1);
}

.locked-card {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.game-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
}

.game-card p {
  font-size: 12px;
  color: #8da2c0;
}

.card-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  background: #00e5ff;
  color: #05070c;
  border-radius: 4px;
  box-shadow: 0 0 10px #00e5ff;
}

.lock-tag {
  background: #475569;
  color: #cbd5e1;
  box-shadow: none;
}

/* GAMEPLAY NAVIGATION */
.arcade-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.top-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 290px;
}

.nav-back-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #00e5ff;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.game-mini-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.game-mini-title span {
  color: #ff7a00;
}

/* HUD & BOARD */
.hud {
  display: flex;
  justify-content: space-between;
  width: 290px;
  gap: 6px;
}

.hud-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 10px;
  border-radius: 8px;
  text-align: center;
  flex: 1;
}

.hud-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  color: #8da2c0;
}

.hud-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: #00e5ff;
}

.level-value {
  color: #ffd600;
}

.board-stage {
  position: relative;
  perspective: 900px;
}

#tetris {
  background: linear-gradient(180deg, #090b12 0%, #030407 100%);
  border-radius: 12px;
  border: 2px solid #2f384d;
  transform: rotateX(7deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.95);
  display: block;
}

.level-banner {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(255, 122, 0, 0.95);
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 0 20px #ff7a00;
  pointer-events: none;
  z-index: 10;
  transition: all 0.3s;
  opacity: 0;
}

.level-banner.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.controls-panel {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.game-btn {
  width: 60px;
  height: 48px;
  background: linear-gradient(180deg, #272f42 0%, #151924 100%);
  border: 1px solid #3d4a66;
  color: #fff;
  font-size: 20px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 0 #0b0d13;
}

.game-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0b0d13;
}

.btn-action {
  background: linear-gradient(180deg, #ff8c00 0%, #d65500 100%);
  border-color: #ffa433;
  box-shadow: 0 4px 0 #803300;
}