@import url("https://fonts.googleapis.com/css2?family=Amiri&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #800020;
  --secondary-color: #1a1a1a;
  --accent-color: #d4af37;
  --bg-color: #0d0d0d;
  --card-bg: #1f1f1f;
  --text-color: #f0f0f0;
}

body {
  font-family: "Amiri", serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  background-image: url("/api/placeholder/1200/800");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding: 30px 0;
  border-bottom: 2px solid var(--accent-color);
  position: relative;
}

h1 {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.clock {
  font-size: 2rem;
  color: var(--accent-color);
  animation: pulse 2s infinite;
  margin: 20px 0;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.story {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  border-left: 4px solid var(--accent-color);
  font-size: 1.1rem;
}

.clues {
  background-color: rgba(128, 0, 32, 0.3);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 30px;
  border-left: 4px solid var(--primary-color);
}

.suspects-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.suspect-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.suspect-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.suspect-header {
  background-color: var(--secondary-color);
  color: var(--accent-color);
  padding: 15px;
  text-align: center;
  font-size: 1.5rem;
  border-bottom: 2px solid var(--accent-color);
}

.suspect-image {
  width: 100%;
  height: 180px;
  background-color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  background-image: url("/api/placeholder/300/180");
  background-size: cover;
  background-position: center;
  position: relative;
}

.suspect-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.suspect-content {
  padding: 15px;
  flex-grow: 1;
}

.statement {
  margin-top: 10px;
  font-style: italic;
  border-right: 3px solid var(--accent-color);
  padding-right: 10px;
}

.suspect-footer {
  display: flex;
  padding: 10px;
  justify-content: space-around;
  background-color: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.suspect-btn {
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Amiri", serif;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.accuse-btn {
  background-color: var(--primary-color);
  color: white;
}

.accuse-btn:hover {
  background-color: #a00020;
}

.search-btn {
  background-color: var(--accent-color);
  color: black;
}

.search-btn:hover {
  background-color: #e5c667;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
}

.overlay.active {
  display: flex;
  opacity: 1;
}

.result-box {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 600px;
  width: 90%;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.3s;
  border: 2px solid var(--accent-color);
}

.overlay.active .result-box {
  transform: scale(1);
}

.result-title {
  color: var(--accent-color);
  margin-bottom: 20px;
  font-size: 2rem;
}

.result-content {
  margin-bottom: 20px;
  font-size: 1.2rem;
  line-height: 1.8;
}

.result-btn {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: black;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Amiri", serif;
  font-size: 1.1rem;
  margin-top: 20px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

.evidence-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: var(--primary-color);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.suspect-card.guilty .evidence-tag,
.suspect-card.liar .evidence-tag {
  opacity: 1;
}

.submit-section {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  margin-top: 30px;
  text-align: center;
}

.solve-btn {
  padding: 15px 30px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Amiri", serif;
  font-size: 1.2rem;
  transition: all 0.3s;
  margin-top: 20px;
}

.solve-btn:hover {
  background-color: #a00020;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(128, 0, 32, 0.4);
}

.hint-section {
  margin-top: 20px;
  padding: 15px;
  background-color: rgba(212, 175, 55, 0.1);
  border-radius: 10px;
  border: 1px solid var(--accent-color);
  display: none;
}

.hint-btn {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: black;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Amiri", serif;
  font-size: 1rem;
  margin-bottom: 20px;
}

.suspect-card.selected {
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 20px var(--accent-color);
}

@media (max-width: 768px) {
  .suspects-container {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }

  .clock {
    font-size: 1.5rem;
  }
}
/* Add new styles for the congratulation and game over screens */
.congrats-screen,
.game-over-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.congrats-screen.active,
.game-over-screen.active {
  opacity: 1;
  pointer-events: all;
}

.congrats-box,
.game-over-box {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 600px;
  width: 90%;
  border: 2px solid var(--accent-color);
}

.congrats-box h2,
.game-over-box h2 {
  color: var(--accent-color);
  margin-bottom: 20px;
}

.congrats-box button,
.game-over-box button {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: black;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Amiri", serif;
  font-size: 1.1rem;
  margin-top: 20px;
}
.home-button {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(135deg, #722afe, #2b86c5);
  color: white;
  font-size: 24px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  text-align: center;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 5px 15px rgba(43, 134, 197, 0.4);
  transition: all 0.3s ease;
}

.home-button:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2b86c5, #722afe);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  border-radius: 50px;
}

.home-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(114, 42, 254, 0.6);
}

.home-button:hover:before {
  opacity: 1;
}

.home-button:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(43, 134, 197, 0.4);
}

.home-button .icon {
  display: inline-block;
  margin-right: 10px;
  transition: transform 0.3s ease;
}

.home-button:hover .icon {
  transform: rotate(10deg);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(114, 42, 254, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(114, 42, 254, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(114, 42, 254, 0);
  }
}

.home-button:hover {
  animation: pulse 1.5s infinite;
}
@media (max-width: 768px) {
  .suspects-container {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }

  .clock {
    font-size: 1.5rem;
  }

  /* Home button repositioned to top of webpage for mobile */
  .home-button {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    font-size: 16px;
    z-index: 1000;
    width: auto;
    display: inline-block;
  }

  .home-button:hover {
    transform: translateX(-50%);
    animation: none;
  }

  /* Add space at top of container for fixed home button */
  .container {
    padding-top: 60px;
  }

  header {
    padding-top: 15px;
  }
}

/* Additional styles for smaller mobile screens */
@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .story,
  .clues {
    padding: 15px;
    font-size: 1rem;
  }

  .suspect-header {
    font-size: 1.3rem;
    padding: 10px;
  }

  .suspect-image {
    height: 150px;
  }

  .suspect-content {
    padding: 10px;
  }

  .suspect-footer {
    flex-direction: column;
    gap: 10px;
  }

  .suspect-btn {
    width: 100%;
  }

  .result-box {
    padding: 20px;
  }

  .result-title {
    font-size: 1.6rem;
  }

  .result-content {
    font-size: 1rem;
  }

  /* Even smaller home button for small screens */
  .home-button {
    padding: 6px 12px;
    font-size: 14px;
  }

  .congrats-box,
  .game-over-box {
    padding: 20px;
  }
}

/* For very small screens */
@media (max-width: 360px) {
  h1 {
    font-size: 1.5rem;
  }

  .clock {
    font-size: 1.2rem;
  }

  .suspect-image {
    height: 120px;
  }

  /* Even smaller home button for tiny screens */
  .home-button {
    padding: 5px 10px;
    font-size: 12px;
  }

  .result-box,
  .congrats-box,
  .game-over-box {
    padding: 15px;
  }

  .result-title {
    font-size: 1.4rem;
  }

  .solve-btn,
  .result-btn {
    padding: 10px 20px;
    font-size: 1rem;
  }
}
