body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-image: url("day.png");
  background-size: cover;
  margin: 0;
}

.game-container {
  text-align: center;
  background: rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 10px;
  margin-left: 200px; /* Add this line to make space for the navbar */
  max-width: 90vw;
  position: relative;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .game-container {
    margin-left: 60px;
    padding: 15px 10px;
    width: calc(100% - 80px);
    max-width: none;
    box-sizing: border-box;
  }

  h1 {
    font-size: 24px;
    margin: 10px 0;
  }

  h3 {
    font-size: 18px;
    margin: 8px 0;
  }

  h5 {
    font-size: 16px;
    margin: 5px 0;
  }
}

@media (max-width: 600px) {
  .game-container {
    margin-left: 0;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  body {
    padding-top: 60px;
    height: calc(100vh - 60px);
    background-attachment: fixed;
  }

  .navbar {
    height: 60px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    flex-direction: row;
    z-index: 100;
  }

  .navbar.expanded {
    height: auto;
    width: 100%;
    min-height: auto;
    overflow: visible;
  }

  #navbar-menu {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .navbar.expanded #navbar-menu {
    display: flex;
    position: absolute;
    top: 60px;
    left: 0;
    background-color: #f1f1f1;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  body.dark-mode .navbar.expanded #navbar-menu {
    background-color: #222;
  }

  #guess-button {
    margin-top: 10px;
    width: 100%;
    max-width: 200px;
  }
}

.guess-grid {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.guess-row {
  display: flex;
  justify-content: center;
}

.guess-box {
  width: 50px;
  height: 50px;
  border: 1px solid #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  text-transform: capitalize;
  transition: background-color 0.25s, color 0.25s; /* Reduced transition duration */
}

@media (max-width: 600px) {
  .guess-box {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .guess-grid {
    gap: 5px;
  }
}

.correct {
  background-color: green;
  color: white;
}

.present {
  background-color: yellow;
  color: black;
}

.absent {
  background-color: lightgray;
  color: black;
}

#guess-input {
  width: 200px;
  height: 30px;
  font-size: 18px;
  text-align: center;
  margin: 10px 5px;
}

@media (max-width: 600px) {
  #guess-input {
    width: calc(100% - 60px);
    max-width: 150px;
    font-size: 16px;
  }
}

.guess-distribution {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.guess-bar {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 5px;
}

.guess-label {
  width: 20px;
  text-align: right;
  margin-right: 5px;
}

.guess-count {
  background-color: #787c7e;
  color: white;
  padding: 2px 5px;
  min-width: 20px;
  text-align: right;
}

#show-stats {
  margin-top: 10px;
}

#close-stats {
  margin-top: 20px;
}

@media (max-width: 600px) {
  #guess-button {
    font-size: 16px;
    padding: 8px 16px;
  }
}

.button-container {
  margin-top: 10px;
}

#toggle-container {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0 10px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  background: linear-gradient(45deg, #FFD700, #FFA500);
  border: 2px solid #8B4513;
  transition: 0.4s;
  border-radius: 34px;
  margin-right: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background: linear-gradient(45deg, #4A4A4A, #2A2A2A);
  border-color: #666666;
}

input:checked + .slider:before {
  transform: translateX(26px);
  background-color: #FFD700;
}

.toggle-label {
  font-size: 14px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  overflow: auto;
  padding: 0 10px;
  box-sizing: border-box;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 10px;
  position: relative;
}

