* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'VT323', monospace;
  color: #6eff00;
  overflow: hidden;
}

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#phone-frame {
  background: linear-gradient(180deg, #5f6c7c 0%, #3c4a5c 50%, #2d3a4a 100%);
  border-radius: 24px;
  padding: 12px;
  box-shadow: 
    0 0 0 4px #aebac9,
    0 0 0 8px #3c4a5c,
    0 10px 40px rgba(0,0,0,0.5),
    inset 0 2px 0 rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#phone-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

#nokia-logo {
  font-family: 'Arial Black', sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: #1a1a2e;
  text-shadow: 0 1px 0 rgba(255,255,255,0.2);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

#status-bar {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: #2d3a4a;
}

#screen-bezel {
  background: #1a1a0a;
  border-radius: 4px;
  padding: 8px;
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.5),
    0 1px 0 rgba(255,255,255,0.1);
}

#canvas {
  display: block;
  border-radius: 2px;
  image-rendering: pixelated;
  box-shadow: 0 0 20px rgba(110, 255, 0, 0.2);
}

#phone-controls {
  display: flex;
  gap: 40px;
  margin-top: 16px;
  margin-bottom: 8px;
  align-items: center;
}

#dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dpad-row {
  display: flex;
  align-items: center;
}

.dpad-btn {
  width: 32px;
  height: 32px;
  background: linear-gradient(180deg, #4a5568 0%, #2d3748 100%);
  border: none;
  border-radius: 4px;
  color: #1a202c;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.dpad-btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.dpad-center {
  width: 20px;
  height: 20px;
  background: #2d3748;
  border-radius: 50%;
}

.action-btn {
  width: 64px;
  height: 64px;
  background: linear-gradient(180deg, #48bb78 0%, #276749 100%);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 2px 0 rgba(255,255,255,0.2);
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.action-btn:active {
  transform: scale(0.95);
}

#phone-keypad {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  opacity: 0.6;
}

.key-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.phone-key {
  width: 28px;
  height: 20px;
  background: linear-gradient(180deg, #4a5568 0%, #2d3748 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #1a202c;
}

#controls-hint {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: #6eff00;
  opacity: 0.7;
}

#settings-toggle {
  cursor: pointer;
  padding: 8px 16px;
  background: rgba(110, 255, 0, 0.1);
  border-radius: 8px;
  transition: background 0.2s;
}

#settings-toggle:hover {
  background: rgba(110, 255, 0, 0.2);
}

#settings-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(110, 255, 0, 0.3);
}

#settings-panel.hidden {
  display: none;
}

#settings-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

#settings-panel select {
  background: #1a1a2e;
  color: #6eff00;
  border: 1px solid #6eff00;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'VT323', monospace;
}

#settings-panel input[type="checkbox"] {
  accent-color: #6eff00;
  width: 16px;
  height: 16px;
}

footer {
  margin-top: 24px;
  padding: 16px;
}

footer a {
  color: #6eff00;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
  font-size: 14px;
}

footer a:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  #phone-frame {
    transform: scale(0.85);
  }
  
  #controls-hint {
    display: none;
  }
  
  #phone-controls {
    gap: 60px;
  }
  
  .dpad-btn {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  .action-btn {
    width: 72px;
    height: 72px;
    font-size: 10px;
  }
}