@import url('https://fonts.cdnfonts.com/css/brandon-grotesque-regular');

/*
 * PopQuiz Internal Pages Stylesheet
 * Unified design matching the landing page aesthetic
 */

:root {
  --navy: #29414F;
  --navy-dark: #0C5783;
  --green: #59B4B5;
  --green-light: #5EE1E3;
  --off-white: #F1F1F1;
  --white: #FFFFFF;
  --black: #000000;

  --font-brandon: 'Brandon Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-width: 1260px;
  --spacing-xs: 10px;
  --spacing-sm: 20px;
  --spacing-md: 30px;
  --spacing-lg: 50px;
  --spacing-xl: 60px;
  --spacing-2xl: 100px;

  --border-radius-sm: 12px;
  --border-radius-md: 15px;
  --border-radius-lg: 20px;
  --border-radius-xl: 45px;
  --border-radius-full: 9000px;

  --shadow-sm: 0px 4px 4px rgba(0, 0, 0, 0.15);
  --shadow-md: 0px 4px 4px rgba(0, 0, 0, 0.25);
  --shadow-card: 5px 5px 0px #000000;

  --gradient-teal: linear-gradient(90deg, #59B4B5 9%, #5EE1E3 100%);
  --gradient-teal-light: linear-gradient(90deg, rgba(89, 180, 181, 0.55) 9%, rgba(94, 225, 227, 0.55) 100%);
  --gradient-navy: linear-gradient(180deg, #29414F 0%, #0C5783 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-brandon);
  background-color: var(--off-white);
  color: var(--black);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   NAVIGATION
   ========================================== */

.navbar {
  padding: 20px 0;
  background-color: var(--off-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
  color: var(--black);
  text-decoration: none;
}

.nav-brand img {
  height: 50px;
  width: auto;
}

.nav-brand i {
  color: var(--green);
  font-size: 28px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 11px 30px;
  background: var(--white);
  border-radius: var(--border-radius-full);
  box-shadow: var(--shadow-sm);
}

.nav-link {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--border-radius-full);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link:hover {
  background: var(--gradient-teal-light);
}

.nav-link.active {
  background: var(--gradient-teal-light);
}

.nav-link i {
  font-size: 14px;
}

.logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-brandon);
}

.nav-form {
  margin: 0;
}

/* ==========================================
   MAIN CONTENT WRAPPER
   ========================================== */

.main-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--spacing-lg) 20px;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-brandon);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid var(--black);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient-navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(41, 65, 79, 0.35);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary:hover {
  background: var(--off-white);
}

