body {
  background: #273238;
  font-family: "Special Elite", system-ui;
  font-weight: 400;
  font-style: normal;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 1.0s ease-in-out; /* Slower, smoother transition */
  color: #ddd;
}



.game-container {
  background: #1c252a;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
  width: 90%;
  max-width: 800px;
  padding: 20px;
  margin: 20px auto;
  position: relative;
  overflow: hidden;
}

header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 2px solid #455a64;
  padding-bottom: 15px;
  font-family: "Sedgwick Ave", cursive;
  font-weight: 400;
  font-style: normal;
}

.detective-portrait {
  flex: 0 0 100px;
  height: 100px;
  background: #455a64;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  border: 3px solid #78909c;
  overflow: hidden;
  position: relative;
}

.detective-img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  border-radius: 50%;
}

/* Remove the cat silhouette styles since we're using an image now */
.cat-silhouette {
  display: none;
}

.game-title {
  flex: 1;
}

h1 {
  margin: 0;
  color: #ff9800;
  font-size: 24px;
}

.subtitle {
  margin: 5px 0 0;
  color: #b0bec5;
  font-size: 14px;
  font-style: italic;
}

.paw-print {
  font-size: 32px;
  margin-left: 15px;
  color: #ff9800;
}

.case-file {
  background: #263238;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #455a64;
}

.attempts-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

#reset-button {
  background: #546e7a;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#reset-button:hover {
  background: #607d8b;
}

.clue-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.clue-category {
  background: #37474f;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

h3 {
  margin-top: 0;
  color: #90caf9;
  font-size: 18px;
  border-bottom: 1px solid #455a64;
  padding-bottom: 5px;
}

select {
  width: 100%;
  padding: 8px;
  background: #455a64;
  border: 1px solid #546e7a;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
}

#submit-guess {
  grid-column: 1 / -1;
  background: #ff9800;
  color: #263238;
  border: none;
  padding: 10px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

#submit-guess:hover {
  background: #ffa726;
}

.notepad {
  position: relative;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
  overflow: hidden;
  margin-bottom: 20px;
  background-color: transparent;
  width: 95%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.notepad h3 {
  background-color: rgba(38, 50, 56, 0.8);
  padding: 10px 15px;
  margin: 0;
  color: #90caf9;
  font-size: 18px;
  border-bottom: 2px solid #455a64;
  position: relative;
  z-index: 2;
}

.feedback-area {
  background-image: url('images/notebook.png');
  background-size: 140% 120%;  /* Changed to stretch both horizontally and vertically */
  background-position: center;
  border-radius: 0;
  padding: 15px 20px;
  min-height: 150px;
  font-family: 'Courier New', monospace;
  white-space: pre-line;
  color: #171717e9;
  font-weight: 700;  /* Changed from 100 to 700 for much thicker text */
  font-size: 16px;   /* Explicitly set font size */
  line-height: 1.7;
  text-shadow: 0.2px 0.2px 0px rgba(0,0,0,0.3);  /* Subtle shadow to improve legibility */
  position: relative;
  letter-spacing: 0.5px;  /* Slightly increase letter spacing for clarity */
}

.feedback-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  z-index: 0;
}

.feedback-area * {
  position: relative;
  z-index: 1;
}

/* Update colors for better contrast against notebook background */
.feedback-area .correct {
  color: #006400;  /* Darker green */
  font-weight: 900;
}

.feedback-area .wrong {
  color: #8B0000;  /* Darker red */
  font-weight: 900;
}

.feedback-area .partial {
  color: #B8860B;  /* Darker gold/orange */
  font-weight: 900;
}

.guess-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guess-item {
  background: #37474f;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
}

.correct {
  color: #66bb6a;
}

.wrong {
  color: #ef5350;
}

.partial {
  color: #ffee58;
}

.answer-container {
  background: #37474f;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  text-align: center;
  display: none;
}

.answer-revealed {
  color: #ff9800;
  font-size: 18px;
  font-weight: bold;
}

.clue-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.position-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.position-selector label {
  flex: 0 0 auto;
  font-size: 14px;
  color: #b0bec5;
}

.position-selector select {
  flex: 1;
  padding: 5px;
  font-size: 14px;
  background: #37474f;
}

/* Game explanation section - improved styling */
.game-explanation {
  background: #37474f;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border-left: 4px solid #ff9800;
  display: flex;
  align-items: flex-start;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.game-explanation::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100px;
  background: linear-gradient(to left, rgba(255, 152, 0, 0.1), transparent);
  pointer-events: none;
}

.game-explanation i {
  color: #ff9800;
  font-size: 24px;
  margin-right: 15px;
  flex-shrink: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.game-explanation p {
  margin: 0;
  line-height: 1.5;
  color: #e0e0e0;
  font-size: 15px;
}

@media (max-width: 769px) {
  .clue-selection {
    grid-template-columns: 1fr;
  }
  
  header {
    flex-direction: column;
    text-align: center;
  }
  
  .detective-portrait {
    width: 80px;
    height: 80px;
  }
  
  .detective-portrait {
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .paw-print {
    margin-left: 0;
    margin-top: 10px;
  }
  
  .position-selector {
    flex-direction: column;
    align-items: flex-start;
  }
}
