/* Base styles (dark mode by default) */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #121212;
  color: #ffffff;
  transition: background 0.3s, color 0.3s;
}

.app {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand .logo svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
  margin-right: 10px;
}

/* Button */
.btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #444;
  color: #fff;
  font-size: 14px;
  transition: background 0.2s;
}
.btn:hover {
  background: #666;
}

/* Input */
.input-area {
  position: relative;
  margin-bottom: 20px;
}

#guessBox {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #444;
  border-radius: 6px;
  outline: none;
  background: #1e1e1e;
  color: #fff;
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1e1e1e;
  border: 1px solid #444;
  border-top: none;
  display: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
}

.dropdown-option {
  padding: 10px;
  cursor: pointer;
}
.dropdown-option:hover {
  background: #333;
}

/* Dino List */
.dino-list ul {
  list-style: none;
  padding: 0;
}
.dino-list li {
  padding: 5px 0;
  border-bottom: 1px solid #333;
}

/* Light mode */
body.light-mode {
  background: #ffffff;
  color: #000000;
}

body.light-mode #guessBox {
  background: #f5f5f5;
  color: #000;
  border: 1px solid #ccc;
}

body.light-mode .dropdown {
  background: #fff;
  border: 1px solid #ccc;
}

body.light-mode .dropdown-option:hover {
  background: #eee;
}

body.light-mode .btn {
  background: #ddd;
  color: #000;
}
body.light-mode .btn:hover {
  background: #bbb;
}
.input-area {
  position: relative;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

#guessBox {
  flex: 1;
}

#submitGuess {
  flex-shrink: 0;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* Row grid */
.answer-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr; /* Name wider */
  gap: 10px;
  align-items: stretch;
}

/* Header row */
.answer-header {
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  padding: 5px 0;
  color: #ffffff; /* default dark mode text */
}

/* Boxes (dark mode default) */
.answer-box {
  background: #2e2e2e;
  color: #ffffff;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Light mode adjustments */
body.light-mode .answer-box {
  background: #dcdcdc;
  color: #000;
}

/* Dark mode boxes */
body:not(.light-mode) .answer-box {
  background: #2e2e2e;
  color: #fff;
}

/* Correct guess highlight */
.answer-box.correct {
  background-color: #4CAF50 !important;
  color: #fff !important;
}

.win-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

body.light-mode .win-popup {
  background: rgba(255, 255, 255, 0.6);
}

.win-content {
  background: #2e2e2e;
  padding: 20px;
  border-radius: 10px;
  color: #fff;
  text-align: center;
  max-width: 300px;
}

body.light-mode .win-content {
  background: #fff;
  color: #000;
}