:root {
  --bg: #121213;
  --tile: #3a3a3c;
  --green: #538d4e;
  --yellow: #b59f3b;
  --gray: #3a3a3c;
  --key: #818384;
  --text: #fff;
}

* {
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* =======================
   BOARD
======================= */
.board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.row {
  display: flex;
  gap: 6px;
}

.tile {
  width: 42px;
  height: 42px;
  border: 2px solid #565758;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-transform: uppercase;
}

.tile.space {
  margin-right: 10px;
}

.tile.correct {
  background: var(--green);
  border-color: var(--green);
}

.tile.present {
  background: var(--yellow);
  border-color: var(--yellow);
}

.tile.absent {
  background: var(--gray);
  border-color: var(--gray);
}

/* =======================
   KLAVYE
======================= */
.keyboard {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.key {
  min-width: 38px;
  height: 52px;
  padding: 0 6px;
  background: var(--key);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-transform: uppercase;
  user-select: none;
}

.key-wide {
  min-width: 64px;
}

.key:active {
  transform: scale(0.95);
}

/* KLAVYE DURUMLARI (İNATİF YOK!) */
.key.correct {
  background: var(--green);
}

.key.used {
  background: #3a3a3c;
}

/* =======================
   TOP BAR
======================= */
.topbar {
  width: 100%;
  background: #111;
  border-bottom: 1px solid #333;
}

.topbar-inner {
  max-width: 420px;
  height: 52px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

/* Sol boş alan (Wordle'da da var) */
.topbar-left {
  width: 48px;
}

/* LOGO TAM ORTA */
.logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 18px;
}

/* Sağ ikonlar */
.icons {
  margin-left: auto;
  display: flex;
  gap: 6px;
}


.icon-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* =======================
   MODAL
======================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 10;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1a1a1b;
  color: #fff;
  width: 90%;
  max-width: 420px;
  padding: 20px;
  border-radius: 12px;
  z-index: 11;
}

.modal h2 {
  margin-top: 0;
  text-align: center;
}

.close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.hidden {
  display: none;
}

/* =======================
   NASIL OYNANIR
======================= */
.examples {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.ex {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ex .tiles {
  display: flex;
  gap: 6px;
}

.examples .tile {
  width: 32px;
  height: 32px;
}

.ex p {
  margin: 0;
  font-size: 14px;
  opacity: 0.85;
}

/* =======================
   İSTATİSTİK
======================= */
.stats-title {
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.stats-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 8px;
  margin-bottom: 16px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
}

.stat-label {
  font-size: 11px;
  opacity: 0.7;
}

.dist-title {
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.distribution {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dist-row span {
  width: 14px;
  text-align: right;
}

.bar {
  flex: 1;
  height: 22px;
  background: #3a3a3c;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.bar span {
  color: #fff;
}

.stats-bottom {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.countdown-label {
  font-size: 11px;
  opacity: 0.7;
}

.countdown-time {
  font-size: 20px;
  font-weight: 700;
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-btn.x {
  background: #000;
  color: #fff;
}

.share-btn.fb {
  background: #1877f2;
  color: #fff;
}

.share-btn:hover {
  opacity: 0.85;
}
.dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dist-row .try {
  width: 14px;
  text-align: right;
}

/* BAR ALANI */
.bar {
  flex: 1;
  height: 22px;
  background: #3a3a3c;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* SADECE KAZANILAN SATIR */
.bar.win {
  background: #538d4e;
}

.hint {
  margin: 16px 0 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #d7dadc;
}

.hint span {
  background: #1f1f20;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #3a3a3c;
}

.ad-container {
  width: 100%;
  max-width: 420px;
  min-height: 60px;
  margin: 16px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobilde nefes alsın */
@media (max-width: 480px) {
  .ad-container {
    margin-bottom: 16px;
  }
}