nav {
  background: #004d80;
  padding: 12px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
}

nav a {
  cursor: pointer;
  color: white;
  margin: 0 15px;
  font-weight: bold;
  text-decoration: none;
  font-size: 16px;
}

nav a:hover {
  color: #4fc3f7;
}

.nav-links {
  display: flex;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.logout-btn {
  font-family: 'Poppins', sans-serif;
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
  margin-left: auto;
}

.logout-btn:hover {
  background: #ff3b3b;
  transform: translateY(-2px);
}

body {
  font-family: 'Poppins', sans-serif;
  background: #004d80;
  background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  color: #333;
  margin: 0;
  padding: 0;
}

footer {
  text-align: center;
  padding: 15px;
  background: #004d80;
  color: white;
  border-top: 1px solid #b3e5fc;
  margin-top: 40px;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.05);
}

.container {
  max-width: 900px;
  margin: 40px auto;
  background: #ffffff;
  padding: 40px;
  border-radius: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.container h1 {
  font-weight: 700;
  font-size: 2.2rem;
  color: #4fc3f7;
  margin-bottom: 25px;
  letter-spacing: 1px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.container p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin: 0 auto;
  max-width: 700px;
}

/* --------- LOGIN --------- */

.login-layout {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container-login {
  max-width: 420px;
  margin: 80px auto;
  background: white;
  padding: 40px;
  border-radius: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.container-login input,
.container-login select {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.container-login select {
  cursor: pointer;
}

.container-login button {
  width: 100%;
  padding: 12px;
  background: #4fc3f7;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: 0.3s;
}

.container-login button:hover {
  background: #0098d1;
  transform: translateY(-2px);
}

.container-login .message {
  margin-top: 15px;
  color: #ff4081;
  font-weight: bold;
}

.container-login .agree-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  margin-top: 20px;
  margin-bottom: 25px;
}

.container-login .agree-label input {
  margin: 0;
  width: 14px;
  cursor: pointer;
}

/* --------- HOME --------- */

.container-home .liquid-text {
  background: linear-gradient(270deg, #04d7f3, #5535e4, #cc06fd, #2e9be4);
  background-size: 800% 800%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: gradientMove 6s ease infinite;
  display: inline-block;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.user-info {
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  background-color: #f5f5f5;
}

.user-info h3 {
  margin-bottom: 10px;
}

/* --------- MODULE --------- */

.container-module {
  max-width: 900px;
  margin: 40px auto;
  background: #ffffff;
  padding: 40px;
  border-radius: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.container-module>* {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.container-module p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #000;
  text-align: left;
  margin-bottom: 15px;
}

.container-module p,
.container-module li {
  font-weight: 400;
}

.container-module ul {
  text-align: left;
  padding-left: 20px;
  margin-bottom: 15px;
}

.container-module li {
  margin-bottom: 6px;
}

.container-module h2 {
  font-weight: 600;
  font-size: 1.5rem;
  text-align: left;
  margin-top: 30px;
  margin-bottom: 10px;
}

.container-module h3 {
  font-weight: 600;
  font-size: 1.3rem;
  text-align: left;
  margin-top: 25px;
  margin-bottom: 10px;
}

.container-module h4 {
  font-weight: 500;
  font-size: 1.15rem;
  text-align: left;
  margin-top: 20px;
  margin-bottom: 8px;
}

.container-module h5 {
  font-weight: 500;
  font-size: 1rem;
  text-align: left;
  margin-top: 15px;
  margin-bottom: 5px;
}

.container-module figure {
  margin: 25px auto;
  text-align: center;
}

.container-module img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
}

.container-module figcaption {
  font-size: 0.9rem;
  margin-top: 5px;
}

.container-module table {
  width: 100%;
  max-width: 700px;
  margin: 20px auto;
  border-collapse: collapse;
}

.container-module td,
.container-module th {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: left;
}

.container-module th {
  background-color: #f5f5f5;
}

.container-module .tip {
  background: #e3f2fd;
  padding: 15px;
  border-left: 5px solid #4fc3f7;
  border-radius: 10px;
  margin: 20px auto;
  text-align: left;
}

ul.modules-list {
  list-style: none;
  padding: 0;
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}

ul.modules-list li {
  list-style: none;
  margin-bottom: 20px;
  background: #e1f5fe;
  padding: 15px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

ul.modules-list li:hover {
  background: #b3e5fc;
  transform: translateY(-3px);
  cursor: pointer;
}

ul.modules-list li a {
  text-decoration: none;
  font-weight: 500;
  color: #004d80;
  font-size: 1.2rem;
  display: block;
  padding: 10px;
}

.module-dropdown-content {
  display: none;
  margin-left: 20px;
  margin-top: 20px;
}

/* --------- GAME --------- */

#game {
  top: 20px;
  left: 150px;
  width: 600px;
  height: 350px;
  background: url('../game/xray-room.png') no-repeat center center;
  background-size: cover;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 5px solid black;
}

#score {
  position: absolute;
  top: 10px;
  left: 22px;
  font-size: 14px;
  font-weight: bold;
}

#bed {
  width: 170px;
  height: 20px;
  position: absolute;
  left: 220px;
  top: 61px;
}

#wall1 {
  width: 600px;
  height: 60px;
}

#wall2 {
  width: 10px;
  height: 300px;
}

#partition1 {
  width: 169px;
  height: 70px;
  position: absolute;
  left: 0px;
  top: 180px;
}