@media (max-width: 600px) {
  .modal-content {
    width: 90%;
    margin: 10% auto;
    padding: 15px;
    max-height: 80vh;
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(200, 200, 200, 0.1);
  transition: all 0.2s ease;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
  background-color: rgba(200, 200, 200, 0.3);
}

@media (max-width: 600px) {
  .close {
    width: 44px;
    height: 44px;
    font-size: 32px;
  }
}

body.dark-mode .modal-content {
  background-color: #333;
  color: #fff;
}

body.dark-mode .close {
  color: #fff;
}

body.dark-mode .close:hover,
body.dark-mode .close:focus {
  color: #bbb;
}

body.dark-mode {
  background-color: #333;
  color: #fff;
  background-image: url("night.png");
}

body.dark-mode .game-container {
  background: rgba(0, 0, 0, 0.8);
}

body.dark-mode .navbar {
  background-color: #222;
  box-shadow: 2px 0 5px rgba(255, 255, 255, 0.1);
}

body.dark-mode .navbar a {
  color: #fff;
}

body.dark-mode .navbar a.active,
body.dark-mode .navbar a:hover {
  background-color: #444;
}

body.dark-mode .toggle-label {
  color: #fff;
}

.footer-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

@media (max-width: 600px) {
  .footer-buttons {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .footer-buttons button {
    width: 100%;
    max-width: 200px;
    margin: 0;
  }
}

.danger-button {
  background-color: #ff4136 !important;
}

.danger-button:hover {
  background-color: #ff7066 !important;
}

.stats-container {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 24px;
  font-weight: bold;
}

.navbar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 200px;
    background-color: #f1f1f1;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.3s;
    z-index: 1000;
}

.navbar-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 10px;
}

.navbar-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .navbar {
        width: 60px;
        overflow: hidden;
    }

    .navbar.expanded {
        width: 200px;
        height: auto;
        min-height: 100%;
        overflow: visible;
    }

    .navbar-toggle {
        display: block;
    }

    #navbar-menu {
        display: none;
    }

    .navbar.expanded #navbar-menu {
        display: block;
    }

    #theme-toggle-container {
        display: none;
    }

    .navbar.expanded #theme-toggle-container {
        display: block;
    }

    .game-container {
        margin-left: 60px;
    }
}

.navbar ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.navbar li {
  margin: 5px 0;
}

.navbar a {
  display: block;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 15px 20px;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
}

.navbar a.active {
  background-color: #ddd;
  border-left: 4px solid #2196f3;
}

.navbar a:hover {
  background-color: #ddd;
}

body.dark-mode .navbar {
  background-color: #222;
  box-shadow: 2px 0 5px rgba(255, 255, 255, 0.1);
}

body.dark-mode .navbar-toggle span {
  background-color: #fff;
}

body.dark-mode .navbar a {
  color: #fff;
}

body.dark-mode .navbar a.active {
  background-color: #444;
  border-left: 4px solid #64b5f6;
}

body.dark-mode .navbar a:hover {
  background-color: #444;
}

#theme-toggle-container {
  padding: 20px;
  margin-bottom: 20px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.achievement-item {
  background-color: #f0f0f0;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.achievement-item.unlocked {
  background-color: #e6f7ff;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.achievement-item.locked {
  opacity: 0.5;
}

.achievement-icon img {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.achievement-info h3 {
    margin: 0 0 5px;
    font-size: 1.1em;
}

.achievement-info p {
  margin: 0;
  font-size: 0.9em;
}

body.dark-mode .achievement-item {
  background-color: #444;
  color: #fff;
}

body.dark-mode .achievement-item.unlocked {
  background-color: #1a3f5f;
}

@media (max-width: 800px) {
  .achievements-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .achievement-icon img {
    width: 64px;
    height: 64px;
  }

  .achievement-info h3 {
    font-size: 1em;
  }

  .achievement-info p {
    font-size: 0.8em;
  }
}

/* Sticker Guess Styles */
#sticker-container {
  width: 300px;
  height: 300px;
  margin: 20px auto;
  overflow: hidden;
}

#sticker-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: blur(10px);
  transition: filter 0.5s ease;
}

#next-sticker {
  display: none;
  margin-top: 10px;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.answer-button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #4caf50;
  color: white;
  transition: background-color 0.3s;
}

.answer-button:hover {
  background-color: #45a049;
}

