:root {
  --bg-start: #f4f7ff;
  --bg-end: #dfe8ff;
  --card-bg: #ffffff;
  --main-text: #202331;
  --primary: #4866ff;
  --primary-dark: #2f4df0;
  --hint-bg: #f3f6ff;
  --keyboard-bg: #edf1ff;
  --keyboard-hover: #dbe3ff;
  --letter-border: #202331;
}

body.theme-halloween {
  --bg-start: #1a0f24;
  --bg-end: #3b174f;
  --card-bg: #25152f;
  --main-text: #fff1d6;
  --primary: #ff8c1a;
  --primary-dark: #e86f00;
  --hint-bg: #3a2148;
  --keyboard-bg: #4a2b5c;
  --keyboard-hover: #613875;
  --letter-border: #ff8c1a;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--main-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}



.game-wrapper {
  width: 100%;
  max-width: 1000px;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  margin: 0;
  font-size: 42px;
}

header p {
  margin-top: 8px;
  color: #666;
}

.game-card {
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
  padding: 28px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
}

.left-panel,
.right-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hangman-box {
  width: 280px;
  height: 300px;
  border-radius: 20px;
  background: #f7f8fc;
  border: 2px dashed #ccd5ee;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 18px;
  white-space: pre;
  font-family: monospace;
}

#newGameBtn {
  border: none;
  background: var(--primary);
  color: white;
  padding: 14px 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
}

#newGameBtn:hover {
  background: var(--primary-dark);
}

.hint-box {
  width: 100%;
  background: #f3f6ff;
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 28px;
}

.hint-box span {
  font-size: 13px;
  color: #4866ff;
  font-weight: bold;
}

.hint-box p {
  margin: 8px 0 0;
  font-size: 18px;
}

.word-display {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 18px;
}

.letter-box {
  width: 42px;
  height: 52px;
  border-bottom: 4px solid var(--letter-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  text-transform: uppercase;
}

.wrong-text {
  margin: 8px 0 20px;
  color: #666;
}

.keyboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.keyboard button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: var(--keyboard-bg);
  color: #202331;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.keyboard button:hover {
  background: var(--keyboard-hover);
}

.keyboard button:disabled {
  background: #ddd;
  color: #999;
  cursor: not-allowed;
}

.message {
  min-height: 32px;
  margin-top: 20px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}

.message.win {
  color: #20a35b;
}

.message.lose {
  color: #e53935;
}

@media (max-width: 800px) {
  .game-card {
    grid-template-columns: 1fr;
  }

  header h1 {
    font-size: 32px;
  }

  .hangman-box {
    width: 100%;
    max-width: 280px;
  }
}
.hangman-stage {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.hangman-image {
  width: 100%;
  height: 100%;

  object-fit: contain;
  display: none;
}


.game-menu {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.game-menu label {
  font-weight: bold;
}

.game-menu select {
  border: 2px solid var(--primary);
  background: var(--card-bg);
  color: var(--main-text);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
}

.top-menu {
  margin-top: 16px;
  position: relative;
  display: flex;
  justify-content: center;
}

.menu-toggle-btn,
#menuRestartBtn {
  border: none;
  background: var(--primary);
  color: white;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: bold;
}

.menu-panel {
  position: absolute;
  top: 52px;
  width: 260px;
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: 20px;
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 16px 35px rgba(0,0,0,0.18);
  z-index: 20;
}

.menu-panel.active {
  display: flex;
}

.menu-panel label {
  font-weight: bold;
}

.menu-panel select {
  border: 2px solid var(--primary);
  background: var(--card-bg);
  color: var(--main-text);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
}

@media (max-width: 800px) {
  .menu-panel {
    left: 50%;
    transform: translateX(-50%);
  }
}
body.menu-open .game-card {
  pointer-events: none;
  filter: blur(2px);
}
.site-logo,
.game-logo,
.header-logo {
  width: 90px;
  height: 90px;

  border-radius: 24px;

  background: rgba(255,255,255,0.75);

  backdrop-filter: blur(8px);

  border: 1px solid rgba(255,255,255,0.45);

  box-shadow:
    0 10px 26px rgba(0,0,0,0.08);

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

.site-logo img,
.game-logo img,
.header-logo img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}
.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 2px solid var(--primary);
  color: var(--main-text);
  font-weight: bold;
}

.menu-stats {
  background: var(--hint-bg);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
}

.menu-stats p {
  margin: 4px 0;
}

.game-over-panel {
  position: fixed;
  inset: 0;
  background: rgba(61, 36, 52, 0.35);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 18px;
}

.game-over-panel.active {
  display: flex;
}

.game-over-card {
  width: min(420px, 100%);
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: 28px;
  padding: 26px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,0.18);
}

.game-over-card h2 {
  margin-top: 0;
  color: var(--main-text);
}

.game-over-card p {
  font-size: 18px;
  font-weight: bold;
  color: var(--main-text);
}

.game-over-card label {
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
  font-weight: bold;
}

.game-over-card select {
  width: 100%;
  border: 2px solid var(--primary);
  background: var(--card-bg);
  color: var(--main-text);
  padding: 12px 14px;
  border-radius: 14px;
}

.game-over-card button {
  margin-top: 16px;
  width: 100%;
  border: none;
  background: var(--primary);
  color: white;
  padding: 13px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: bold;
}
.inline-ad {
  width: 220px;
  height: 90px;
  max-width: 100%;
  margin: 8px auto 0;
  border-radius: 16px;
  border: 2px dashed var(--primary);
  background-color: var(--hint-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--main-text);
  display: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: bold;
  overflow: hidden;
}

.menu-panel .inline-ad,
.game-over-card .inline-ad {
  display: flex;
}

.end-inline-ad {
  width: 300px;
  height: 120px;
}
/* ===== Adam Asmaca Görsel Alanı ===== */

.hangman-stage {
    width: 320px;
    height: 320px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto;
}

.hangman-stage img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    image-rendering: auto;
}
.game-over-image-box {
  width: 220px;
  height: 220px;
  margin: 0 auto 14px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.game-over-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}