#partition2 {
  width: 59px;
  height: 25px;
  position: absolute;
  left: 170px;
  top: 180px;
}

#partition3 {
  width: 24px;
  height: 70px;
  position: absolute;
  left: 230px;
  top: 180px;
}

#partition4 {
  width: 170px;
  height: 17px;
  position: absolute;
  left: 408px;
  top: 243px;
}

#partition5 {
  width: 20px;
  height: 88px;
  position: absolute;
  left: 467px;
  top: 261px;
}

#radtech {
  position: absolute;
  background: url('../game/radtech.png') no-repeat center center;
  background-size: 70px 70px;
  top: 150px;
  left: 280px;
  width: 35px;
  height: 70px;
}

#patient1 {
  position: absolute;
  background: url('../game/patient-stand.png') no-repeat center center;
  background-size: 70px 70px;
  top: 180px;
  left: 285px;
  width: 45px;
  height: 70px;
}

#patient2 {
  position: absolute;
  background: url('../game/patient-stand.png') no-repeat center center;
  background-size: 70px 70px;
  top: 100px;
  left: 285px;
  width: 45px;
  height: 70px;
}

#patient3 {
  position: absolute;
  background: url('../game/patient-lie.png') no-repeat center center;
  background-size: 70px 70px;
  top: 80px;
  left: 270px;
  width: 70px;
  height: 40px;
}

#patient4 {
  position: absolute;
  background: url('../game/patient-lie-side.png') no-repeat center center;
  background-size: 70px 70px;
  top: 80px;
  left: 270px;
  width: 70px;
  height: 40px;
}

#patient5 {
  position: absolute;
  background: url('../game/patient-lie.png') no-repeat center center;
  background-size: 70px 70px;
  top: 80px;
  left: 270px;
  width: 70px;
  height: 40px;
}

#patient6 {
  position: absolute;
  background: url('../game/patient-lie.png') no-repeat center center;
  background-size: 70px 70px;
  top: 80px;
  left: 270px;
  width: 70px;
  height: 40px;
}

#patient7 {
  position: absolute;
  background: url('../game/patient-stand.png') no-repeat center center;
  background-size: 70px 70px;
  top: 150px;
  left: 485px;
  width: 45px;
  height: 70px;
}

#patient8 {
  position: absolute;
  background: url('../game/patient-stand.png') no-repeat center center;
  background-size: 70px 70px;
  top: 250px;
  left: 285px;
  width: 45px;
  height: 70px;
}

#popup {
  border: 5px solid #020617;
  padding: 14px 16px;
  border-radius: 18px;
  display: none;
  flex-direction: column;
  top: 30px;
  left: 150px;
  width: 570px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 50px;
}

