* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  color: #fff;
  background: url('bg.jpeg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  padding: 20px 10%;
  background: rgba(1, 1, 57, 0.532);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.logo {
  font-family: Arial, Helvetica, sans-serif;
  font-style: oblique;
  font-size: 30px;
  font-weight: 600;
  color: #fff;
  filter: drop-shadow(0 0 4px #09001d);
}

.navbar {
  display: flex;
  gap: 20px;
}

.navbar a {
  font-size: 15px;
  color: #fff;
  font-weight: 350;
  text-decoration: none;
  transition: 0.2s;
}

.navbar a:hover,
.navbar a.active {
  color: rgba(118, 159, 248, 0.888);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
}

/* MAIN */
.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding-top: 150px;
}

.main h1 {
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.main p {
  font-size: 17.5px;
  margin-bottom: 40px;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100px;
  color: white;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 20px;
  color: #fff;
}

.hero p.tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin-bottom: 30px;
}

.hero .reg-btn {
  margin-bottom: 15px;
}

/*BUTTONS */
.reg-btn {
  width: 180px;
  height: 50px;
  background: linear-gradient(135deg, #8183ff, #5b3eff);
  box-shadow: 0 4px 15px rgba(91, 62, 255, 0.4);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px auto;
}

.reg-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(91, 62, 255, 0.6);
  filter: brightness(1.1);
}

/*LOGIN LINK  */
.login-link {
  margin-top: 15px;
  font-size: 15px !important;
  color: rgba(75, 129, 246, 0.888);
}

.login-link a {
  color: rgba(118, 159, 248, 0.888);
  text-decoration: none;
}

.login-link a:hover {
  text-decoration: underline;
}

/* FORM*/
.form-container {
  background: rgba(255, 255, 255, 0.12);
  /* Brighter, lighter glass */
  backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  /* Optimal for Login/Register */
  text-align: center;
  box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.25);
  /* More prominent border */
  margin: 20px auto;
  transition: transform 0.3s ease;
}

.createquizpage .form-container {
  max-width: 900px;
  /* Wider for Create Quiz */
}

#join-container {
  max-width: 450px;
}

.form-container h2 {
  color: #fff;
  margin-bottom: 25px;
  font-size: 24px;
}

.form-container form {
  display: flex;
  flex-direction: column;
}

.form-container input,
.form-container textarea {
  width: 100%;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transition: all 0.3s ease;
  outline: none;
}

.form-container input:focus,
.form-container textarea:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: #8183ff;
  box-shadow: 0 0 15px rgba(129, 131, 255, 0.3);
}

.form-container input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-container button {
  margin: 20px auto;
  padding: 12px 30px;
  width: auto;
  min-width: 180px;
  background: linear-gradient(135deg, #8183ff, #5b3eff);
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(91, 62, 255, 0.4);
}

.form-container button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(91, 62, 255, 0.6);
  filter: brightness(1.1);
}

.form-container button:active {
  transform: translateY(0);
}

.form-container p {
  margin-top: 15px;
  font-size: 14px;
}

.form-container p a {
  color: #5384ee;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s;
}

.form-container p a:hover {
  color: #1f618d;
  text-decoration: underline;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.discard-btn {
  background-color: #f44336;
  color: white;
}

.save-btn {
  background-color: #0b3d91;
  color: white;
  transition: background-color 0.3s ease;
}

.save-btn:hover {
  background-color: #ffd700;
  color: #000;
}

/* search highlights */
.highlights {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 50px auto;
  max-width: 1000px;
  flex-wrap: wrap;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 20px;
  flex: 1;
  min-width: 250px;
  text-align: center;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
}

.card h2 {
  margin-bottom: 15px;
  font-size: 1.5rem;
  color: #fff;
  /* White text for better contrast on glass */
}

.card p {
  color: rgba(255, 255, 255, 0.9);
}


/* DASHBOARD  */
.dashboard {
  text-align: center;
  color: white;
}

.dashboard h1 {
  font-size: 2.5rem;
}

.dashboard p {
  font-size: 1.1rem;
}

.dashboard-content {
  display: flex;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  padding: 0;
  flex-wrap: wrap;
}

.stats-card,
.recent-activity,
.created-quizzes {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 1;
  min-width: 300px;
  transition: transform 0.3s ease;
}

.stats-card:hover,
.recent-activity:hover,
.created-quizzes:hover {
  transform: translateY(-5px);
}

.stat {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}

.stat-label {
  color: #f0f0f0;
}

.stat-value {
  font-weight: bold;
  color: #f4d03f;
}

.recent-activity li,
#created-quiz-list li {
  padding: 15px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.05);
  /* Very light glass */
  backdrop-filter: blur(5px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recent-activity li:hover,
#created-quiz-list li:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(10px);
  border-color: rgba(255, 255, 255, 0.2);
}

