:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f1;
  color: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f5f1;
}

.app {
  width: 100vw;
  height: 100vh;
  background: #fdfcf9;
  border-radius: 0;
  padding: 12px 14px;
  border: 2px solid #111;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #111;
}

.title-block h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.title-block p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.main-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

.play-area-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.hint {
  font-size: 0.75rem;
  color: #4b5563;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.play-area {
  position: relative;
  background: #fdfdfd;
  border-radius: 8px;
  border: 1.5px solid #111;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  cursor: crosshair;
  user-select: none;
}

.play-area::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed #9ca3af;
  pointer-events: none;
}

.target {
  position: absolute;
  width: 250px;
  height: 250px;
  object-fit: contain;
  pointer-events: auto;
  cursor: crosshair;
  image-rendering: auto;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.45));
  transition: transform 0.05s;
  z-index: 2;
}

.target:active {
  transform: scale(0.96);
}

.hit-target {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.hit-effect {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 3;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.7));
}

.overlay-message {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  z-index: 4;
  background: rgba(253, 252, 249, 0.96);
  backdrop-filter: blur(3px);
  border-radius: 8px;
  border: 1.5px solid #111;
}

.overlay-message-inner {
  background: #fdfcf9;
  border-radius: 6px;
  padding: 18px 18px 14px;
  border: 1px solid #111;
  max-width: 520px;
  width: 100%;
  text-align: left;
  box-shadow: 6px 6px 0 #111;
}

.overlay-message-inner h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.overlay-message-inner p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: #374151;
}

.overlay-message-inner .instructions-text {
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  color: #111827;
}

.overlay-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn {
  border-radius: 999px;
  border: 1px solid #111;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  background: #111827;
  color: #fefce8;
  box-shadow: 4px 4px 0 #111;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.1s ease, color 0.1s ease;
  white-space: nowrap;
}

.btn:hover {
  background: #fefce8;
  color: #111827;
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 #111;
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 #111;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: 2px 2px 0 #9ca3af;
  background: #e5e7eb;
  color: #6b7280;
  transform: none;
}

.btn-small {
  padding: 5px 11px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  box-shadow: 2px 2px 0 #111;
  background: #f9fafb;
  color: #111827;
  text-transform: uppercase;
}

.btn-small:hover {
  background: #111827;
  color: #f9fafb;
}

.stats-panel {
  background: #fdfcf9;
  border-radius: 8px;
  border: 1.5px solid #111;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  box-shadow: 6px 6px 0 #111;
}

.panel-header-en {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-header-en h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-header-en p {
  margin: 0;
  font-size: 0.78rem;
  color: #374151;
}

.stats-summary {
  font-size: 0.78rem;
  color: #111827;
  margin-top: 4px;
}

.stats-summary span {
  color: #4b5563;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #111;
  background: #fefce8;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  align-self: flex-start;
}

.timer-block {
  margin-top: 2px;
  border-top: 1px solid #111;
  padding-top: 6px;
}

.timer-display {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.3rem;
  font-weight: 600;
  color: #111827;
}

.timer-label {
  font-size: 0.7rem;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: -2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  font-size: 0.78rem;
}

.stat-card {
  padding: 6px 7px;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
}

.stat-label {
  font-size: 0.7rem;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  font-size: 0.96rem;
  font-weight: 600;
}

.stat-value.highlight {
  color: #16a34a;
}

.stat-sub {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 2px;
}

.session-log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 6px;
  border: 1px dashed #9ca3af;
  padding: 6px 9px;
  font-size: 0.72rem;
  background: #f9fafb;
}

.session-log-title {
  font-size: 0.75rem;
  color: #4b5563;
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.session-log-entry {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.session-log-entry:last-child {
  border-bottom: none;
}

.session-log-entry span {
  white-space: nowrap;
}

.session-empty {
  color: #9ca3af;
  font-style: italic;
  padding: 2px 0;
}

/* Dark mode – brutalist, almost pure black */
body.theme-dark {
  background: #000;
  color: #f9fafb;
}

body.theme-dark .app {
  background: #000;
  border-color: #fff;
}

body.theme-dark .app-header {
  border-bottom-color: #fff;
}

body.theme-dark .title-block h1 {
  color: #f9fafb;
}

body.theme-dark .title-block p {
  color: #9ca3af;
}

body.theme-dark .main-layout {
  color: #f9fafb;
}

body.theme-dark .hint span {
  color: #9ca3af;
}

body.theme-dark .play-area {
  background: #000;
  border-color: #fff;
}

body.theme-dark .play-area::before {
  border-color: #4b5563;
}

body.theme-dark .stats-panel {
  background: #000;
  border-color: #fff;
  box-shadow: 6px 6px 0 #111;
}

body.theme-dark .panel-header-en p {
  color: #9ca3af;
}

body.theme-dark .stats-summary {
  color: #f9fafb;
}

body.theme-dark .stats-summary span {
  color: #9ca3af;
}

body.theme-dark .badge {
  background: #000;
  color: #f9fafb;
  border-color: #f9fafb;
}

body.theme-dark .timer-block {
  border-top-color: #4b5563;
}

body.theme-dark .timer-display {
  color: #f9fafb;
}

body.theme-dark .timer-label {
  color: #9ca3af;
}

body.theme-dark .stat-card {
  background: #020617;
  border-color: #4b5563;
}

body.theme-dark .stat-label {
  color: #9ca3af;
}

body.theme-dark .stat-value {
  color: #f9fafb;
}

body.theme-dark .stat-value.highlight {
  color: #22c55e;
}

body.theme-dark .stat-sub {
  color: #6b7280;
}

body.theme-dark .session-log {
  background: #020617;
  border-color: #4b5563;
}

body.theme-dark .session-log-title {
  color: #9ca3af;
}

body.theme-dark .session-log-entry {
  border-bottom-color: #111827;
}

body.theme-dark .session-empty {
  color: #6b7280;
}

body.theme-dark .overlay-message {
  background: rgba(0, 0, 0, 0.96);
  border-color: #fff;
}

body.theme-dark .overlay-message-inner {
  background: #000;
  color: #f9fafb;
  border-color: #fff;
  box-shadow: 6px 6px 0 #111;
}

body.theme-dark .overlay-message-inner p {
  color: #d1d5db;
}

body.theme-dark .overlay-message-inner .instructions-text {
  background: #020617;
  color: #f9fafb;
  border-color: #4b5563;
}

body.theme-dark .btn {
  background: #f9fafb;
  color: #000;
  border-color: #f9fafb;
  box-shadow: 4px 4px 0 #000;
}

body.theme-dark .btn:hover {
  background: #000;
  color: #f9fafb;
  border-color: #f9fafb;
}

body.theme-dark .btn[disabled] {
  background: #111827;
  color: #6b7280;
  box-shadow: 2px 2px 0 #000;
}

body.theme-dark .btn-small {
  background: #000;
  color: #f9fafb;
  border-color: #f9fafb;
  box-shadow: 2px 2px 0 #000;
}

body.theme-dark .btn-small:hover {
  background: #f9fafb;
  color: #000;
}
/* Countdown-Overlay im Spielfeld */
.overlay-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.overlay-countdown-number {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

