:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-alt: #22263a;
  --text: #e8eaf0;
  --text-muted: #8b90a8;
  --accent: #7c6af5;
  --accent-hover: #6a57e8;
  --accent-glow: rgba(124, 106, 245, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --card-bg: #1e2236;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124, 106, 245, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(90, 170, 255, 0.12) 0%, transparent 60%);
  min-height: 100vh;
}

.container {
  width: min(980px, 92vw);
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  margin: 0;
  font-size: 1.4rem;
  background: linear-gradient(90deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-list a:hover {
  color: var(--text);
}

main {
  padding: 2rem 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}

.button {
  display: inline-block;
  margin-top: 1rem;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  color: white;
  background: var(--accent);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 0 18px var(--accent-glow);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.button:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 28px var(--accent-glow);
  transform: translateY(-1px);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.game-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
  background: var(--card-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.game-card:hover {
  border-color: rgba(124, 106, 245, 0.5);
  box-shadow: 0 0 20px rgba(124, 106, 245, 0.15);
}

.placeholder-box {
  margin-top: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.9rem;
  background: var(--surface-alt);
  color: var(--text-muted);
}

/* ── Satzbauwuerfeln game page ── */

.game-intro {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.roll-btn {
  font-size: 1.05rem;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
}

.roll-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.dice-area {
  margin-top: 1.5rem;
  min-height: 2rem;
}

.dice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.die-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: fadeSlideIn 0.3s ease both;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.die-number {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.die-label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.die-question {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.die-suggestion {
  margin-top: 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.sentence-type-area {
  margin-top: 1.25rem;
}

.sentence-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--surface-alt);
  border: 1px solid rgba(124, 106, 245, 0.4);
  border-radius: 12px;
  padding: 0.55rem 1rem;
  animation: fadeSlideIn 0.3s ease 0.1s both;
}

.st-letter {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.st-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.input-area {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-area.hidden {
  display: none;
}

.input-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.sentence-input {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 1rem;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.2s;
}

.sentence-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 106, 245, 0.2);
}

.input-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.error-msg {
  color: #f87171;
  font-size: 0.9rem;
}

/* --- Validate button --- */

.validate-btn {
  margin-top: 0.75rem;
  background: #22c55e;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.3);
}

.validate-btn:hover {
  background: #16a34a;
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.4);
}

.validate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- Result box --- */

.result-box {
  margin-top: 1rem;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  animation: fadeSlideIn 0.25s ease both;
}

.result-box.hidden {
  display: none;
}

.result-pass {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.result-fail {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.result-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #f87171;
}

.result-message {
  margin: 0 0 0.6rem;
  font-weight: 600;
  font-size: 1rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.875rem;
}

.check-pass {
  color: #86efac;
}

.check-fail {
  color: #fca5a5;
}

@media (max-width: 700px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-list {
    flex-wrap: wrap;
  }
}
