/* General Styles */
body {
    margin: 0;
    font-family: 'MedievalSharp', cursive; /* Use a medieval-style font */
    background-color: #FAEBD7;
    color: #f4f4f4; /* Light text for readability */
    overflow: hidden;
  }
  
  main {
    position: relative;
    height: 100vh;
  }
  
  /* Intro Screen */
  #intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    padding: 20px;
    background-color: #7B1018; /* Dark brown for medieval feel */
    border: 2px solid #7B1018; /* Gold border */
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
  }
  
  #intro h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #f5f0f0; /* Gold text */
  }
  
  #castleName {
    padding: 10px;
    margin-bottom: 10px;
    width: 80%;
    border: 1px solid #7B1018;
    border-radius: 5px;
    background-color: #c5bebe;
    color: #000000;
  }
  
  button {
    padding: 10px 20px;
    background-color: #f4f4f4; /* Gold button */
    border: none;
    border-radius: 5px;
    color: #1e1e1e;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  button:hover {
    background-color: #ebce6f; /* Lighter gold on hover */
  }
  
  /* Game Area */
  #gameArea {
    position: relative;
    height: 100vh;
    overflow: hidden;
  }
  
  #castle {
    position: absolute;
    top: -300px;
    left: 50px;
    width: 220px;
    height: auto;
    z-index: 5;
  }

  #tower{
    position: absolute;
    top: -300px;
    left: 250px;
    width: 150px;
    height: auto;
    z-index: 5;
  }

  #spikeball{
    position: absolute;
    top: -300px;
    left: 375px;
    width: 150px;
    height: auto;
    z-index: 5;
  }

  #watch {
    position: absolute;
    top: -300px;
    left: 475px;
    width: 150px;
    height: auto;
    z-index: 5;
  }
  
  #grass {
    position: absolute;
    top: -350px;
    left: 0;
    width: 100vw;
    height: 300px;
    background-color: #5e9b5e; /* Dark green grass */
    z-index: 1;
  }
  
/* Side Panels */
/* Left Panel (Objectives) */
#leftPanel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
  }
  
  /* Checklist Styling */
 /* Checklist Styling */
#checklist {
    opacity: 0;
    width: 320px; /* Slightly wider for better spacing */
    padding: 20px;
    background-color: #2a1e1e; /* Dark brown background */
    border: 3px solid #8b7355; /* Gold border */
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7); /* Deeper shadow for depth */
  }
  
  #checklist h3 {
    color: #d4af37; /* Gold text */
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Text shadow for depth */
  }
  
  #checklist ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  #checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 10px;
    background-color: rgba(58, 44, 44, 0.8); /* Semi-transparent dark brown */
    border: 1px solid #8b7355; /* Gold border */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Subtle shadow */
    transition: transform 0.2s, box-shadow 0.2s; /* Smooth hover effect */
  }
  /* Easy (Default) */
#checklist li {
    border: 1px solid #8b7355; /* Existing gold border */
  }
  
  /* Medium */
  #checklist li.medium {
    border: 2px solid #ff0000; /* Red border */
  }
  
  /* Hard */
  #checklist li.hard {
    border: 2px solid #800080; /* Purple border */
  }
  #checklist li:hover {
    transform: translateY(-2px); /* Lift effect on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Deeper shadow on hover */
  }
  
  #checklist input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #d4af37; /* Gold checkbox */
    cursor: pointer;
  }
  
  #checklist span {
    flex-grow: 1;
    color: #f4f4f4; /* Light text */
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Text shadow for readability */
  }
  
  /* Start Task Button */
  .startTask {
    padding: 5px 10px;
    background-color: #8b7355; /* Gold background */
    border: 1px solid #d4af37; /* Light gold border */
    border-radius: 5px;
    color: #1e1e1e; /* Dark text */
    font-family: 'MedievalSharp', cursive;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
  }
  
  .startTask:hover {
    background-color: #d4af37; /* Lighter gold on hover */
    transform: scale(1.05); /* Slight grow effect on hover */
  }

  .startTask:hover:disabled {
    background-color: #8b7355;
    transform: scale(1.0);
  }
  /* Right Panel (Achievements) */