.btn-navy {
  background: var(--gradient-navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-navy:hover {
  box-shadow: 0 8px 20px rgba(41, 65, 79, 0.3);
}

/* IMPROVEMENT #5: Brand-consistent semantic button colors */
.btn-success {
  background: linear-gradient(135deg, #4A7C59 0%, #6B9B7A 100%);
  color: var(--white);
  border-color: #4A7C59;
}

.btn-danger {
  background: linear-gradient(135deg, #8B3A3A 0%, #A85454 100%);
  color: var(--white);
  border-color: #8B3A3A;
}

.btn-warning {
  background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
  color: var(--white);
  border-color: #B8860B;
}

.btn-info {
  background: var(--off-white);
  color: var(--black);
  border-color: var(--black);
}

.btn-info:hover {
  background: var(--white);
}

/* Toggle button for Activate/Stop Quiz */
/* Start button (when quiz is stopped) = Soft Forest Green */
.btn-toggle-stopped {
  background: linear-gradient(135deg, #4A7C59 0%, #6B9B7A 100%);
  color: white;
  border-color: #4A7C59;
}

.btn-toggle-stopped:hover {
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.35);
}

/* Stop button (when quiz is active) = Claret/Wine Red */
.btn-toggle-active {
  background: linear-gradient(135deg, #8B3A3A 0%, #A85454 100%);
  color: white;
  border-color: #8B3A3A;
}

.btn-toggle-active:hover {
  box-shadow: 0 4px 12px rgba(139, 58, 58, 0.35);
}

/* Outline variant for secondary/less prominent actions */
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* Ghost button for tertiary actions */
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.btn-ghost:hover {
  background: rgba(89, 180, 181, 0.1);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 20px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* IMPROVEMENT #3: Focus states for accessibility */
.btn:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.form-control:focus-visible,
.search-input:focus-visible,
.time-input:focus-visible {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(89, 180, 181, 0.3);
}

/* ==========================================
   CARDS
   ========================================== */

.card {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-card);
  padding: var(--spacing-md);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
}

.card-navy {
  background: var(--gradient-navy);
  color: var(--white);
  border-color: var(--navy);
}

.card-teal {
  background: var(--gradient-teal);
  color: var(--white);
  border-color: var(--green);
}

/* ==========================================
   FORMS
   ========================================== */

.form-group {
  margin-bottom: var(--spacing-sm);
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
}

.form-group label i {
  margin-right: 8px;
  color: var(--green);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-brandon);
  font-size: 16px;
  border: 2px solid var(--black);
  border-radius: var(--border-radius-sm);
  background: var(--white);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(89, 180, 181, 0.2);
}

.form-control::placeholder {
  color: #999;
}

/* ==========================================
   AUTH PAGES (Login, Register, Password Reset)
   ========================================== */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  background: var(--off-white);
}

.auth-container {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  padding: 50px 40px;
  width: 100%;
  max-width: 450px;
  text-align: center;
}

.auth-header {
  margin-bottom: var(--spacing-md);
}

.auth-header .auth-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--gradient-teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--black);
}

.auth-header .auth-icon i {
  font-size: 32px;
  color: var(--black);
}

.auth-header h1 {
  font-size: 36px;
  font-weight: 900;
  color: var(--black);
  margin: 0 0 10px 0;
}

.auth-header p {
  font-size: 18px;
  color: var(--navy);
  margin: 0;
}

.auth-form {
  text-align: left;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form .btn {
  width: 100%;
  margin-top: 10px;
}

.auth-footer {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 16px;
}

.auth-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-link {
  display: block;
  text-align: right;
  margin-bottom: 15px;
  font-size: 14px;
}

.auth-link a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

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

/* ==========================================
   ALERTS
   ========================================== */

.alert {
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--spacing-sm);
  font-size: 15px;
  border: 2px solid;
}

.alert ul {
  margin: 0;
  padding-left: 20px;
}

.alert-danger {
  background: #fdf2f2;
  border-color: #8B3A3A;
  color: #8B3A3A;
}

.alert-success {
  background: #f2f8f4;
  border-color: #4A7C59;
  color: #4A7C59;
}

.alert-warning {
  background: #fffbf0;
  border-color: #ffc107;
  color: #856404;
}

.alert-info {
  background: #f0fbff;
  border-color: var(--green);
  color: var(--navy);
}

/* ==========================================
   DASHBOARD
   ========================================== */

.dashboard-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.dashboard-header h1 {
  font-size: 48px;
  font-weight: 900;
  color: var(--black);
  margin: 0 0 10px 0;
}

.dashboard-header p {
  font-size: 20px;
  color: var(--navy);
}

/* Stats Grid - Cutting-edge responsive 5-box layout */
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  justify-content: center;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-md);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex: 1 1 170px;
  max-width: 200px;
  min-width: 150px;
}

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

