/* Yüzbir – ortak tasarım dili: koyu çuha yeşili masa, fildişi taşlar, altın vurgu. */

:root {
  --bg: #06100c;
  --bg-2: #0a1712;
  --felt: #0d2219;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-solid: #0f1e18;
  --surface-raised: #13251d;
  --line: rgba(227, 194, 125, 0.16);
  --line-soft: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(227, 194, 125, 0.32);

  --text: #f4eddd;
  --muted: #a3b5aa;
  --dim: #6d8278;

  --gold: #e6c47f;
  --gold-2: #c99f55;
  --gold-3: #8e6c32;
  --gold-glow: rgba(230, 196, 127, 0.28);

  --ivory: #f8f1e2;
  --ivory-2: #e9dec6;
  --ivory-edge: #c6b693;

  --t-red: #d4423a;
  --t-blue: #2a73da;
  --t-yellow: #dd9c1c;
  --t-black: #1c1f24;

  --good: #58d197;
  --good-bg: rgba(88, 209, 151, 0.12);
  --bad: #f07a6a;
  --bad-bg: rgba(240, 122, 106, 0.12);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 40px 80px -24px rgba(0, 0, 0, 0.7), 0 6px 18px rgba(0, 0, 0, 0.35);

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 85% -10%, rgba(46, 120, 86, 0.28), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(25, 84, 60, 0.35), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(230, 196, 127, 0.07), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* İnce çuha dokusu */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: var(--gold); color: #1a1408; }

.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

.gold-text {
  background: linear-gradient(120deg, #f5dfaa 0%, var(--gold) 35%, var(--gold-2) 70%, #f1d08e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Butonlar ------------------------------------------------------- */

.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.25s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { border-color: var(--line-strong); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-gold {
  --btn-fg: #1d1508;
  border-color: transparent;
  background: linear-gradient(180deg, #f2d595 0%, var(--gold) 45%, var(--gold-2) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 -2px 0 rgba(0, 0, 0, 0.12) inset, 0 10px 30px -8px var(--gold-glow);
}
.btn-gold:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 -2px 0 rgba(0, 0, 0, 0.12) inset, 0 14px 40px -6px rgba(230, 196, 127, 0.45); border-color: transparent; }

.btn-ghost { --btn-bg: transparent; border-color: transparent; }
.btn-ghost:hover { --btn-bg: var(--surface); border-color: var(--line-soft); }
.btn-outline { --btn-bg: transparent; border-color: var(--line); }
.btn-danger { --btn-bg: var(--bad-bg); --btn-fg: var(--bad); border-color: rgba(240, 122, 106, 0.25); }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.btn-block { width: 100%; }

/* --- Okey taşı ------------------------------------------------------ */

.tile {
  --w: 52px;
  position: relative;
  width: var(--w);
  height: calc(var(--w) * 1.36);
  border-radius: calc(var(--w) * 0.17);
  background: linear-gradient(170deg, #fffaf0 0%, var(--ivory) 45%, var(--ivory-2) 100%);
  box-shadow:
    0 1px 0 #fff inset,
    0 calc(var(--w) * -0.07) 0 var(--ivory-edge) inset,
    0 calc(var(--w) * 0.03) 0 #a99872,
    0 calc(var(--w) * 0.25) calc(var(--w) * 0.45) -4px rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--w) * 0.56);
  line-height: 1;
  color: var(--t-black);
  padding-bottom: calc(var(--w) * 0.22);
  flex: none;
}
.tile::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) * 0.2);
  width: calc(var(--w) * 0.16);
  height: calc(var(--w) * 0.16);
  margin-left: calc(var(--w) * -0.08);
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.tile.red { color: var(--t-red); }
.tile.blue { color: var(--t-blue); }
.tile.yellow { color: var(--t-yellow); }
.tile.black { color: var(--t-black); }
.tile.joker::after { display: none; }
.tile.joker { padding-bottom: 0; font-size: calc(var(--w) * 0.5); }

/* --- Form ----------------------------------------------------------- */

.field { display: grid; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.25);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-size: 16px;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(230, 196, 127, 0.12); background: rgba(0, 0, 0, 0.35); }

/* --- Logo ----------------------------------------------------------- */

.logo { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; }
.logo-mark {
  position: relative;
  width: 34px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(170deg, #fffaf0, var(--ivory-2));
  box-shadow: 0 1px 0 #fff inset, 0 -3px 0 var(--ivory-edge) inset, 0 6px 16px -4px rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: -0.04em;
  color: var(--t-red);
  padding-bottom: 7px;
  transform: rotate(-6deg);
}
.logo-mark::after {
  content: '';
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--t-red);
}
.logo-word { font-family: var(--font-display); font-size: 23px; font-weight: 700; letter-spacing: -0.03em; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