/* Right Panel (Achievements) */
#rightPanel {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

/* Achievements Styling */
#achievements {
  opacity: 0;
  width: 250px;
  padding: 15px;
  background-color: #3a2c2c; /* Dark brown background */
  border: 2px solid #8b7355; /* Gold border */
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#achievements h3 {
  color: #d4af37; /* Gold text */
  margin-bottom: 20px;
  font-size: 1.5rem;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Text shadow for depth */
}

#achievements ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#achievements li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  padding: 10px;
  background-color: rgba(58, 44, 44, 0.8); /* Semi-transparent dark brown */
  border: 1px solid #8b7355; /* Gold border */
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Subtle shadow */
  transition: transform 0.2s, box-shadow 0.2s; /* Smooth hover effect */
}

#achievements li:hover {
  transform: translateY(-2px); /* Lift effect on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Deeper shadow on hover */
}

.achievement-icon {
  font-size: 1.5rem; /* Larger icon size */
  color: #d4af37; /* Gold icon color */
}

.achievement-text {
  flex-grow: 1;
  color: #f4f4f4; /* Light text */
  font-size: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Text shadow for readability */
}
  
  /* Checklist and Achievements Styling */
  #checklist, #achievements {
    opacity: 0;
    width: 250px;
    padding: 15px;
    background-color: #3a2c2c;
    border: 2px solid #8b7355;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }
  
  #checklist h3, #achievements h3 {
    color: #d4af37;
    margin-bottom: 10px;
  }
  
  ul {
    list-style: none;
    padding: 0;
  }
  
  li {
    margin: 10px 0;
    color: #f4f4f4;
  }
  
  /* Animations */
  .grassDown {
    animation: grassDown 2s ease-out forwards;
  }
  
  @keyframes grassDown {
    0% { top: -350px; }
    100% { top: calc(100vh - 150px); }
  }
  
  .introUp {
    animation: introUp 1s ease-out forwards;
  }
  
  @keyframes introUp {
    0% { top: 50%; }
    100% { top: -350px; }
  }
  
  .landCastle {
    animation: landCastle 2s ease-out forwards;
  }
  .landTowert{
    animation: landTowert 2s ease-out forwards;
  }
  
  @keyframes landCastle {
    0% { top: -300px; }
    100% { top: calc(100vh - 330px); }
  }
  
  @keyframes landTower {
    0% { top: -300px; }
    100% { top: calc(100vh - 280px); }
  }

  @keyframes landTowert {
    0% { top: -300px; }
    100% { top: calc(100vh - 340px); }
  }

  .landTower {
    animation: landTower 2s ease-out forwards;
  }

  .showMenus {
    animation: showMenus 2s ease-in forwards;
  }
  
  @keyframes showMenus {
    0% { opacity: 0; }
    100% { opacity: 1; }
  }
  /* Overlay Styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
    justify-content: center;
    align-items: center;
  }
  
  .overlay-content {
    background-color: #3a2c2c;
    padding: 20px;
    border: 2px solid #8b7355;
    border-radius: 10px;
    text-align: center;
    width: 300px;
  }
  
  .overlay-content h2 {
    color: #d4af37;
    margin-bottom: 10px;
  }
  
  .overlay-content input {
    padding: 10px;
    margin-bottom: 10px;
    width: 80%;
    border: 1px solid #8b7355;
    border-radius: 5px;
    background-color: #2a1e1e;
    color: #f4f4f4;
  }
  
  .overlay-content button {
    padding: 10px 20px;
    margin: 5px;
    background-color: #8b7355;
    border: none;
    border-radius: 5px;
    color: #1e1e1e;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .overlay-content button:hover {
    background-color: #d4af37;
  }
  
  #passwordHint {
    color: #f4f4f4;
    font-size: 0.9rem;
    margin-top: 10px;
  }
  #passwordHints ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
  }
  
  #passwordHints li {
    margin: 5px 0;
    color: #f4f4f4;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s;
  }
  
  #passwordHints li.visible {
    opacity: 1; /* Visible when active */
  }
  
  #passwordHints li.completed {
    color: #4caf50; /* Green for completed hints */
  }

  #timer {
    color: #d4af37;
    font-size: 1.2rem;
    margin: 10px 0;
    text-align: center;
  }
  /* Castle Name Display */