/* Cohesive color scheme - gradient progression from navy to teal */
.stat-card:nth-child(1) {
  background: linear-gradient(135deg, #29414F 0%, #3a5a6a 100%);
  color: var(--white);
}

.stat-card:nth-child(2) {
  background: linear-gradient(135deg, #3a5a6a 0%, #4a7a8a 100%);
  color: var(--white);
}

.stat-card:nth-child(3) {
  background: linear-gradient(135deg, #4a8a8a 0%, #59B4B5 100%);
  color: var(--white);
}

.stat-card:nth-child(4) {
  background: linear-gradient(135deg, #59B4B5 0%, #6ecbcc 100%);
  color: var(--white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.stat-card:nth-child(5) {
  background: linear-gradient(135deg, #6ecbcc 0%, #8edfe0 100%);
  color: #1a2d36; /* Darker navy for WCAG AA compliance */
}

.stat-card i {
  font-size: 32px;
  margin-bottom: 10px;
  opacity: 0.9;
}

.stat-card h3 {
  font-size: 40px;
  font-weight: 900;
  margin: 0 0 5px 0;
}

.stat-card p {
  font-size: 16px;
  margin: 0;
  opacity: 0.9;
}

/* Search Section */
.search-section {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-card);
}

.search-form {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 14px 18px;
  font-family: var(--font-brandon);
  font-size: 16px;
  border: 2px solid var(--black);
  border-radius: var(--border-radius-full);
  background: var(--off-white);
}

.search-input:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(89, 180, 181, 0.2), 0 4px 12px rgba(89, 180, 181, 0.15);
}

/* Quiz Grid */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.quiz-card {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.quiz-card:hover {
  transform: translateY(-3px);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 15px;
}

.quiz-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--black);
  margin: 0;
  flex: 1;
  line-height: 1.3;
}

.quiz-id {
  font-size: 11px;
  font-family: monospace;
  background: var(--off-white);
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--navy);
  white-space: nowrap;
}

.quiz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 15px;
  font-size: 14px;
  color: var(--navy);
}

.quiz-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(89, 180, 181, 0.1);
  padding: 4px 10px;
  border-radius: var(--border-radius-full);
}

.quiz-meta i {
  color: var(--green);
}

.qr-section {
  text-align: center;
  margin: 15px 0;
}

.qr-code {
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  border: 2px solid var(--black);
}

.qr-placeholder {
  width: 120px;
  height: 120px;
  background: var(--off-white);
  border: 2px dashed var(--navy);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 12px;
  margin: 0 auto;
}

.qr-placeholder i {
  font-size: 24px;
  margin-bottom: 5px;
}

.quiz-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.quiz-actions .btn {
  padding: 8px 12px;
  font-size: 12px;
  border-width: 1px;
  min-width: 80px;
  justify-content: center;
}

/* Ensure consistent button widths on desktop */
@media (min-width: 769px) {
  .quiz-actions {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--spacing-md);
}

.pagination a,
.pagination span {
  padding: 10px 16px;
  border-radius: var(--border-radius-full);
  text-decoration: none;
  font-weight: 700;
  border: 2px solid var(--black);
  transition: all 0.2s ease;
}

.pagination a {
  background: var(--white);
  color: var(--black);
}

.pagination a:hover {
  background: var(--gradient-teal-light);
}

.pagination .current {
  background: var(--gradient-teal);
  color: var(--white);
  border-color: var(--green);
}

/* No Quizzes State */
.no-quizzes {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  color: var(--navy);
}

.no-quizzes i {
  font-size: 64px;
  color: var(--green);
  margin-bottom: var(--spacing-sm);
  opacity: 0.6;
}

.no-quizzes h2 {
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 10px 0;
}

.no-quizzes p {
  font-size: 18px;
  margin-bottom: var(--spacing-sm);
}

/* ==========================================
   CREATE QUIZ PAGE
   ========================================== */

.create-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.create-header h1 {
  font-size: 48px;
  font-weight: 900;
  color: var(--black);
  margin: 0 0 10px 0;
}

.create-header p {
  font-size: 20px;
  color: var(--navy);
}

.create-container {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--spacing-lg);
  max-width: 800px;
  margin: 0 auto;
}

.upload-section {
  text-align: center;
}

.upload-area {
  border: 3px dashed var(--green);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  background: rgba(89, 180, 181, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: var(--spacing-md);
}

.upload-area:hover {
  border-color: var(--navy);
  background: rgba(89, 180, 181, 0.1);
}

.upload-area.dragover {
  border-color: var(--navy);
  background: rgba(89, 180, 181, 0.15);
  transform: scale(1.01);
}

.upload-icon {
  font-size: 64px;
  color: var(--green);
  margin-bottom: 15px;
}

.upload-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.upload-subtext {
  font-size: 16px;
  color: var(--navy);
}

.file-input {
  display: none;
}

.time-setting-section {
  background: var(--off-white);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.time-label {
  display: block;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.time-label i {
  color: var(--green);
  margin-right: 8px;
}

.time-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-brandon);
  font-size: 16px;
  border: 2px solid var(--black);
  border-radius: var(--border-radius-sm);
  margin-bottom: 8px;
}

.time-input:focus {
  outline: none;
  border-color: var(--green);
}

.time-help {
  font-size: 14px;
  color: var(--navy);
}

/* Preview Section */
.preview-section {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--off-white);
  border-radius: var(--border-radius-sm);
  display: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.preview-section.show {
  display: block;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.preview-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--black);
  margin: 0;
}

.preview-count {
  background: var(--gradient-teal);
  color: var(--white);
  padding: 6px 16px;
  border-radius: var(--border-radius-full);
  font-size: 14px;
  font-weight: 700;
}

.question-preview {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-sm);
  margin-bottom: 15px;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
}

.question-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 12px;
}

.options-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.option-item {
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--off-white);
  border-radius: 8px;
  border-left: 4px solid transparent;
  font-size: 14px;
}

