/* =====================================================================
   Eigenständiges Stylesheet – ersetzt den Tailwind-CDN.
   Enthält nur die im Projekt verwendeten Utility-Klassen + Reset.
   Läuft komplett offline.
   ===================================================================== */

/* ---------- Reset / Preflight ---------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid #e2e8f0; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  line-height: 1.5;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
canvas { display: block; }
ul { list-style: none; margin: 0; padding: 0; }
svg { display: inline-block; }

/* ---------- Layout ---------- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.inline-block { display: inline-block; }
.grid { display: grid; }
.block { display: block; }
.hidden { display: none; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.justify-between { justify-content: space-between; }

.fixed { position: fixed; }
.sticky { position: sticky; }
.relative { position: relative; }
.inset-0 { inset: 0; }
.inset-y-0 { top: 0; bottom: 0; }
.left-0 { left: 0; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.overflow-y-auto { overflow-y: auto; }

/* ---------- Spacing: gap ---------- */
.gap-1   { gap: .25rem; }
.gap-1\.5 { gap: .375rem; }
.gap-2   { gap: .5rem; }
.gap-3   { gap: .75rem; }
.gap-4   { gap: 1rem; }
.gap-8   { gap: 2rem; }

.space-y-1 > * + * { margin-top: .25rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* ---------- Spacing: padding ---------- */
.p-1 { padding: .25rem; }
.p-2 { padding: .5rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-2\.5 { padding-top: .625rem; padding-bottom: .625rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }

/* ---------- Spacing: margin ---------- */
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: .25rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.ml-1 { margin-left: .25rem; }
.ml-auto { margin-left: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.space-y-5 > * + * { margin-top: 1.25rem; }

/* ---------- Sizing ---------- */
.w-6  { width: 1.5rem; }
.w-12 { width: 3rem; }
.w-24 { width: 6rem; }
.w-64 { width: 16rem; }
.w-72 { width: 18rem; }
.w-full { width: 100%; }
.h-6  { height: 1.5rem; }
.h-12 { height: 3rem; }
.min-h-screen { min-height: 100vh; }
.min-h-\[2rem\] { min-height: 2rem; }
.min-h-\[5rem\] { min-height: 5rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-none { max-width: none; }

/* ---------- Typography ---------- */
.text-xs  { font-size: .75rem;  line-height: 1rem; }
.text-sm  { font-size: .875rem; line-height: 1.25rem; }
.text-lg  { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tracking-tight { letter-spacing: -.025em; }
.tracking-wide { letter-spacing: .025em; }
.uppercase { text-transform: uppercase; }
.leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ---------- Colors: text ---------- */
.text-white     { color: #fff; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-red-600   { color: #dc2626; }
.text-blue-100  { color: #dbeafe; }
.text-blue-200  { color: #bfdbfe; }
.text-blue-600  { color: #2563eb; }

/* ---------- Colors: background ---------- */
.bg-white     { background-color: #fff; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-blue-600  { background-color: #2563eb; }
.bg-blue-700  { background-color: #1d4ed8; }
.bg-black\/40 { background-color: rgba(0, 0, 0, .4); }

/* ---------- Borders ---------- */
.border   { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-slate-200    { border-color: #e2e8f0; }
.border-slate-300    { border-color: #cbd5e1; }
.border-slate-700\/60 { border-color: rgba(51, 65, 85, .6); }
.border-blue-600     { border-color: #2563eb; }
.rounded-md  { border-radius: .375rem; }
.rounded-lg  { border-radius: .5rem; }
.rounded-xl  { border-radius: .75rem; }
.rounded-full { border-radius: 9999px; }

/* ---------- Effects / transitions ---------- */
.transition { transition: color .15s, background-color .15s, border-color .15s, opacity .15s, transform .15s; }
.transition-transform { transition: transform .15s; }
.duration-200 { transition-duration: .2s; }

/* ---------- Transforms ---------- */
.-translate-x-full { transform: translateX(-100%); }

/* ---------- Hover states ---------- */
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-700:hover { background-color: #334155; }
.hover\:bg-blue-700:hover  { background-color: #1d4ed8; }
.hover\:border-blue-400:hover { border-color: #60a5fa; }
.hover\:underline:hover { text-decoration: underline; }

/* ---------- Responsive: sm ≥640px ---------- */
@media (min-width: 640px) {
  .sm\:p-3 { padding: .75rem; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:gap-2 { gap: .5rem; }
}

/* ---------- Responsive: md ≥768px ---------- */
@media (min-width: 768px) {
  .md\:translate-x-0 { transform: translateX(0); }
  .md\:ml-64 { margin-left: 16rem; }
  .md\:hidden { display: none; }
}

/* ---------- Responsive: lg ≥1024px ---------- */
@media (min-width: 1024px) {
  .lg\:flex-row { flex-direction: row; }
}

/* ---------- Zusätzliche Utilities (neue Tools) ---------- */
.h-2 { height: .5rem; }
.min-h-\[10rem\] { min-height: 10rem; }
.resize-y { resize: vertical; }
.overflow-auto { overflow: auto; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.break-words { overflow-wrap: break-word; word-break: break-word; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.accent-blue-600 { accent-color: #2563eb; }
.text-green-600 { color: #16a34a; }
.hover\:bg-slate-200:hover { background-color: #e2e8f0; }
.hover\:text-red-600:hover { color: #dc2626; }

/* =====================================================================
   Komponenten-spezifische Styles
   ===================================================================== */

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem 0.425rem;
  border-radius: 0.5rem;
  font-size: 0.925rem;
  color: rgb(203 213 225);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.nav-item:hover { background: rgb(30 41 59); color: #fff; }
.nav-item.active { background: rgb(37 99 235); color: #fff; }
.nav-item .icon { width: 1.25rem; text-align: center; }

.nav-separator {
  height: 1px;
  margin: 0.6rem 0.85rem;
  background: rgba(148, 163, 184, 0.25);
}

.lang-btn { color: rgb(148 163 184); }
.lang-btn.active { background: rgb(37 99 235); color: #fff; }

/* Vier Gewinnt */
.c4-cell {
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.05);
  transition: background-color .15s;
}
.c4-cell.p1 { background: #ef4444; }
.c4-cell.p2 { background: #facc15; }

/* Glücksrad */
.wheel-wrap { position: relative; width: 320px; max-width: 90vw; }
#wheelCanvas { transition: transform 4s cubic-bezier(.17,.67,.12,1); }
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid #1e293b;
  z-index: 5;
}

.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Größentabelle */
.size-table { width: 100%; border-collapse: collapse; font-size: .925rem; }
.size-table th,
.size-table td { padding: .6rem .85rem; text-align: left; }
.size-table thead th { background: #2563eb; color: #fff; font-weight: 600; }
.size-table tbody tr { border-top: 1px solid #e2e8f0; }
.size-table tbody tr:nth-child(even) { background: #f8fafc; }
.size-table tbody tr:hover { background: #eff6ff; }

/* Animiertes Würfeln */
.dice-rolling { animation: diceShake .25s linear infinite; }
@keyframes diceShake {
  0%   { transform: rotate(-12deg) translateY(0); }
  50%  { transform: rotate(12deg)  translateY(-5px); }
  100% { transform: rotate(-12deg) translateY(0); }
}
button:disabled { opacity: .6; cursor: not-allowed; }
footer.mt-10 {
  padding-top: 0.5em;
}

footer section {
  font-size: .5em;
}

section.border-slate-200 {
  border: none!important;
}