:root {
  --device-width: 390px;
  --device-height: 844px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: #1a1a1a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, sans-serif;
}

.app-frame {
  width: var(--device-width);
  height: var(--device-height);
  background: #000;
  border: 1px solid #333;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
}

.app-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  color: #eee;
  display: flex;
  flex-direction: column;
}

#game-canvas {
  flex: 1 1 auto;
  width: 100%;
  display: block;
  touch-action: none;
}

.auth-form {
  padding: 24px 20px;
}

.auth-form h1 {
  font-size: 1.4rem;
  margin: 0 0 20px;
}

.auth-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: #ccc;
}

.auth-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  color: #eee;
  font-size: 1rem;
}

.auth-form input:focus {
  outline: none;
  border-color: #666;
}

.auth-form button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: #eee;
  color: #111;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-form button:hover {
  background: #fff;
}

.auth-error {
  background: #3a1e1e;
  border: 1px solid #6b2b2b;
  color: #ffb3b3;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.auth-switch {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #999;
  text-align: center;
}

.auth-switch a {
  color: #eee;
}

/* Echtes Mobilgerät: Rahmen weg, volle Bildschirmgröße */
@media (max-width: 500px) {
  body {
    display: block;
  }

  .app-frame {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
}