.option-item.correct {
  background: rgba(74, 124, 89, 0.12);
  border-left-color: #4A7C59;
  color: #4A7C59;
  font-weight: 700;
}

/* Template Section */
.template-section {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--off-white);
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.template-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--black);
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.template-card {
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-sm);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.template-icon {
  font-size: 40px;
  color: var(--green);
  margin-bottom: 10px;
}

.template-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 5px;
}

.template-desc {
  font-size: 14px;
  color: var(--navy);
}

/* Loading State */
.loading {
  display: none;
  text-align: center;
  padding: var(--spacing-md);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--off-white);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   MODAL
   ========================================== */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: var(--white);
  margin: 5% auto;
  padding: var(--spacing-lg);
  border: 2px solid var(--black);
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h2 {
  font-size: 28px;
  font-weight: 900;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--navy);
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--black);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  z-index: 10000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  border: 2px solid;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: #f2f8f4;
  border-color: #4A7C59;
  color: #4A7C59;
  box-shadow: 3px 3px 0 rgba(74, 124, 89, 0.3);
}

.toast.error {
  background: #fdf2f2;
  border-color: #8B3A3A;
  color: #8B3A3A;
  box-shadow: 3px 3px 0 rgba(139, 58, 58, 0.3);
}

/* ==========================================
   UTILITIES
   ========================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 15px;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 15px;
  }

  .nav-link {
    padding: 6px 12px;
    font-size: 14px;
  }

  .main-content {
    padding: var(--spacing-md) 15px;
  }

  .dashboard-header h1,
  .create-header h1 {
    font-size: 32px;
  }

  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .auth-container {
    padding: 30px 25px;
  }

  .auth-header h1 {
    font-size: 28px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-input {
    width: 100%;
  }

  .quiz-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stat-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .stat-card h3 {
    font-size: 32px;
  }

  .quiz-actions {
    grid-template-columns: 1fr;
  }

  .template-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   IMPROVEMENT #1: Mobile Hamburger Menu
   ========================================== */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  background: none;
  border: none;
  z-index: 1001;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -7px);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-container {
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ==========================================
   IMPROVEMENT #4: Password Visibility Toggle
   ========================================== */

.password-wrapper {
  position: relative;
}

.password-wrapper .form-control {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--navy);
  font-size: 18px;
  padding: 5px;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--green);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================
   IMPROVEMENT #2: Quiz Action Dropdown
   ========================================== */

.quiz-actions-primary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quiz-actions-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: var(--white);
  border: 1px solid var(--navy);
  border-radius: var(--border-radius-full);
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--font-brandon);
  font-weight: 700;
  font-size: 12px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.dropdown-toggle:hover {
  background: var(--off-white);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-card);
  min-width: 150px;
  padding: 8px 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(5px);
}

/* Dropdown caret arrow */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  width: 14px;
  height: 14px;
  background: var(--white);
  border-left: 1px solid var(--black);
  border-top: 1px solid var(--black);
  transform: rotate(45deg);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--black);
  text-decoration: none;
  transition: background 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font-brandon);
  text-align: left;
}

.dropdown-item i {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.dropdown-item:hover {
  background: var(--off-white);
}

.dropdown-item.danger {
  color: #8B3A3A;
}

.dropdown-item.danger:hover {
  background: #fdf2f2;
}

.dropdown-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 8px 0;
}

/* ==========================================
   ADDITIONAL UX IMPROVEMENTS
   ========================================== */

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--border-radius-full);
  z-index: 10000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 10px;
}

/* Delete confirmation styling */
.btn-danger-outline {
  background: transparent;
  color: #8B3A3A;
  border-color: #8B3A3A;
}

.btn-danger-outline:hover {
  background: #8B3A3A;
  color: var(--white);
}

/* Improved empty state */
.empty-state {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--spacing-md);
  background: var(--gradient-teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--black);
}

.empty-state-icon i {
  font-size: 48px;
  color: var(--navy);
}

.empty-state h2 {
  font-size: 28px;
  font-weight: 900;
  color: var(--black);
  margin: 0 0 10px;
}

.empty-state p {
  font-size: 18px;
  color: var(--navy);
  margin: 0 0 var(--spacing-md);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--off-white) 25%, #e8e8e8 50%, var(--off-white) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--border-radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 300px;
  margin-bottom: var(--spacing-md);
}

.skeleton-text {
  height: 20px;
  margin-bottom: 10px;
}

.skeleton-text.short {
  width: 60%;
}