#castleNameDisplay {
    position: fixed; /* Fixed positioning to keep it at the top */
    top: 20px; /* Distance from the top of the page */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Adjust for exact centering */
    color: #d4af37; /* Gold color */
    font-size: 2rem; /* Larger font size */
    font-family: 'MedievalSharp', cursive; /* Medieval font */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Text shadow for readability */
    z-index: 1000; /* Ensure it's above other elements */
    opacity: 0; /* Initially hidden */
    transition: opacity 0.5s ease-in-out; /* Smooth fade-in effect */
    white-space: nowrap; /* Prevent text from wrapping */
  }


  /* Audio Controls (Optional) */
  audio {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
  }

  /* This is the phishing Overlay */

  /* Phishing Task Modal Styles */
.phishing-content {
  width: 70%;
  max-width: 800px;
  background-color: #2a1e1e;
  border: 5px solid #8b7355;
  border-radius: 10px;
  color: #f4f4f4;
  text-align: left;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.email-container {
  background-color: #f4f4f4;
  color: #333;
  border: 1px solid #8b7355;
  padding: 15px;
  margin: 20px 0;
  border-radius: 5px;
  font-family: Arial, sans-serif;
}

.email-header {
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.email-field {
  margin-bottom: 5px;
}

.email-field span {
  font-weight: bold;
}

.email-body {
  line-height: 1.5;
}

.email-body a {
  color: #0066cc;
  text-decoration: underline;
}

.decision-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  margin-bottom: 10px;
}

.safe-btn, .phishing-btn, .close-feedback-btn, .close-completion-btn {
  padding: 10px 25px;
  font-size: 18px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  font-family: 'MedievalSharp', cursive;
}

.safe-btn {
  background-color: #4CAF50;
  color: white;
  border: 2px solid #45a049;
}

.phishing-btn {
  background-color: #f44336;
  color: white;
  border: 2px solid #da190b;
}

.safe-btn:hover, .phishing-btn:hover, .close-feedback-btn:hover, .close-completion-btn:hover {
  transform: scale(1.05);
}

.help-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 25px;
  height: 25px;
  background-color: #8b4513;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-weight: bold;
  z-index: 5;
}

.help-tooltip {
  display: none;
  position: absolute;
  top: 45px;
  right: 15px;
  background-color: #1e1e1e;
  /* #fff; */
  border: 2px solid #8b4513;
  border-radius: 5px;
  padding: 15px;
  width: 300px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
  text-align: left;
}

/* Medieval decorative corners */
.medieval-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #8b7355;
  /* Might Delete */
  z-index: 1;
}

.top-left {
  top: 0;
  left: 0;
  border-bottom-right-radius: 100%;
}

.top-right {
  top: 0;
  right: 0;
  border-bottom-left-radius: 100%;
}

.bottom-left {
  bottom: 0;
  left: 0;
  border-top-right-radius: 100%;
}

.bottom-right {
  bottom: 0;
  right: 0;
  border-top-left-radius: 100%;
}

/* Make sure overlay is flex display for centering */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

  /* Cloud Styles */
