@font-face {
  font-family: Poxboto;
  src: url(Fonts/Poxboto-Regular.otf);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poxboto", "Helvetica", sans-serif;
  background-color: #f5f1e8;
  color: #333;
  cursor: url(img/background/cursors/Cursor.svg),
    url(img/background/Pointer.svg), pointer;
  scrollbar-color: #c73329;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  color: #c73329;
}

::-webkit-scrollbar-thumb {
  background-color: #c73329;
  border-radius: 0px;
}

body a:hover {
  cursor: url("img/background/Pointer.svg"), pointer;
}

/* Header */
.header {
  background: linear-gradient(135deg, #c73329 0%, #a82820 100%);
  padding: 20px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.logo {
  background: white;
}

.logo h1 {
  font-size: 40px;
  font-weight: bold;
  color: #c73329;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.header-buttons {
  display: none;
}

.header-btn {
  background: white;
  color: #c73329;
  border: 2px solid white;
  padding: 10px 20px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: url(img/background/Pointer.svg), pointer;
  transition: all 0.3s;
  font-size: 20px;
  letter-spacing: 1px;
}

.header-btn:hover {
  background: #aa3726;
  color: white;
  border-color: #aa3726;
}

/* Navigation */
.nav {
  background: #aa3726;
  padding: 0;
}

.nav-content {
  max-width: 1200px;
  margin: 0;
  display: flex;
  gap: 0;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 15px 25px;
  display: block;
  text-transform: uppercase;
  font-size: 19px;
  font-weight: bold;
  letter-spacing: 1px;
  border-right: 1px solid #aa3726;
  transition: background 0.3s;
}

.nav-link:hover,
.nav-link.active {
  background: #ae4434;
}

/* Main Content */
.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

/* Game Container */
.game-section {
  background: white;
  border: 3px solid #1a1a1a;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
}

.game-header {
  background: #1a1a1a;
  color: white;
  padding: 20px;
  border-bottom: 3px solid #c73329;
}

.game-header h2 {
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.game-content {
  padding: 30px;
}

.hangman-drawing {
  text-align: center;
  margin: 20px 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f1e8;
  border: 2px solid #ddd;
  padding: 20px;
}

.hangman-svg {
  max-width: 200px;
  height: 250px;
}

.status-bar {
  background: #f5f1e8;
  border: 2px solid #c73329;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
}

.status-bar .tries {
  font-size: 30px;
  font-weight: bold;
  color: #c73329;
}

.word-display {
  font-size: 56px;
  letter-spacing: 20px;
  margin: 30px 0;
  text-align: center;
  color: #1a1a1a;
  font-weight: bold;
  font-family: "Courier New", monospace;
  white-space: nowrap; /* Add this */
  overflow-x: auto; /* Add this for very long words */
}

.guessed-letters {
  margin: 20px 0;
  padding: 15px;
  background: #f5f1e8;
  border: 2px solid #ddd;
}

.guessed-letters h3 {
  margin-bottom: 10px;
  color: #c73329;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.guessed-letters span {
  display: inline-block;
  margin: 5px;
  padding: 8px 12px;
  background: white;
  border: 2px solid #1a1a1a;
  font-weight: bold;
  font-size: 20px;
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.key {
  padding: 15px;
  font-size: 24px;
  font-weight: bold;
  border: 3px solid #1a1a1a;
  background: white;
  color: #1a1a1a;
  cursor: url(img/background/Pointer.svg), pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.key:hover:not(:disabled) {
  background: #c73329;
  color: white;
  border-color: #c73329;
  transform: translateY(-2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.key:disabled {
  background: #ddd;
  cursor: not-allowed;
  opacity: 0.5;
  border-color: #999;
}

.key.correct {
  background: #2d8f3f;
  color: white;
  border-color: #2d8f3f;
}

.key.wrong {
  background: #c73329;
  color: white;
  border-color: #c73329;
}

.message {
  font-size: 32px;
  font-weight: bold;
  margin: 20px 0;
  padding: 20px;
  text-align: center;
  border: 3px solid;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.message.win {
  background: #d4f4dd;
  color: #1a5a28;
  border-color: #2d8f3f;
}

.message.lose {
  background: #ffd6d6;
  color: #8b1c1c;
  border-color: #c73329;
}

.play-again {
  width: 100%;
  padding: 18px;
  font-size: 24px;
  font-weight: bold;
  border: 3px solid #1a1a1a;
  background: #2d8f3f;
  color: white;
  cursor: url(img/background/Pointer.svg), pointer;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s;
}

.play-again:hover {
  background: #246e32;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-box {
  background: white;
  border: 3px solid #1a1a1a;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  background: #c73329;
  color: white;
  padding: 15px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 20px;
}

.sidebar-content {
  padding: 20px;
}

.sidebar-item {
  padding: 12px 0;
  border-bottom: 1px solid #ddd;
  font-size: 18px;
  line-height: 1.4;
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-item a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: bold;
}

.sidebar-item a:hover {
  color: #c73329;
}

@media (max-width: 968px) {
  .container {
    grid-template-columns: 1fr;
  }

  .word-display {
    font-size: 48px;
    letter-spacing: 15px;
  }

  .nav-content {
    flex-wrap: wrap;
  }

  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .game-content {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .word-display {
    font-size: 32px; /* Start even smaller on phones */
    letter-spacing: 10px;
    margin: 20px 0;
  }

  .keyboard {
    grid-template-columns: repeat(7, 1fr);
  }

  .key {
    padding: 12px 8px;
    font-size: 16px;
  }

  .game-content {
    padding: 15px;
  }

  .hangman-drawing {
    min-height: 200px;
  }
}

@media (max-width: 400px) {
  .word-display {
    font-size: 24px;
    letter-spacing: 6px;
  }

  .key {
    padding: 10px 6px;
    font-size: 14px;
  }
}