.back-to-beedle-button {
  display: inline-block;
  padding: 10px 20px;
  margin-top: 10px;
  background: linear-gradient(45deg, #FFD700, #FFA500);
  border: 2px solid #8B4513;
  color: #8B4513;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.back-to-beedle-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  background: linear-gradient(45deg, #FFA500, #FFD700);
}

/* Dark mode styles for sticker guess */
body.dark-mode .toggle-label {
  color: #fff;
}

body.dark-mode .answer-button {
  background-color: #2196f3;
  color: white;
}

body.dark-mode .answer-button:hover {
  background-color: #0b7dda;
}

body.dark-mode .back-to-beedle-button {
  background: linear-gradient(45deg, #4A4A4A, #2A2A2A);
  border-color: #666666;
  color: #FFD700;
}

body.dark-mode .back-to-beedle-button:hover {
  background: linear-gradient(45deg, #2A2A2A, #4A4A4A);
}

/* Version number styles */
.version-number {
  font-size: 18px;
  text-align: center;
  margin-top: 15px;
  margin-bottom: 5px;
}

@media (max-width: 600px) {
  .version-number {
    font-size: 14px;
  }
}

/* Stat Guess Mode Styles */
.stat-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
}

.stat-cell {
    flex: 1;
    min-width: 60px;
    height: 40px;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    text-transform: capitalize;
    padding: 5px;
    transition: background-color 0.25s, color 0.25s;
    position: relative;
}

.stat-header {
    font-weight: bold;
    background-color: #f0f0f0;
}

.header-row {
    margin-bottom: 10px;
}

.arrow {
    font-weight: bold;
    font-size: 16px;
    margin-left: 2px;
}

body.dark-mode .stat-header {
    background-color: #444;
}

@media (max-width: 768px) {
    .stat-grid {
        max-width: 100%;
    }

    .stat-cell {
        min-width: 40px;
        font-size: 12px;
        padding: 3px;
    }
}

@media (max-width: 600px) {
    .stat-cell {
        min-width: 30px;
        font-size: 10px;
        padding: 2px;
    }
}

/* Base button styles */
button {
  background: linear-gradient(45deg, #FFD700, #FFA500);
  border: 2px solid #8B4513;
  border-radius: 8px;
  color: #8B4513;
  font-weight: bold;
  padding: 10px 20px;
  margin: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  background: linear-gradient(45deg, #FFA500, #FFD700);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button:disabled {
  background: #cccccc;
  border-color: #999999;
  color: #666666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Special button styles */
.danger-button {
  background: linear-gradient(45deg, #FF4444, #CC0000);
  border-color: #8B0000;
  color: white;
}

.danger-button:hover {
  background: linear-gradient(45deg, #CC0000, #FF4444);
}

/* Dark mode button styles */
body.dark-mode button {
  background: linear-gradient(45deg, #4A4A4A, #2A2A2A);
  border-color: #666666;
  color: #FFD700;
}

body.dark-mode button:hover {
  background: linear-gradient(45deg, #2A2A2A, #4A4A4A);
}

body.dark-mode .danger-button {
  background: linear-gradient(45deg, #8B0000, #660000);
  border-color: #4A0000;
}

body.dark-mode .danger-button:hover {
  background: linear-gradient(45deg, #660000, #8B0000);
}

/* Button container styles */
.button-container, .footer-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

/* Responsive button styles */
@media (max-width: 600px) {
  button {
    padding: 8px 16px;
    font-size: 12px;
  }

  .button-container, .footer-buttons {
    gap: 5px;
  }
}

/* Dark mode styles for toggles and back button */
body.dark-mode .slider {
  background: linear-gradient(45deg, #4A4A4A, #2A2A2A);
  border-color: #666666;
}

body.dark-mode .back-to-beedle-button {
  background: linear-gradient(45deg, #4A4A4A, #2A2A2A);
  border-color: #666666;
  color: #FFD700;
}

body.dark-mode .back-to-beedle-button:hover {
  background: linear-gradient(45deg, #2A2A2A, #4A4A4A);
}