/* Cloud Styles */
#clouds {
    position: absolute;
    top: 0; /* Position at the top of the page */
    left: 0;
    width: 100%;
    height: 30%; /* Limit height to the top portion of the screen */
    overflow: hidden;
    z-index: 2; /* Ensure clouds are behind the castle but above the grass */
  }
  
  .cloud {
    position: absolute;
    background: white;
    border-radius: 1000px;
    opacity: 0.7;
    animation: moveClouds linear infinite;
  }
  
  /* Cloud Shapes */
  .cloud::before,
  .cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 1000px;
  }
  
  .cloud::before {
    width: 80%;
    height: 80%;
    top: -40%;
    left: 10%;
  }
  
  .cloud::after {
    width: 60%;
    height: 60%;
    top: -30%;
    right: 10%;
  }
  
  /* Individual Cloud Sizes and Positions */
  .cloud1 {
    width: 200px;
    height: 60px;
    top: 10%;
    left: -200px;
    animation-duration: 20s; /* Faster animation */
  }
  
  .cloud2 {
    width: 150px;
    height: 50px;
    top: 20%;
    left: -150px;
    animation-duration: 18s; /* Faster animation */
  }
  
  .cloud3 {
    width: 180px;
    height: 55px;
    top: 15%;
    left: -180px;
    animation-duration: 22s; /* Faster animation */
  }
  
  .cloud4 {
    width: 220px;
    height: 70px;
    top: 5%;
    left: -220px;
    animation-duration: 25s; /* Faster animation */
  }
  
  .cloud5 {
    width: 170px;
    height: 60px;
    top: 25%;
    left: -170px;
    animation-duration: 19s; /* Faster animation */
  }
  
  .cloud6 {
    width: 190px;
    height: 65px;
    top: 12%;
    left: -190px;
    animation-duration: 21s; /* Faster animation */
  }
  
  /* Cloud Animation */
  @keyframes moveClouds {
    0% {
      transform: translateX(-100%);
    }
    100% {
      transform: translateX(100vw);
    }
  }
  .animateClouds .cloud {
    animation-play-state: running;
  }
  /* Mountain Styles */
#mountains {
    position: absolute;
    bottom: 0; /* Position at the bottom of the page */
    left: 0;
    width: 100%;
    height: 150px; /* Adjust height as needed */
    z-index: 3; /* Ensure mountains are above the grass but below the castle */
    overflow: hidden;
  }
  
  /* Mountain Peaks */
  #mountains::before,
  #mountains::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 150px solid #6b5b4d; /* Mountain color */
  }
  
  #mountains::before {
    left: 0;
  }
  
  #mountains::after {
    right: 0;
  }
  
  /* Additional Mountain Peaks */
  .mountain-peak {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 100px solid #6b5b4d; /* Mountain color */
  }
  
  .mountain-peak:nth-child(1) {
    left: 20%;
  }
  
  .mountain-peak:nth-child(2) {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .mountain-peak:nth-child(3) {
    right: 20%;
  }
  


  /* Setting checkbox color after task has been completed */
  input[type=checkbox]:checked {
    outline: 2px solid green;
  }
  /* Hide Mountains */
.hidden {
    display: none;
  }

  .waveOneEnemy{
    position: absolute;
    left: 100vw;
    top: 465px;
    height: 200px;
    width: 150px;
    z-index: 11;
  }

  .enemyMove{
    animation: move 5s linear forwards;
  }

  .enemyTwoMove{
    animation: twoMove 5s linear forwards;
  }

  .enemyThreeMove{
    animation: threeMove 5s linear forwards;
  }

  .enemyShake{
    animation: shake 2.5s linear;
  }

  .enemyFall{
    animation: fall 3s ease-in-out forwards;
  }
  @keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(5px); }
}

@keyframes fall {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(200px); opacity: 0; }
}

@keyframes move {
    from { left: 100vw; }
    to { left: 200px; }
}

@keyframes twoMove {
  from { left: 100vw; }
  to { left: 375px; }
}

