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

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
}

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  max-width: 100vw;
  position: relative;
}

#logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

.logo-text {
  font-size: 12px;
  letter-spacing: 8px;
  color: #e94560;
  font-weight: 300;
}

.logo-title {
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(180deg, #00f5ff 0%, #e94560 50%, #ffe66d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(233, 69, 96, 0.5);
  letter-spacing: 6px;
}

.logo-version {
  font-size: 10px;
  color: #888;
  letter-spacing: 4px;
  margin-top: 2px;
}

#header {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  align-items: stretch;
}

#header > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 10px;
  min-width: 60px;
}

#header span:first-child {
  font-size: 9px;
  color: #888;
  letter-spacing: 1px;
}

#header span:last-child {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
}

#next-piece-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 10px;
}

#next-piece-container span {
  font-size: 9px;
  color: #888;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

#next-piece {
  background: #0a0a14;
  border-radius: 4px;
}

#game-wrapper {
  position: relative;
}

#game-board {
  border: 3px solid #e94560;
  border-radius: 5px;
  background: #0a0a14;
  box-shadow: 0 0 30px rgba(233, 69, 96, 0.3);
}

#start-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 20, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  z-index: 10;
}

#start-screen.hidden {
  display: none;
}

#start-blocks {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0.3;
}

.falling-block {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translateY(-30px) rotate(0deg);
  }
  100% {
    transform: translateY(calc(100vh)) rotate(360deg);
  }
}

#start-btn {
  background: linear-gradient(145deg, #e94560, #c73e54);
  border: none;
  color: white;
  padding: 20px 50px;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(233, 69, 96, 0.6);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1;
  letter-spacing: 3px;
}

#start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(233, 69, 96, 0.8);
}

#start-btn:active {
  transform: scale(0.98);
}

#start-hint {
  color: #888;
  font-size: 12px;
  margin-top: 20px;
  z-index: 1;
}

#controls {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

#controls button {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #e94560, #c73e54);
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
  transition: transform 0.1s, box-shadow 0.1s;
  display: flex;
  justify-content: center;
  align-items: center;
}

#controls button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(233, 69, 96, 0.3);
}

#game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 10, 20, 0.95);
  padding: 30px 50px;
  border-radius: 15px;
  text-align: center;
  border: 2px solid #e94560;
  box-shadow: 0 0 50px rgba(233, 69, 96, 0.5);
  z-index: 20;
}

#game-over h2 {
  color: #e94560;
  font-size: 28px;
  margin-bottom: 15px;
}

#game-over p {
  color: #fff;
  font-size: 20px;
  margin-bottom: 20px;
}

#restart-btn {
  background: linear-gradient(145deg, #e94560, #c73e54);
  border: none;
  color: white;
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

#restart-btn:active {
  transform: scale(0.95);
}

.developer-credit {
  color: #888;
  font-size: 11px;
  margin-top: 15px;
}

.developer-name {
  color: #e94560;
  font-size: 14px;
  font-weight: bold;
  display: block;
  margin-top: 3px;
}

.hidden {
  display: none !important;
}

@media (max-height: 700px) {
  #logo {
    margin-bottom: 5px;
  }
  .logo-title {
    font-size: 24px;
  }
  #header {
    gap: 8px;
  }
  #header > div {
    padding: 5px 10px;
    min-width: 50px;
  }
  #header span:first-child {
    font-size: 8px;
  }
  #header span:last-child {
    font-size: 14px;
  }
  #controls button {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}