#popup p {
  margin: 0 0 10px 0;
  font-size: 14px;
  text-align: center;
}

#choices button {
  display: block;
  margin: 6px auto;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #22c55e;
  color: #020617;
  font-weight: bold;
}

#choices button:hover {
  opacity: 0.85;
}

#holdBtn {
  display: none;
  margin-top: 12px;
  margin-bottom: 30px;
  padding: 14px 26px;
  font-size: 16px;
  font-weight: bold;
  color: #020617;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 0 #15803d;
  user-select: none;
}

#holdBtn:active {
  box-shadow: 0 2px 0 #15803d;
  transform: translateY(4px);
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

#holdBtn:disabled {
  background: #94a3b8;
  color: #020617;
  cursor: not-allowed;
  box-shadow: none;
}

#holdCounter {
  display: none;
}

/* --------- SIMULATION --------- */

.container-simulation .simulation-layout {
  margin-top: 50px;
  display: flex;
  gap: 20px;
}

.container-simulation .left-panel {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container-simulation .right-panel {
  flex: 1;
  text-align: center;
}

.container-simulation #threejs-container {
  width: 100%;
  max-width: 800px;
  height: 500px;
  border-radius: 10px;
  overflow: hidden;
}

.container-simulation #tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  display: none;
  z-index: 10;
}

.container-simulation .radiograph {
  width: 100%;
  height: auto;
  max-width: 300px;
}

.container-simulation-lesson {
  margin-top: 80px;
}

.container-simulation-lesson h3 {
  font-weight: 600;
  font-size: 1.3rem;
  text-align: left;
}

.container .container-simulation-lesson p {
  font-size: 0.95rem;
  line-height: 1.7;
  font-weight: 400;
  text-align: left;
  max-width: none;
}

/* --------- QUIZ --------- */

.container-quiz .sets-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px;
  margin-top: 18px
}

.container-quiz .set-card {
  background: #e9fbff;
  border-radius: 14px;
  padding: 14px 18px;
  min-width: 300px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  text-align: left
}

.container-quiz .set-card h2 {
  margin: 0 0 8px;
  color: #0077a8
}

input.code {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #cfeffb;
  margin-bottom: 8px
}

button.btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: #4fc3f7;
  color: #003a4d;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12)
}

#quizSection {
  display: none;
  margin-top: 20px;
  text-align: left
}

.container-quiz .difficulty-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px 0
}

.container-quiz .diff-btn {
  background: #81d4fa;
  border-radius: 999px;
  padding: 8px 14px;
  border: none;
  color: #003a4d;
  font-weight: 800;
  cursor: pointer
}

.container-quiz .qwrap {
  background: #f0fbff;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px
}

.container-quiz .qtitle {
  font-weight: 700;
  color: #063d57;
  margin-bottom: 10px
}

label.choice {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  margin: 6px 0;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #dff4fb
}

label.choice:hover {
  transform: translateY(-2px);
  background: #f1fcff
}

input[type=radio] {
  margin-right: 10px
}

.container-quiz .fun-msg {
  height: 28px;
  margin-top: 8px;
  font-weight: 800;
  color: #ff3b88;
  text-align: center
}

.container-quiz .progress-box {
  margin: 12px 0;
  text-align: center
}

.container-quiz .progress-bar {
  width: 320px;
  height: 18px;
  background: #e6f5f9;
  border-radius: 12px;
  margin: 0 auto;
  border: 2px solid #cceefc;
  overflow: hidden
}

.container-quiz .progress-fill {
  height: 100%;
  width: 0;
  background: #4caf50;
  text-align: center;
  color: white;
  line-height: 18px;
  font-weight: 700;
  transition: width .35s
}

.container-quiz .next-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #00796b;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 800
}

.container-quiz .summary {
  background: #e7fff7;
  padding: 16px;
  border-radius: 12px;
  margin-top: 12px
}

.container-quiz .small {
  font-size: 0.9rem;
  color: #555
}

@media(max-width:700px) {
  .container-quiz .sets-row {
    flex-direction: column;
    align-items: center
  }

  .container-quiz .set-card {
    min-width: 90%
  }
}