@keyframes threeMove {
  from { left: 100vw; }
  to { left: 475px; }
}
  #castleHealthBar {
    position: absolute;
    bottom: 20px; /* Adjust this value to position it above the grass */
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 20px;
    background-color: #444;
    border: 2px solid #000;
    border-radius: 10px;
    overflow: hidden;
    display: none; /* Hidden by default */
    z-index: 10; /* Ensure it's above the grass */
  }
  
  #castleHealthBarFill {
    height: 100%;
    width: 100%;
    background-color: #4CAF50; /* Green color for health */
    transition: width 0.5s ease;
  }
  
  #castleHealthBarText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
  }

  #waveNameDisplay {
    position: fixed; /* Fixed positioning to keep it at the top */
    top: 60px; /* Distance from the top of the page */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Adjust for exact centering */
    color: #d4af37; /* Gold color */
    font-size: 2rem; /* Larger font size */
    font-family: 'MedievalSharp', cursive; /* Medieval font */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Text shadow for readability */
    z-index: 1000; /* Ensure it's above other elements */
    opacity: 0; /* Initially hidden */
    transition: opacity 0.5s ease-in-out; /* Smooth fade-in effect */
    white-space: nowrap; /* Prevent text from wrapping */
  }

  /* Table Styling */
#medieval-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'MedievalSharp', cursive;
    background-color: #2a1e1e;
    color: #d4af37;
    text-align: center;
}

#medieval-table th, #medieval-table td {
    border: 2px solid #8b7355;
    padding: 10px;
}

#medieval-table th {
    background-color: #5e3a1e;
}

#medieval-table tr:nth-child(even) {
    background-color: rgba(139, 115, 85, 0.5);
}

/* Styling for input boxes */
#medieval-table input[type="text"] {
    width: 100%; /* Make input fill the entire cell */
    height: 100%; /* Ensure input fills vertically as well */
    padding: 0;
    margin: 0;
    border: none;
    background-color: transparent; /* Make background transparent */
    color: #d4af37; /* Same as the text color */
    font-family: 'MedievalSharp', cursive;
    font-size: 1em;
    text-align: center;
    outline: none;
}

#medieval-table input[type="text"]:focus {
    background-color: transparent; /* Keep transparent when focused */
    box-shadow: none; /* No extra focus border */
}

/* Update the overlay to take up most of the page */
#cipherGameOverlay .overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 40px; /* Add padding for spacing */
}

/* Update the content inside the overlay to fit large table */
#cipherGameOverlay .overlay-content {
    background-color: #3a2c2c;
    padding: 30px;
    border: 2px solid #8b7355;
    border-radius: 10px;
    text-align: center;
    width: 90%; /* Take up most of the screen width */
    max-width: 1200px; /* Add a max-width to prevent it from growing too large */
    max-height: 90%; /* Prevent overflow from the height of the screen */
    overflow-y: auto; /* Allow scrolling if content exceeds available height */
}

/* Make the table responsive and fit within the overlay */
#cipherGameOverlay #medieval-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed; /* Ensure columns are evenly distributed */
}

#cipherGameOverlay #medieval-table th,
#cipherGameOverlay #medieval-table td {
    padding: 8px;
    border: 1px solid #8b7355;
    text-align: center;
    word-wrap: break-word; /* Allow words to wrap within cells */
}

/* Adjust input field and buttons */
#cipherGameOverlay input {
    padding: 10px;
    margin-top: 20px;
    width: 50%;
    border: 1px solid #8b7355;
    border-radius: 5px;
    background-color: #2a1e1e;
    color: #f4f4f4;
}

#cipherGameOverlay button {
    padding: 10px 20px;
    margin-top: 10px;
    background-color: #8b7355;
    border: none;
    border-radius: 5px;
    color: #1e1e1e;
    cursor: pointer;
    transition: background-color 0.3s;
}