/*  FORM ELEMENTS  */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #f0f0f0;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/*  QUESTION BLOCK */
.question-block {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.answer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.answer-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.answer-item span {
  min-width: 75px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.answer-item input[type="text"] {
  flex: 1;
  width: auto;
  margin: 0;
}

.answer-item input[type="radio"] {
  accent-color: #03f54c;
}

.correct-selection {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  justify-content: flex-end;
}

.correct-selection label {
  margin: 0;
  cursor: pointer;
}


/* QUIZ BUTTONS */
#add-question-btn,
#save-quiz-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 10px;
}

#add-question-btn {
  background: #8183ff9f;
  color: #fff;
}

#add-question-btn:hover {
  background: #01064679;
}



.quiz-list-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  padding: 50px 30px;
  border-radius: 20px;
  width: 95%;
  max-width: 1100px;
  margin: 40px auto;
  text-align: center;
  box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.quiz-list-container h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 10px;
  color: #ffffff;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}


.quiz-card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.quiz-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  padding: 30px;
  border-radius: 20px;
  width: 280px;
  text-align: center;
  box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.25);
}

.quiz-card h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quiz-card p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  margin-bottom: 25px;
  line-height: 1.5;
}

.start-quiz-btn {
  background: linear-gradient(135deg, #8183ff, #5b3eff);
  border: none;
  padding: 12px 30px;
  color: #fff;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(91, 62, 255, 0.3);
}

.start-quiz-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(91, 62, 255, 0.5);
  filter: brightness(1.1);
}

.quiz-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  padding: 50px 35px;
  border-radius: 25px;
  width: 95%;
  max-width: 950px;
  margin: 50px auto;
  box-shadow: 0px 20px 45px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.quiz-container h2 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  margin-bottom: 25px;
  text-align: center;
}

.quiz-question {
  margin-bottom: 25px;
  text-align: left;
  font-size: 1.1rem;
  color: #fff;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.quiz-options label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.08);
  /* Lighter version */
  backdrop-filter: blur(10px);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.quiz-options label:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
  border-color: rgba(255, 255, 255, 0.3);
}

.quiz-options input[type="radio"] {
  accent-color: #f4d03f;
}

.quiz-nav {
  margin-top: 35px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.quiz-nav button {
  background: #8183ff9f;
  color: #fff;
  border: none;
  padding: 12px 25px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.quiz-nav button:hover {
  background: #01064679;
  transform: scale(1.05);
}

#next-btn, #submit-btn {
  margin-left: auto;
}

.created-quizzes h2 {
  color: #ffffff;
  margin-bottom: 25px;
  font-size: 1.5rem;
  text-align: center;
}

#created-quiz-list {
  list-style: none;
  padding-left: 0;
}

#created-quiz-list li {
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

#created-quiz-list li:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.2);
}

#created-quiz-list li button {
  background: #8183ff9f;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s ease;
  margin-left: 6px;
}

#created-quiz-list li button:hover {
  background: #f4d03f;
  color: #000;
  transform: scale(1.05);
}

.quiz-action-btn {
  margin-left: 5px;
  background: #8183ff9f;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.quiz-action-btn:hover {
  background: #01064679;
  transform: scale(1.05);
}

.quiz-search {
  width: 90%;
  max-width: 500px;
  padding: 15px 25px;
  margin: 30px auto;
  display: block;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1rem;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.quiz-search:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: #8183ff;
  box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.3);
}

.quiz-search::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.quiz-highlight {
  background-color: #f4d03f;
  padding: 0 4px;
  border-radius: 3px;
}

/* MOBILE RESPONSIVENESS  */
@media (max-width: 768px) {
  .header { height: 70px; padding: 15px 5%; }
  .navbar {
    position: absolute; top: 70px; left: 0; width: 100%;
    background: rgba(1, 1, 57, 0.95); flex-direction: column;
    align-items: center; max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease; z-index: 100;
  }
  .navbar.active { max-height: 500px; padding: 20px 0; }
  .navbar a { margin: 10px 0; }
  .hamburger { display: flex; }
  .highlights, .dashboard-content, .quiz-card-container { flex-direction: column; gap: 20px; }
  .card, .stats-card, .recent-activity, .created-quizzes, .quiz-card { width: 100%; min-width: auto; }
  .quiz-container, .quiz-list-container, .form-container { width: 95%; padding: 30px 20px; }
}

@media (max-width: 600px) {
  .reg-btn, .start-quiz-btn, .quiz-nav button, #add-question-btn, .quiz-action-btn { width: 100%; padding: 12px 0; }
  .form-container { padding: 25px 15px; }
}

/* HAMBURGER MENU */
.hamburger {
  display: none; flex-direction: column; justify-content: space-around;
  width: 25px; height: 22px; cursor: pointer; z-index: 110;
}
.hamburger span { display: block; height: 3px; width: 100%; background: #fff; border-radius: 3px; transition: all 0.3s ease; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* QUIZ TIMER */
.quiz-timer {
  text-align: center; font-size: 1.2rem; font-weight: 600; color: #fff;
  margin-bottom: 25px; background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px); padding: 12px 30px; border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2); display: inline-block;
  min-width: 150px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.quiz-timer.warning { color: #ff4d4d; font-weight: 700; }