#cipherGameOverlay button:hover {
    background-color: #d4af37;
}

#cipherGameOverlay #closeOverlay {
    background-color: #8b7355;
    margin-top: 10px;
}

#cipherGameOverlay #closeOverlay:hover {
    background-color: #d4af37;
}

#cipherInput {
    justify-self: center;
}

#unencrypted-help-text {
    justify-self: center;
}

#checkEncryptionBtn {
    justify-self: center;
}/* Achievement Pop-Up Styles */
.achievement-popup {
    position: fixed;
    bottom: 20px;
    right: -300px; /* Start off-screen */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: #2a1e1e;
    border: 2px solid #8b7355;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    color: #f4f4f4;
    font-family: 'MedievalSharp', cursive;
    z-index: 1000;
    transition: right 0.5s ease-in-out;
  }
  
  .achievement-popup.show {
    right: 20px; /* Slide into view */
  }
  
  .achievement-popup .achievement-icon {
    font-size: 1.5rem;
  }
  
  .achievement-popup .achievement-text {
    font-size: 1rem;
  }
  /* Hide the "Defend Against Hackers" task initially */
#checklist li:nth-child(2) {
    display: none;
  }


/* Data Breach Game Styles */
.breach-story {
  margin-bottom: 20px;
  line-height: 1.6;
  text-align: center;
}

/* Make the overlay content wider and add scrolling if needed */
#dataBreachOverlay .overlay-content {
  width: 90%;
  max-width: 1100px;
  max-height: 85vh;
  overflow-y: auto;
}

.suspect-profiles {
  display: flex;
  flex-wrap: wrap;
  /* flex-direction: row; */
  /* justify-content: space-between;  */
  justify-content: center; 
  gap: 20px;
  margin-top: 20px;
  width: 100%;
}

.suspect {
  flex: 0 1 30%; /* Prevents uneven stretching, keeps each at ~30% width */
  /* flex: 1; */
  background-color: rgba(255, 248, 220, 0.9);
  border: 2px solid #8B4513;
  border-radius: 10px;
  padding: 15px;
  width: 250px;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  min-width: 0; /* Allow cards to shrink if needed */
}

.suspect:hover {
  transform: translateY(-5px);
}

.suspect-image {
  font-size: 40px;
  text-align: center;
  margin-bottom: 10px;
}

.suspect h3 {
  text-align: center;
  color: #8B4513;
  margin-top: 0;
  font-family: 'MedievalSharp', cursive;
}

.suspect-role {
  text-align: center;
  font-style: italic;
  margin-bottom: 15px;
  color: #5D4037;
}
/* Style Paragraphs */
.suspect-story, .suspect-behavior {
  font-size: 14px;
  margin-bottom: 10px;
  color: #5D4037;
}

/* Create section dividers */
.suspect-behavior {
  position: relative;
  padding-top: 15px;
}

.suspect-behavior:before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 1px;
  background-color: #8B4513;
  opacity: 0.5;
}

.accuseButton {
  display: block;
  width: 80%;
  margin: 15px auto 0;
  padding: 8px 0;
  background-color: #8B4513;
  color: #FFF8DC;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'MedievalSharp', cursive;
  transition: background-color 0.3s;
}

.accuseButton:hover {
  background-color: #A0522D;
}

#accusationResult {
  text-align: center;
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

#accusationTitle {
  color: #8B4513;
  margin-bottom: 15px;
  font-family: 'MedievalSharp', cursive;
  font-size: 24px;
}

/* Make the overlay content wider to accommodate the side-by-side layout */
#dataBreachOverlay .overlay-content {
  width: 85%;
  max-width: 1000px;
}

/* Responsive adjustments */
@media (max-width: 800px) {
  /* Switch to vertical layout on smaller screens */
  .suspect-profiles {
    flex-direction: column;
  }
  
  .suspect {
    margin-bottom: 15px;
  }
}