/*
 * Arkride Quiz System - Consolidated CSS
 * All fonts, layout, themes, loading, and transitions in a single file
 */

/* ============================================
   FONTS
   ============================================ */

/* Poppins */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Poppins');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Poppins');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Poppins');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Poppins');
}

/* Orbitron removed - using Minion Pro instead */

/* Roboto Mono */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Roboto Mono Light'), local('RobotoMono-Light'),
       url('/fonts/roboto-mono/RobotoMono-Light.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Roboto Mono Regular'), local('RobotoMono-Regular'),
       url('/fonts/roboto-mono/RobotoMono-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Roboto Mono Medium'), local('RobotoMono-Medium'),
       url('/fonts/roboto-mono/RobotoMono-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Roboto Mono SemiBold'), local('RobotoMono-SemiBold'),
       url('/fonts/roboto-mono/RobotoMono-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Roboto Mono Bold'), local('RobotoMono-Bold'),
       url('/fonts/roboto-mono/RobotoMono-Bold.ttf') format('truetype');
}

/* Minion Pro - Uses system-installed Minion Pro if available, otherwise falls back to serif in font-family */
@font-face {
  font-family: 'Minion Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Minion Pro'), local('MinionPro-Regular'), local('MinionPro');
}

@font-face {
  font-family: 'Minion Pro';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: local('Minion Pro Italic'), local('MinionPro-It');
}

@font-face {
  font-family: 'Minion Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Minion Pro Bold'), local('MinionPro-Bold');
}

@font-face {
  font-family: 'Minion Pro';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: local('Minion Pro Bold Italic'), local('MinionPro-BoldIt');
}

/* ============================================
   LAYOUT
   ============================================ */

* { box-sizing: border-box; }

 /* Use BODY as the single scroll container (prevents "double/inner" scrollbars in Chromium). */
 html { 
   overflow-x: hidden; 
   overflow-y: hidden;
   height: 100%;
   max-width: 100vw;
   /* Avoid creating a persistent "inner gutter" that looks like a second scrollbar in Chrome */
   scrollbar-gutter: auto;
 }

@media (max-width: 767px) {
  html { overflow-y: hidden; }
}

/* Themed scrollbars */
html[data-theme^="style_"] { scrollbar-width: auto !important; scrollbar-color: var(--accent, #888) rgba(255,255,255,0.08); }
html[data-theme^="style_"] body::-webkit-scrollbar { width: 12px !important; height: 12px !important; display: block !important; }
html[data-theme^="style_"] body::-webkit-scrollbar-track { background: rgba(255,255,255,0.08); border-radius: 8px; }
html[data-theme^="style_"] body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent, #777) 0%, var(--accent-2, var(--accent, #777)) 100%);
  border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(0,0,0,0.25);
}
html[data-theme^="style_"] body::-webkit-scrollbar-thumb:hover { filter: brightness(1.12); }

 body {
  margin: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto !important; /* Enable scrolling when content exceeds viewport */
  max-width: 100vw;
  background-image: url('../img/bg3.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  position: relative;
}

@media (max-width: 1199.98px){
  body{
    background-attachment: scroll;
    background-position: center top;
  }
}

.hidden { display: none; }

/* Front page hero */
.hero { display: grid; place-items: center; min-height: 70.4vh; padding: 24px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1fr; gap: 12px; width: min(1280px, calc(100% - 48px)); margin: 0 auto; min-height: clamp(432px, 52.8vh, 608px); padding: 48px 56px; transform: translateY(16px); }
.title-img { display:block; width: clamp(300px, 34vw, 520px); margin: 0 auto 4px; }
.greeting { text-align:center; max-width: 640px; margin: 0 auto; transform: translateY(-40px); }
.subtitle { margin: 0 0 16px; font-size: clamp(16px, 1.8vw, 22px); line-height: 1.38; }
.greeting .subtitle { margin: 0; }
.greeting .subtitle + .subtitle { margin-top: 8px; }
.greeting .subtitle:last-of-type { margin-bottom: 14px; }
.greeting .actions { margin-top: 20px; }
.mascot { position:absolute; top:46%; right:0; transform: translateY(-50%); height: clamp(280px, 46vh, 560px); width:auto; pointer-events:none; user-select:none; z-index: 0; }
.hero-inner .title-img,
.hero-inner .greeting,
.hero-inner .actions { position: relative; z-index: 1; }

/* Buttons */
.actions { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }
.btn { 
  display:inline-flex; 
  align-items:center; 
  justify-content:center; 
  text-decoration:none; 
  position: relative;
  z-index: 2;
}
.btn.small { min-height: 32px; }

/* Student Login Layout */
.student-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 140px);
  padding: 20px;
  max-width: min(1280px, 95vw);
  width: 100%;
  margin: 40px auto;
}

.student-login-card {
  width: 100%;
  max-width: clamp(880px, 72vw, 1180px);
  padding: 36px;
  position: relative;
}

.student-login-title {
  text-align: left;
  font-size: clamp(28px, 3.2vw, 42px);
  margin: 0 0 20px 0;
}

.student-login-form { display: block; }
.student-field-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: center; }
.student-field { min-width: 240px; }
.student-input { width: 100%; padding: 14px 16px; font-size: 16px; }
.student-login-buttons { display: inline-flex; gap: 12px; justify-self: end; }
.student-login-btn, .student-back-btn { min-width: 120px; min-height: 48px; font-size: 15px; font-weight: 700; }

@media (max-width: 780px) {
  .student-field-row { 
    grid-template-columns: 1fr; 
    gap: 12px;
  }
  .student-login-buttons { 
    justify-self: stretch; 
    justify-content: center; 
    flex-wrap: wrap;
  }
}

.student-register-note { text-align: center; margin-top: 20px; font-size: 16px; }

.note,
.default-password-message {
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  text-align: center;
}

.container { max-width: 900px; margin: 40px auto; padding: 24px; }

/* Student Registration Layout */
.student-register-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 140px);
  padding: 20px;
  max-width: min(1280px, 95vw);
  width: 100%;
  margin: 40px auto;
}

.student-register-card {
  width: 100%;
  max-width: clamp(880px, 72vw, 1180px);
  padding: 36px;
  position: relative;
}

.student-register-form { display: block; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grid-nested-2 {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 10px;
}

.input-append {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-append input {
  flex: 1 1 auto;
}

.form-input,
.themed-select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  line-height: 1.2;
}

.themed-select {
  appearance: none;
  padding-right: 36px;
}

.input-append .btn {
  min-height: 52px;
  height: 52px;
  padding: 0 18px;
}

.pw-input {
  min-height: 52px;
  padding: 0 44px 0 14px;
}

.pw-input-wrap { position: relative; display: flex; align-items: center; }
.pw-input { min-height: 50px; padding: 12px 44px 12px 16px; font-size: 1rem; line-height: 1.4; }
.pw-input-wrap .pw-eye {
  all: unset;
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: var(--text, #e0e6ed) !important;
  opacity: 0.88 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
  border-radius: 4px !important;
  appearance: none !important;
}
.pw-input-wrap .pw-eye:hover { opacity: 1 !important; }
.pw-input-wrap .pw-eye:focus { outline: none !important; box-shadow: 0 0 0 2px rgba(255,255,255,.2) !important; border-radius: 4px !important; }
.pw-input-wrap .pw-eye svg { width: 18px !important; height: 18px !important; stroke: currentColor !important; fill: none !important; stroke-width: 2px !important; }
.pw-eye .eye-off { display: none; }
.pw-eye.showing .eye-on { display: none; }
.pw-eye.showing .eye-off { display: block; }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.form-actions .btn {
  min-width: 140px;
  flex: 0 0 auto;
}
.pw-input-wrap .pw-eye .eye-off { display: none; }
.pw-input-wrap .pw-eye.is-visible .eye-on { display: none; }
.pw-input-wrap .pw-eye.is-visible .eye-off { display: block; }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-start;
}

.note {
  display: none;
  margin-bottom: 12px;
  padding: 10px 14px;
}

.note.small {
  font-size: 13px;
}

.note.error {
  display: block;
  background-color: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #dc3545;
  border-radius: 6px;
}

.note.info {
  display: block;
  background-color: rgba(13, 110, 253, 0.15);
  border: 1px solid rgba(13, 110, 253, 0.4);
  color: #0d6efd;
  border-radius: 6px;
}

@media (max-width: 1000px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .grid-nested-2 {
    grid-template-columns: 1fr 160px;
  }
}

/* Mobile optimizations for student pages */
@media (max-width: 576px) {
  .student-login-container {
    padding: 12px;
    margin: 20px auto;
  }
  
  .student-login-card {
    padding: 20px;
    max-width: 100%;
  }
  
  .student-login-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 16px;
  }
  
  .student-field-row {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .student-field {
    min-width: 0 !important;
  }
  
  .student-login-buttons {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  
  .student-login-btn,
  .student-back-btn {
    width: 100%;
    min-width: 0;
  }
  
  .student-register-container {
    padding: 12px;
  }
  
  .student-register-card {
    padding: 16px;
  }
  
  .form-grid {
    gap: 12px;
  }
  
  .grid-nested-2 {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  
  .grid-nested-2 .btn {
    width: 100%;
    min-height: 48px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .form-actions .btn {
    width: 100%;
    min-width: 0;
  }
  
  .student-input,
  .form-input,
  .themed-select {
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
  }
  
  /* Ensure touch targets are large enough */
  .student-login-btn,
  .student-back-btn,
  .btn,
  button[type="submit"],
  button[type="button"] {
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation; /* Prevents double-tap zoom */
  }
  
  /* Better spacing for mobile */
  .default-password-message,
  .student-register-note {
    font-size: 12px;
    padding: 10px;
    margin-top: 16px;
  }
  
  /* Landscape orientation adjustments */
  @media (max-width: 576px) and (orientation: landscape) {
    .student-login-container {
      min-height: auto;
      padding: 16px;
    }
    
    .student-login-card,
    .student-register-card {
      padding: 16px;
    }
    
    .student-login-title {
      font-size: 22px;
      margin-bottom: 12px;
    }
    
    .form-grid {
      gap: 10px;
    }
  }
}

@media (max-width: 375px) {
  .student-login-card,
  .student-register-card,
  .student-portal-card {
    padding: 12px;
  }
  
  .student-login-title {
    font-size: 20px;
  }
  
  .form-group {
    gap: 4px;
  }
  
  .form-grid {
    gap: 10px;
  }
  
  .student-portal-container {
    padding: 8px;
  }
}

/* Student portal mobile styles */
@media (max-width: 576px) {
  .student-portal-container {
    padding: 12px;
  }
  
  .student-portal-card {
    padding: 16px;
  }
  
  .student-portal-card .form-actions {
    flex-direction: column;
  }
  
  .student-portal-card .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 640px){ .hero{ min-height: 100vh; } .hero-inner{ padding: 32px; min-height: 560px; gap: 10px; transform:none; } .mascot{ height: 300px; right: 8px; } .btn{ width: 100%; max-width: 320px; } .greeting{ text-align:center; transform:none; } }

/* ============================================
   LOADING OVERLAY
   ============================================ */

.arkride-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (max-width: 1199.98px){
  .arkride-loading-overlay{
    width: 100vw;
    height: 100vh;
    left: 0;
    right: auto;
    top: 0;
    bottom: auto;
    transform: translate3d(0,0,0);
  }
  .ring{
    margin-left: auto;
    margin-right: auto;
  }
}

.arkride-loading-overlay.active {
  display: flex;
  opacity: 1;
}

.loading-message {
  font-family: 'Minion Pro', serif;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 6px;
  color: #00ffcc;
  text-shadow: 
    0 0 20px rgba(0, 255, 204, 0.8),
    0 0 40px rgba(0, 255, 204, 0.5);
  margin-bottom: 40px;
  animation: pulse-text 1.5s ease-in-out infinite;
  text-align: center;
  min-height: 30px;
  padding: 0 20px;
  width: 100%;
  display: none; /* Hide default top message */
}

.ring {
  display: inline-block;
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

/* Keep ring text visible even when showing custom message */

/* Rotating circle animation - border rotates around the text */
.ring:after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: #00ffcc;
  border-right-color: #00ffcc;
  animation: ring-rotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 
    0 0 20px rgba(0, 255, 204, 0.5),
    inset 0 0 20px rgba(0, 255, 204, 0.1);
  z-index: 1;
  box-sizing: border-box;
}

/* Text inside the ring - centered and positioned on top for visibility */
.ring span {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Minion Pro', serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #00ffcc;
  text-shadow: 
    0 0 10px rgba(0, 255, 204, 0.8),
    0 0 20px rgba(0, 255, 204, 0.5);
  animation: pulse-text 1.2s ease-in-out infinite;
  z-index: 2;
  width: 100px;
  text-align: center;
  line-height: 1.3;
  padding: 0;
  margin: 0;
  pointer-events: none;
}

@keyframes ring-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading-dots {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 20px;
}

.loading-dots div {
  position: absolute;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00ffcc;
  animation: loading-dots-animation 1.2s linear infinite;
}

.loading-dots div:nth-child(1) { left: 8px; animation-delay: 0s; }
.loading-dots div:nth-child(2) { left: 32px; animation-delay: -0.4s; }
.loading-dots div:nth-child(3) { left: 56px; animation-delay: -0.8s; }

@keyframes loading-dots-animation {
  0% { transform: scale(0); opacity: 1; }
  40% { transform: scale(1); opacity: 1; }
  80%, 100% { transform: scale(0); opacity: 0; }
}

.loading-progress {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00ffcc, #ff00ff);
  border-radius: 2px;
  animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ============================================
   ARKRIDE THEME
   ============================================ */

:root {
  --arkride-primary: #00ffcc;
  --arkride-secondary: #ff00ff;
  --arkride-accent: #ffc107;
  --arkride-background: #0a0a0a;
  --arkride-surface: #1a1a1a;
  --arkride-surface-light: #2a2a2a;
  --arkride-text: #e0e0e0;
  --arkride-text-dim: #a0a0a0;
  --arkride-border: rgba(0, 255, 204, 0.3);
  --arkride-error: #ff4444;
  --arkride-success: #00ff00;
  --arkride-warning: #ffcc00;
  
  --font-primary: 'Poppins', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
  --font-display: 'Minion Pro', serif;
  
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  --shadow-glow: 0 0 20px rgba(0, 255, 204, 0.5);
  --shadow-glow-intense: 0 0 30px rgba(0, 255, 204, 0.8);
  --transition-default: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background: var(--arkride-background);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(0, 255, 204, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a0a 0%, #1a0a1a 100%);
  color: var(--arkride-text);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--arkride-primary);
  text-shadow: 0 0 10px currentColor;
}

.subtitle {
  font-family: var(--font-primary);
  font-weight: 400;
  color: var(--arkride-text);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-inner {
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--arkride-border);
  border-radius: 20px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    var(--shadow-glow);
}

.title-img {
  filter: drop-shadow(0 0 20px rgba(0, 255, 204, 0.5));
}

.btn {
  background: linear-gradient(135deg, var(--arkride-primary), var(--arkride-secondary));
  border: 1px solid var(--arkride-border);
  border-radius: 8px;
  color: #000;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-default);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.4),
    var(--shadow-glow-intense);
}

.btn:hover:before {
  left: 100%;
}

.btn:active {
  transform: translateY(0);
}

.btn-teacher {
  background: linear-gradient(135deg, #00ffcc, #00aaff);
}

.btn-student {
  background: linear-gradient(135deg, #ff00ff, #ff00aa);
}

.btn-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.5));
}

.license-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  backdrop-filter: blur(5px);
}

.license-badge.activated {
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid rgba(0, 255, 0, 0.3);
  color: var(--arkride-success);
}

.license-badge.not-activated {
  background: rgba(255, 204, 0, 0.1);
  border: 1px solid rgba(255, 204, 0, 0.3);
  color: var(--arkride-warning);
}

.activate-link {
  color: var(--arkride-accent);
  font-weight: 600;
  transition: var(--transition-fast);
}

.activate-link:hover {
  color: var(--arkride-primary);
  text-shadow: 0 0 5px currentColor;
}

.alert {
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid var(--arkride-border);
  color: var(--arkride-text);
}

.alert-info {
  border-color: rgba(0, 255, 204, 0.3);
  background: rgba(0, 255, 204, 0.05);
}

.alert-warning {
  border-color: rgba(255, 204, 0, 0.3);
  background: rgba(255, 204, 0, 0.05);
}

.alert-danger {
  border-color: rgba(255, 68, 68, 0.3);
  background: rgba(255, 68, 68, 0.05);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--arkride-primary), var(--arkride-secondary));
  border-radius: 6px;
  border: 2px solid var(--arkride-background);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--arkride-accent), var(--arkride-primary));
}

@keyframes glow {
  0% { box-shadow: 0 0 5px var(--arkride-primary); }
  50% { box-shadow: 0 0 20px var(--arkride-primary), 0 0 30px var(--arkride-primary); }
  100% { box-shadow: 0 0 5px var(--arkride-primary); }
}

.glow-effect {
  animation: glow 2s ease-in-out infinite;
}

::selection {
  background: var(--arkride-primary);
  color: var(--arkride-background);
}

::-moz-selection {
  background: var(--arkride-primary);
  color: var(--arkride-background);
}

*:focus {
  outline: 2px solid var(--arkride-accent);
  outline-offset: 2px;
}

a {
  color: var(--arkride-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--arkride-accent);
  text-shadow: 0 0 5px currentColor;
}

/* ============================================
   STYLE 1 (Dark Steel Theme)
   ============================================ */

html[data-theme="style_1"] { 
  --accent: #ffffff; 
  --accent-2: #64b5f6; 
  --panel: rgba(15, 18, 25, 0.95); 
  --text: #ffffff; 
  --hero-text: #ffffff;
  --display: 'Helvetica Neue', 'Arial', sans-serif;
  --text-font: 'Helvetica Neue', 'Arial', sans-serif;
  --glow: rgba(100, 181, 246, 0.1);
  --accent-bg: rgba(100, 181, 246, 0.05);
  --accent-border: rgba(255, 255, 255, 0.2);
  --placeholder-color: rgba(255, 255, 255, 0.4);
  --dark-bg: #0f1218;
  --dark-panel: rgba(20, 25, 35, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.15);
}

html[data-theme="style_1"] .subtitle { 
  color: var(--hero-text); 
  font-family: var(--text-font); 
  font-weight: 300;
  letter-spacing: 1px;
}

html[data-theme="style_1"] .hero-inner { 
  background: var(--panel); 
  border: 1px solid var(--accent-border); 
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}

html[data-theme="style_1"] .teacher-login-card,
html[data-theme="style_1"] .student-login-card,
html[data-theme="style_1"] .student-register-card {
  background: rgba(20, 25, 35, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
  border-radius: 8px !important;
  backdrop-filter: blur(10px) !important;
}

html[data-theme="style_1"] .teacher-login-title,
html[data-theme="style_1"] .student-login-title,
html[data-theme="style_1"] .section-title {
  color: #ffffff !important;
  font-family: 'Minion Pro', serif !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
}

html[data-theme="style_1"] .teacher-input,
html[data-theme="style_1"] .teacher-password-input,
html[data-theme="style_1"] .student-input,
html[data-theme="style_1"] .form-input {
  background: rgba(30, 35, 45, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  padding: 14px 16px !important;
  font-size: 16px !important;
  width: 100%;
  box-sizing: border-box;
}

html[data-theme="style_1"] .teacher-input:focus,
html[data-theme="style_1"] .teacher-password-input:focus,
html[data-theme="style_1"] .student-input:focus,
html[data-theme="style_1"] .form-input:focus {
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
  outline: none !important;
  background: rgba(35, 40, 50, 0.9) !important;
}

html[data-theme="style_1"] .teacher-input::placeholder,
html[data-theme="style_1"] .teacher-password-input::placeholder,
html[data-theme="style_1"] .student-input::placeholder,
html[data-theme="style_1"] .form-input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Themed select dropdowns for style_1 */
html[data-theme="style_1"] .themed-select {
  background: rgba(30, 35, 45, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  padding: 14px 40px 14px 16px !important;
  font-size: 16px !important;
  width: 100%;
  box-sizing: border-box;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  cursor: pointer;
}

html[data-theme="style_1"] .themed-select:focus {
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
  outline: none !important;
  background-color: rgba(35, 40, 50, 0.9) !important;
}

/* Dropdown options - these need explicit colors */
html[data-theme="style_1"] .themed-select option {
  background: #1a1f2e !important;
  color: #ffffff !important;
  padding: 12px 16px !important;
}

html[data-theme="style_1"] .themed-select option:hover,
html[data-theme="style_1"] .themed-select option:checked,
html[data-theme="style_1"] .themed-select option:focus {
  background: #2d3448 !important;
  color: #ffffff !important;
}

 .sheet-controls { display:flex; align-items:center; gap:10px; margin-bottom:15px; }
 .sheet-controls label { color:#95a5a6; font-weight:600; margin-right:6px; }
 .sheet-title { color:#ffffff; font-weight:700; margin:6px 0 8px; font-family:'Orbitron', sans-serif; }
 .sheet-table { width:100%; border-collapse:collapse; font-size:14px; color:#e0e6ed; }
 .sheet-table th, .sheet-table td { border:1px solid rgba(255, 255, 255,.2); padding:6px 8px; text-align:center; }
 .sheet-table th { background: rgba(255, 255, 255,.08); color:#ffffff; }
 .sheet-table .metric-col { text-align:left; white-space:nowrap; }
 .sheet-table .num { text-align:right; }

html[data-theme="style_1"] .student-register-note {
  color: rgba(255, 255, 255, 0.8) !important;
}

html[data-theme="style_1"] .student-register-link {
  color: #8b949e !important;
  font-weight: 600 !important;
}

html[data-theme="style_1"] .student-register-link:hover {
  color: #c9d1d9 !important;
  text-shadow: 0 0 8px rgba(201, 209, 217, 0.5) !important;
}

html[data-theme="style_1"] .alert {
  border-radius: 6px !important;
  background: rgba(30, 35, 45, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="style_1"] .alert-info {
  background: rgba(52, 152, 219, 0.15) !important;
  border-color: rgba(52, 152, 219, 0.4) !important;
  color: #6ba3e8 !important;
}

html[data-theme="style_1"] .alert-success {
  background: rgba(46, 204, 113, 0.15) !important;
  border-color: rgba(46, 204, 113, 0.4) !important;
  color: #5dd39e !important;
}

html[data-theme="style_1"] .btn,
html[data-theme="style_1"] .btn-primary,
html[data-theme="style_1"] .btn-secondary,
html[data-theme="style_1"] .toolbar-btn,
html[data-theme="style_1"] .teacher-login-btn,
html[data-theme="style_1"] .teacher-back-btn,
html[data-theme="style_1"] .student-login-btn,
html[data-theme="style_1"] .student-back-btn,
html[data-theme="style_1"] button[type="button"],
html[data-theme="style_1"] input[type="submit"],
html[data-theme="style_1"] input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  outline: none;
  font-size: 14px;
  box-sizing: border-box;
  border-radius: 4px;
  padding: 12px 24px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  text-shadow: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--text-font);
  font-weight: 500;
  letter-spacing: 1px;
}

html[data-theme="style_1"] .btn:hover,
html[data-theme="style_1"] .btn:focus,
html[data-theme="style_1"] .btn-primary:hover,
html[data-theme="style_1"] .btn-primary:focus,
html[data-theme="style_1"] .btn-secondary:hover,
html[data-theme="style_1"] .btn-secondary:focus,
html[data-theme="style_1"] .toolbar-btn:hover,
html[data-theme="style_1"] .toolbar-btn:focus,
html[data-theme="style_1"] .teacher-login-btn:hover,
html[data-theme="style_1"] .teacher-login-btn:focus,
html[data-theme="style_1"] .teacher-back-btn:hover,
html[data-theme="style_1"] .teacher-back-btn:focus,
html[data-theme="style_1"] .student-login-btn:hover,
html[data-theme="style_1"] .student-login-btn:focus,
html[data-theme="style_1"] .student-back-btn:hover,
html[data-theme="style_1"] .student-back-btn:focus,
html[data-theme="style_1"] button[type="button"]:hover,
html[data-theme="style_1"] button[type="button"]:focus,
html[data-theme="style_1"] input[type="submit"]:hover,
html[data-theme="style_1"] input[type="submit"]:focus,
html[data-theme="style_1"] input[type="button"]:hover,
html[data-theme="style_1"] input[type="button"]:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

html[data-theme="style_1"] .btn:active,
html[data-theme="style_1"] .btn-primary:active,
html[data-theme="style_1"] .btn-secondary:active,
html[data-theme="style_1"] .toolbar-btn:active,
html[data-theme="style_1"] .teacher-login-btn:active,
html[data-theme="style_1"] .teacher-back-btn:active,
html[data-theme="style_1"] .student-login-btn:active,
html[data-theme="style_1"] .student-back-btn:active,
html[data-theme="style_1"] .nav-button:active,
html[data-theme="style_1"] button[type="button"]:active,
html[data-theme="style_1"] input[type="submit"]:active,
html[data-theme="style_1"] input[type="button"]:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  text-decoration: none !important;
}

html[data-theme="style_1"] body {
  background: #0f1218;
  background-image: url('../img/bg3.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  color: #ffffff;
}

@media (max-width: 1199.98px){
  html[data-theme="style_1"] body{
    background-attachment: scroll;
    background-position: center top;
  }
}

html[data-theme="style_1"] .dashboard-nav-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: rgba(15, 18, 25, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  overflow: visible;
  z-index: 1000 !important;
  backdrop-filter: blur(10px);
  padding: 12px 16px !important;
}

html[data-theme="style_1"] .nav-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: none;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: none;
  text-decoration: none !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding: 8px 16px !important;
}

html[data-theme="style_1"] .nav-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  text-shadow: none;
  text-decoration: none !important;
}

html[data-theme="style_1"] .nav-button.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  text-shadow: none;
  text-decoration: none !important;
}

html[data-theme="style_1"] .nav-button:link,
html[data-theme="style_1"] .nav-button:visited,
html[data-theme="style_1"] .nav-button:focus {
  text-decoration: none !important;
}

html[data-theme="style_1"] .nav-item.dropdown {
  position: relative;
}

html[data-theme="style_1"] .nav-item.dropdown:hover .dropdown-menu,
html[data-theme="style_1"] .nav-item.dropdown .dropdown-toggle.open + .dropdown-menu,
html[data-theme="style_1"] .nav-item.dropdown .dropdown-menu.show {
  display: block;
}

html[data-theme="style_1"] .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: 100%;
  background: rgba(20, 25, 35, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: -1px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  border-radius: 0;
  backdrop-filter: blur(10px);
}

html[data-theme="style_1"] .dropdown-menu.show {
  display: block;
}

html[data-theme="style_1"] .dropdown-item {
  display: block;
  padding: 8px 12px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  font-family: var(--text-font);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}

html[data-theme="style_1"] .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding-left: 17px;
  text-decoration: none;
}

html[data-theme="style_1"] .dropdown-item.logout-item {
  color: #ff4444;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

html[data-theme="style_1"] .dropdown-item.logout-item:hover {
  background: rgba(255, 68, 68, 0.1);
  color: #ff6666;
}

html[data-theme="style_1"] .dashboard-content {
  background: transparent;
  color: #ffffff;
}

html[data-theme="style_1"] .section-card,
html[data-theme="style_1"] .report-wrapper,
html[data-theme="style_1"] .filters-panel {
  background: var(--dark-panel);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}

html[data-theme="style_1"] .welcome-panel {
  background: rgba(20, 25, 35, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 20px 50px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 20px 24px;
  width: 50%;
  margin: 24px auto;
  text-align: center;
}

@media (max-width: 991px) {
  html[data-theme="style_1"] .welcome-panel {
    width: 90%;
  }
}

html[data-theme="style_1"] .welcome-panel h2 {
  font-family: var(--text-font);
  color: #ffffff;
  text-shadow: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  font-size: 28px;
  margin-bottom: 20px;
}

html[data-theme="style_1"] .welcome-panel p {
  font-size: 16px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="style_1"] h1,
html[data-theme="style_1"] h2,
html[data-theme="style_1"] h3,
html[data-theme="style_1"] h4,
html[data-theme="style_1"] h5,
html[data-theme="style_1"] h6 {
  color: #ffffff;
  text-shadow: none;
  font-weight: 500;
  font-family: var(--text-font);
  letter-spacing: 1px;
}

html[data-theme="style_1"] h1 {
  font-size: 2.2em;
  font-weight: 600;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

html[data-theme="style_1"] h2 {
  font-size: 1.8em;
  font-weight: 500;
  color: #ffffff;
  margin-top: 30px;
  margin-bottom: 15px;
}

html[data-theme="style_1"] h3 {
  font-size: 1.4em;
  font-weight: 500;
  color: #ffffff;
}

html[data-theme="style_1"] table:not(.grades-table):not(.attendance-table) {
  background: var(--dark-panel);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  font-family: var(--text-font);
}

html[data-theme="style_1"] thead {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

html[data-theme="style_1"] tbody tr {
  transition: background 0.2s ease;
}

html[data-theme="style_1"] tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="style_1"] tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme="style_1"] tbody tr:nth-child(even):hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="style_1"] td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: var(--text-font);
}

html[data-theme="style_1"] input[type="text"],
html[data-theme="style_1"] input[type="number"],
html[data-theme="style_1"] input[type="email"],
html[data-theme="style_1"] input[type="password"],
html[data-theme="style_1"] select,
html[data-theme="style_1"] textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: var(--text-font);
  border-radius: 4px;
  transition: all 0.2s ease;
}

html[data-theme="style_1"] input:focus,
html[data-theme="style_1"] select:focus,
html[data-theme="style_1"] textarea:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

html[data-theme="style_1"] input::placeholder,
html[data-theme="style_1"] textarea::placeholder {
  color: var(--placeholder-color);
}

html[data-theme="style_1"] .arkride-loading-overlay {
  background: rgba(0, 0, 0, 0.9);
}

html[data-theme="style_1"] .arkride-global-clock {
  position: fixed !important;
  top: 80px !important;
  right: 10px !important;
  z-index: 1200 !important;
  text-align: right;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'Roboto Mono', 'Courier New', monospace;
  color: #e0e6ed;
  border: 1px solid rgba(255, 255, 255, 0.15);
  line-height: 1.1;
  user-select: none;
}

html[data-theme="style_1"] .arkride-global-clock .date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8) !important;
  font-family: 'Roboto Mono', 'Courier New', monospace;
}

html[data-theme="style_1"] .arkride-global-clock .time {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 0 5px rgba(255, 193, 7, 0.45);
}

@media (max-width: 576px) {
  html[data-theme="style_1"] .arkride-global-clock {
    top: 6px !important;
    right: 6px !important;
    padding: 4px 8px;
  }
  html[data-theme="style_1"] .arkride-global-clock .date {
    font-size: 11px;
  }
  html[data-theme="style_1"] .arkride-global-clock .time {
    font-size: 13px;
  }
}

html[data-theme="style_1"] .theme-modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}

html[data-theme="style_1"] .theme-modal-content {
  background: rgba(20, 25, 35, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

html[data-theme="style_1"] .theme-modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

html[data-theme="style_1"] .theme-modal-header h2 {
  color: #ffffff;
}

html[data-theme="style_1"] .theme-modal-close {
  color: #ffffff;
}

html[data-theme="style_1"] .theme-modal-close:hover {
  color: #ffffff;
  opacity: 0.7;
}

html[data-theme="style_1"] .theme-option {
  background: rgba(25, 30, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

html[data-theme="style_1"] .theme-option:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  background: rgba(35, 40, 50, 0.7);
}

html[data-theme="style_1"] .theme-option.active {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
  background: rgba(45, 50, 60, 0.8);
}

html[data-theme="style_1"] .theme-info h3 {
  color: #ffffff;
}

html[data-theme="style_1"] .theme-info p {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--text-font);
}

html[data-theme="style_1"] body,
html[data-theme="style_1"] p,
html[data-theme="style_1"] li,
html[data-theme="style_1"] span,
html[data-theme="style_1"] div:not(.dashboard-nav-container):not(.nav-button) {
  font-family: var(--text-font);
  color: #ffffff;
}

html[data-theme="style_1"] .grades-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(20, 25, 35, 0.98);
  color: #ffffff;
}

html[data-theme="style_1"] .grades-table .col-no,
html[data-theme="style_1"] .grades-table th.col-no,
html[data-theme="style_1"] .grades-table td.col-no {
  position: sticky;
  left: 0;
  z-index: 4;
  background: rgba(20, 25, 35, 0.98);
  color: #ffffff;
  min-width: 50px;
}

html[data-theme="style_1"] .grades-table .col-name,
html[data-theme="style_1"] .grades-table th.col-name,
html[data-theme="style_1"] .grades-table td.col-name {
  position: sticky;
  left: 50px;
  z-index: 4;
  background: rgba(20, 25, 35, 0.98);
  color: #ffffff;
  min-width: 240px;
  text-align: left;
}

html[data-theme="style_1"] .grades-table thead th.col-no {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 5;
  background: rgba(20, 25, 35, 0.98);
  color: #ffffff;
}

html[data-theme="style_1"] .grades-table thead th.col-name {
  position: sticky;
  top: 0;
  left: 50px;
  z-index: 5;
  background: rgba(20, 25, 35, 0.98);
  color: #ffffff;
}

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

@media screen and (max-width: 767px) {
  .container {
    padding: 0 10px;
  }

  .arkride-global-clock {
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  .hero {
    min-height: 100vh;
    padding: 12px;
  }

  .hero-inner {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .title-img {
    width: min(280px, 85vw);
    margin-bottom: 20px;
  }

  .greeting {
    transform: translateY(-10px);
  }

  .subtitle {
    font-size: 16px;
    line-height: 1.4;
  }

  .mascot {
    height: clamp(180px, 30vh, 300px);
    opacity: 0.2;
    right: -20px;
  }

  .actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .btn {
    width: 100%;
    min-height: 48px;
    font-size: 14px;
  }

  .btn-icon {
    font-size: 18px;
  }

  .license-badge {
    font-size: 11px;
    padding: 6px 12px;
  }

  .badge-icon {
    font-size: 16px;
  }

  .alert {
    padding: 10px 16px;
    font-size: 14px;
  }

  .ring {
    width: 60px;
    height: 60px;
  }

  .ring:after {
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border-width: 3px;
  }

  .ring span {
    font-size: 10px;
    letter-spacing: 1px;
  }
}

@media screen and (max-width: 576px) {
  .hero-inner {
    padding: 16px 12px;
    min-height: auto;
  }

  .title-img {
    width: min(240px, 90vw);
  }

  .subtitle {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .greeting .actions {
    margin-top: 16px;
  }

  .btn {
    padding: 10px 16px;
    min-height: 42px;
    font-size: 13px;
    letter-spacing: 0.3px;
  }

  .license-status {
    margin-top: 20px;
  }

  .license-badge {
    font-size: 10px;
    padding: 5px 10px;
  }
}

@media screen and (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 8px;
  }

  .hero-inner {
    min-height: auto;
    padding: 16px 20px;
  }

  .title-img {
    width: min(200px, 40vw);
    margin-bottom: 12px;
  }

  .greeting {
    transform: translateY(0);
  }

  .subtitle {
    font-size: 14px;
    line-height: 1.3;
  }

  .mascot {
    height: clamp(120px, 40vh, 200px);
    opacity: 0.15;
  }

  .actions {
    flex-direction: row;
    gap: 12px;
  }

  .btn {
    width: auto;
    min-width: 140px;
    padding: 8px 16px;
    min-height: 36px;
    font-size: 12px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 48px;
  }

  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
  }

  .btn:before {
    display: none;
  }

  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
}

@media (prefers-contrast: high) {
  .hero-inner {
    border-width: 2px;
  }

  .btn {
    border-width: 2px;
  }

  .license-badge {
    border-width: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ring:after {
    animation: none;
    border-color: #00ffcc;
  }

  .btn:before {
    display: none;
  }
}

@media print {
  .arkride-global-clock,
  .arkride-loading-overlay,
  .mascot {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero-inner {
    background: white;
    border: 1px solid black;
    box-shadow: none;
  }

  .btn {
    background: white;
    border: 1px solid black;
    color: black;
  }
}

/* ============================================
   TRANSITIONS
   ============================================ */

html.transitioning {
  overflow-y: hidden;
}

/* NOTE: Only hide scrollbar during loading animation, then restore */
html.loading { overflow-y: hidden; }
html.loaded { overflow-y: hidden; }

html.transitioning body { overflow-y: hidden !important; }
html.loading body { overflow-y: hidden !important; }
html.loaded body { overflow-y: auto !important; }

.dashboard-content,
body:not(:has(.dashboard-content)) {
  transition-duration: 0s;
  transition-timing-function: ease-in-out;
  position: relative;
  z-index: 1;
  transform-origin: center center;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: visible !important; /* Never create scrollbars - body/html handle all scrolling */
}

.dashboard-content.page-exit,
body.page-exit:not(:has(.dashboard-content)) {
  animation-fill-mode: forwards;
}

.dashboard-content.page-enter,
body.page-enter:not(:has(.dashboard-content)) {
  animation-fill-mode: forwards;
}

#page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999999;
  display: none;
  background: transparent;
  opacity: 0;
}

#page-transition-overlay.active {
  display: none;
  pointer-events: none;
}

.dashboard-content.effect-digital-wipe.page-exit,
body.effect-digital-wipe.page-exit:not(:has(.dashboard-content)) {
  animation: digitalWipePageExit 0.2s ease-out forwards;
}

.dashboard-content.effect-digital-wipe.page-enter,
body.effect-digital-wipe.page-enter:not(:has(.dashboard-content)) {
  animation: digitalWipePageEnter 0.2s ease-in forwards;
}

@keyframes digitalWipePageExit {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.98); }
}

@keyframes digitalWipePageEnter {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(1.02); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.dashboard-content.effect-hologram-fade.page-exit,
body.effect-hologram-fade.page-exit:not(:has(.dashboard-content)) {
  animation: hologramPageExit 0.2s ease-out forwards;
}

.dashboard-content.effect-hologram-fade.page-enter,
body.effect-hologram-fade.page-enter:not(:has(.dashboard-content)) {
  animation: hologramPageEnter 0.2s ease-in forwards;
}

@keyframes hologramPageExit {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  30% { transform: translate3d(0, -5px, 0) scale(1.01); }
  60% { opacity: 0.5; transform: translate3d(0, 5px, 0) scale(0.99); }
  100% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.98); }
}

@keyframes hologramPageEnter {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(1.02); }
  40% { opacity: 0.5; transform: translate3d(0, -5px, 0) scale(1.01); }
  70% { transform: translate3d(0, 5px, 0) scale(0.99); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.dashboard-content.effect-neon-pulse.page-exit,
body.effect-neon-pulse.page-exit:not(:has(.dashboard-content)) {
  animation: neonPulsePageExit 0.25s ease-out forwards;
}

.dashboard-content.effect-neon-pulse.page-enter,
body.effect-neon-pulse.page-enter:not(:has(.dashboard-content)) {
  animation: neonPulsePageEnter 0.25s ease-in forwards;
}

@keyframes neonPulsePageExit {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  50% { opacity: 0.7; transform: translate3d(0, 0, 0) scale(1.03); }
  100% { opacity: 0; transform: translate3d(0, 0, 0) scale(1.05); }
}

@keyframes neonPulsePageEnter {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.95); }
  50% { opacity: 0.7; transform: translate3d(0, 0, 0) scale(0.97); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.dashboard-content.effect-slide-panel.page-exit,
body.effect-slide-panel.page-exit:not(:has(.dashboard-content)) {
  animation: slidePageExit 0.2s ease-in-out forwards;
}

.dashboard-content.effect-slide-panel.page-enter,
body.effect-slide-panel.page-enter:not(:has(.dashboard-content)) {
  animation: slidePageEnter 0.2s ease-in-out forwards;
}

@keyframes slidePageExit {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(-100%, 0, 0) scale(0.98); }
}

@keyframes slidePageEnter {
  0% { opacity: 0; transform: translate3d(100%, 0, 0) scale(0.98); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.dashboard-content.effect-zoom-fade.page-exit,
body.effect-zoom-fade.page-exit:not(:has(.dashboard-content)) {
  animation: zoomPageExit 0.2s ease-in forwards;
}

.dashboard-content.effect-zoom-fade.page-enter,
body.effect-zoom-fade.page-enter:not(:has(.dashboard-content)) {
  animation: zoomPageEnter 0.2s ease-out forwards;
}

@keyframes zoomPageExit {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.95); }
}

@keyframes zoomPageEnter {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(1.05); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.modal,
[class*="modal"],
[id*="modal"],
[id*="Modal"] {
  transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
}

@keyframes modalFadeIn {
  0% { opacity: 0; transform: scale(0.95) translateY(-20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalFadeOut {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.95) translateY(-20px); }
}

@keyframes modalShrinkIn {
  0% { opacity: 0; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes modalShrinkOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.85); }
}

.modal.show,
.modal.active,
.modal[style*="display: flex"],
.modal[style*="display: block"],
[class*="modal"].show,
[class*="modal"].active,
[id*="modal"][style*="display: flex"],
[id*="modal"][style*="display: block"],
[id*="Modal"][style*="display: flex"],
[id*="Modal"][style*="display: block"] {
  animation: modalFadeIn 0.25s ease-out forwards;
}

.modal.hiding,
[class*="modal"].hiding,
[id*="modal"].hiding,
[id*="Modal"].hiding {
  animation: modalFadeOut 0.25s ease-in forwards;
}

.modal-content,
.modal-dialog,
[class*="modal-content"],
[class*="modal-dialog"] {
  transition: transform 0.25s ease-in-out;
}

#themeModal,
.theme-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none; /* shown via inline style in JS */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

#themeModal[style*="display: flex"],
.theme-modal[style*="display: flex"] {
  animation: modalFadeIn 0.25s ease-out forwards;
}

.theme-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.theme-modal-content {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100% - 48px));
  max-height: min(80vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.theme-modal-header,
.theme-modal-footer {
  padding: 14px 16px;
}

.theme-modal-body {
  padding: 14px 16px;
  overflow: auto;
}

.modal-backdrop,
.modal-overlay,
[class*="modal-backdrop"],
[class*="modal-overlay"],
[class*="overlay"] {
  transition: opacity 0.2s ease-in-out;
}

.modal-backdrop.show,
.modal-overlay.show,
[class*="modal-backdrop"].show,
[class*="modal-overlay"].show {
  animation: backdropFadeIn 0.2s ease-out forwards;
}

.modal-backdrop.hiding,
.modal-overlay.hiding,
[class*="modal-backdrop"].hiding,
[class*="modal-overlay"].hiding {
  animation: backdropFadeOut 0.2s ease-in forwards;
}

@keyframes backdropFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes backdropFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

#studentDetailsModal:not(.hidden),
#resetConfirmModal:not(.hidden),
#shopModal:not(.hidden),
#addItemModal:not(.hidden),
#achievementsModal:not(.hidden),
.modal.shrink-animation:not(.hidden) {
  animation: modalShrinkIn 0.3s ease-out forwards !important;
}

#studentDetailsModal.hiding,
#resetConfirmModal.hiding,
#shopModal.hiding,
#addItemModal.hiding,
#achievementsModal.hiding,
.modal.shrink-animation.hiding {
  animation: modalShrinkOut 0.25s ease-in forwards !important;
}

/* Teacher Dashboard Layout */
.teacher-dashboard-container {
  min-height: 100vh;
  padding-top: 0;
}

.dashboard-nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--panel);
  border-bottom: 2px solid var(--accent);
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.dashboard-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
}

.nav-item.home-left {
  margin-right: auto;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-button:hover {
  background: rgba(255, 193, 7, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  position: relative;
  padding-right: 26px;
}

.dropdown-arrow {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  transition: transform 0.3s ease;
}

.dropdown-toggle.open .dropdown-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: 100%;
  background: var(--panel);
  border: 2px solid var(--accent);
  border-top: none;
  margin-top: -2px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  z-index: 2000;
  display: none;
  max-height: min(320px, calc(100vh - 140px));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.dropdown-menu::-webkit-scrollbar {
  width: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,193,7,0.1);
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--accent-bg);
  color: var(--accent);
  padding-left: 17px;
  text-decoration: none;
}

.dropdown-item.logout-item {
  color: #ff6b6b;
  border-top: 2px solid rgba(255,193,7,0.2);
}

.dropdown-item.logout-item:hover {
  background: rgba(255,0,0,0.1);
  color: #ff4444;
}

/* COMPLETELY DISABLED: Remove all custom select styles to use native behavior */
/* 
.arkride-select {
  position: relative;
  display: inline-block;
  max-width: 100%;
  min-width: 0;
}

.arkride-select-control {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  box-sizing: border-box;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-image: none !important;
}
*/

/* SELECTIVE REVERT: Remove marquee functionality */
/* .arkride-select-label {
  display: block;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  will-change: transform;
}

.arkride-select-control.has-marquee:hover .arkride-select-label,
.arkride-select-control.has-marquee:focus .arkride-select-label,
.arkride-select-control.has-marquee:focus-visible .arkride-select-label {
  animation: arkride-marquee var(--arkride-marquee-duration, 8s) linear infinite alternate;
}

@keyframes arkride-marquee {
  0% { transform: translateX(0); }
  10% { transform: translateX(0); }
  90% { transform: translateX(calc(-1 * var(--arkride-marquee-distance, 0px))); }
  100% { transform: translateX(calc(-1 * var(--arkride-marquee-distance, 0px))); }
}

@media (prefers-reduced-motion: reduce) {
  .arkride-select-control.has-marquee:hover .arkride-select-label,
  .arkride-select-control.has-marquee:focus .arkride-select-label,
  .arkride-select-control.has-marquee:focus-visible .arkride-select-label {
    animation: none;
  }
} */

/* COMPLETELY DISABLED: Remove all custom select styles to use native behavior */
/*
.arkride-select-control::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82em;
  opacity: 0.85;
  pointer-events: none;
}

.arkride-select.is-disabled .arkride-select-control::after {
  opacity: 0.45;
}

.arkride-select-control:disabled {
  cursor: default;
}
*/

/* SELECTIVE REVERT: Remove custom menu styles - using native dropdown behavior */
/* .arkride-select-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  width: 100%;
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.55);
  z-index: 3500;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.arkride-select-menu.is-portal {
  position: fixed;
  z-index: 3500;
}

.arkride-select-menu.open {
  display: block;
}

.arkride-select-menu.open-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.arkride-select-option {
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid rgba(255,193,7,0.1);
}

.arkride-select-option:last-child {
  border-bottom: none;
}

.arkride-select-option:hover {
  background: var(--accent-bg);
  color: var(--accent);
}

.arkride-select-option.is-selected {
  background: rgba(255, 193, 7, 0.15);
}

.arkride-select-option.is-disabled {
  opacity: 0.55;
  cursor: default;
}

.arkride-select-menu::-webkit-scrollbar {
  width: 10px;
}

.arkride-select-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.arkride-select-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
} */

.custom-select-wrapper {
  position: relative;
}

.custom-select {
  position: relative;
}

.custom-select .options-container {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  width: 100%;
  max-height: min(320px, calc(100vh - 140px));
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  z-index: 9999;
  scrollbar-width: thin;
}

.custom-select[aria-expanded="true"] .options-container {
  display: block;
}

.custom-select .options-container::-webkit-scrollbar {
  width: 10px;
}

.custom-select .options-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.custom-select .options-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

select {
  scrollbar-width: thin;
}

select::-webkit-scrollbar {
  width: 10px;
}

select::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

select::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.dashboard-content {
  padding: 30px;
  padding-top: 100px;
  padding-bottom: 50px;
  font-family: var(--display);
  color: var(--text);
  overflow: visible !important;
  height: auto !important;
  min-height: calc(100vh - 100px);
  max-height: none !important;
  position: relative;
}

.view-delete-container {
  max-width: 1200px;
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

.section-card {
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: 12px;
  margin-bottom: 24px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  position: relative; /* allow absolute-positioned help icon to anchor correctly */
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 0;
  border-bottom: none;
}

.section-title {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  color: var(--accent, #ffc107);
  margin: 0 0 20px 0;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-weight: 600;
  color: #ffffff !important;
  font-size: 0.95rem;
  margin-bottom: 4px;
  display: block;
}

.form-input, .form-select {
  background: rgba(30, 35, 45, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px;
  padding: 12px 16px;
  color: #ffffff !important;
  font-size: 1rem;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.form-input:hover, .form-select:hover {
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1) !important;
}

.form-select option {
  background: rgba(20, 25, 35, 0.98) !important;
  color: #ffffff !important;
  padding: 8px 12px !important;
}

.form-select option:hover,
.form-select option:checked {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.inline-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bank-control-group {
  margin-bottom: 20px;
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

.qgroup {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 16px;
  margin-top: 16px;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

.qgroup:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.qgroup-header {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.qgroup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

.question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all .2s;
}

.question-row:hover {
  border-color: var(--accent);
  background: rgba(255, 193, 7, 0.05);
}

.question-text {
  flex-grow: 1;
  opacity: .9;
}

.question-actions {
  display: flex;
  gap: 10px;
}

.btn {
  min-height: 48px;
  padding: 0 24px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: rgba(255, 193, 7, 0.9);
  box-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 600;
}

.button:hover {
  background: rgba(255, 193, 7, 0.1);
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.button .icon {
  margin-left: 8px;
}

.help-icon-btn {
  display: inline-block !important;
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  vertical-align: middle !important;
  transition: transform 0.2s ease !important;
  border-radius: 50% !important;
  outline: none !important;
  animation: help-glow-pulse 2s ease-in-out infinite !important;
}

.help-icon-btn:hover {
  transform: scale(1.1) !important;
  opacity: 0.85;
  animation: help-glow-pulse 1s ease-in-out infinite !important;
}

.help-icon-btn:active {
  transform: scale(0.95) !important;
}

.help-icon-btn img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: contain !important;
  pointer-events: none !important;
}

@keyframes help-glow-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 3px rgba(255,0,0,0.8)) drop-shadow(0 0 8px rgba(255,0,0,0.6));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255,0,0,1)) drop-shadow(0 0 16px rgba(255,0,0,0.8));
  }
}

.connect-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 10010;
  display: none;
  align-items: center;
  justify-content: center;
}

.connect-modal.show {
  display: flex;
}

.connect-box {
  max-width: 880px;
  width: 92%;
  background: linear-gradient(135deg, rgba(10,15,25,.98), rgba(20,25,35,.98));
  border: 2px solid #ffc107;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(255,193,7,.4);
}

.connect-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 2px solid rgba(255,193,7,.25);
}

.connect-title {
  margin: 0;
  color: #ffc107;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: .5px;
}

.connect-close {
  background: transparent;
  border: none;
  color: #ffc107;
  font-size: 22px;
  cursor: pointer;
}

.connect-body {
  padding: 16px 18px;
  max-height: 72vh;
  overflow: auto;
}

.connect-body h4 {
  margin: 12px 0 8px 0;
  color: #ffc107;
  font-family: 'Orbitron', sans-serif;
}

.connect-body p {
  margin: 8px 0 10px 0;
  color: #e0e6ed;
  line-height: 1.6;
  font-family: 'Poppins', sans-serif;
}

.connect-body ul, .connect-body ol {
  margin: 6px 0 12px 22px;
  color: #e0e6ed;
  font-family: 'Poppins', sans-serif;
}

.connect-body li {
  margin: 6px 0;
}

.connect-foot {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 2px solid rgba(255,193,7,.25);
}

.connect-ok {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}

.help-page {
  display: none;
}

.help-page.show {
  display: block;
}

.help-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
}

.help-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.help-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,193,7,.3);
}

.help-dot.active {
  background: #ffc107;
  box-shadow: 0 0 8px rgba(255,193,7,.7);
}

.help-count {
  color: #e0e6ed;
  opacity: .8;
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 12px;
}

.help-prev {
  background: transparent;
  color: #ffc107;
  border: 2px solid #ffc107;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 800;
  cursor: pointer;
}

/* ============================================
   TEACHER PREVIEW BANK PAGE STYLES
   ============================================ */

.preview-panel {
  background: rgba(20, 25, 35, 0.95);
  border: 2px solid var(--accent, #ffc107);
  border-radius: 12px;
  padding: 30px;
  margin-top: 20px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--accent, #ffc107);
  flex-wrap: wrap;
}

.bank-selector {
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.bank-selector label {
  color: #ffffff !important;
  font-family: var(--display, 'Orbitron');
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bank-selector select {
  width: 100%;
  background: rgba(30, 35, 45, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  padding: 10px;
  border-radius: 6px;
  font-family: var(--primary, 'Poppins');
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.bank-selector select:hover {
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.bank-selector select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1) !important;
}

.bank-selector select option {
  background: rgba(20, 25, 35, 0.98) !important;
  color: #ffffff !important;
  padding: 8px 12px !important;
}

.bank-selector select option:hover,
.bank-selector select option:checked {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.bank-info {
  flex: 1;
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
}

.info-item {
  color: var(--text, #e0e6ed);
}

.info-label {
  font-size: 12px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.info-value {
  font-family: var(--display, 'Orbitron');
  font-size: 24px;
  font-weight: 700;
  color: var(--accent, #ffc107);
}

.questions-container {
  margin-top: 30px;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

.no-questions {
  text-align: center;
  padding: 60px;
  color: var(--text, #e0e6ed);
  opacity: 0.7;
  font-style: italic;
}

.question-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.question-number {
  color: var(--accent, #ffc107);
  font-family: var(--display, 'Orbitron');
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

.question-text {
  color: var(--text, #e0e6ed);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-wrap;
  font-family: 'Minion Pro', 'Segoe UI Symbol', 'Cambria Math', 'Times New Roman', serif;
}

.question-image {
  margin: 10px 0 15px;
  text-align: center;
}

.question-image img {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
}

.question-type-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 193, 7, 0.9) !important;
  color: #000000 !important;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 12px;
  margin-bottom: 15px;
  font-family: 'Orbitron', sans-serif;
}

.choices-list {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
}

.choice-item {
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  margin-bottom: 8px;
  color: var(--text, #e0e6ed);
  display: flex;
  align-items: center;
}

.choice-item.correct {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.5);
}

.choice-label {
  font-weight: 600;
  color: var(--accent, #ffc107);
  margin-right: 10px;
  min-width: 25px;
  font-family: 'Orbitron', sans-serif;
}

.choice-text {
  flex: 1;
  font-family: 'Minion Pro', 'Segoe UI Symbol', 'Cambria Math', 'Times New Roman', serif;
}

.correct-indicator {
  margin-left: auto;
  padding: 2px 8px;
  background: #4caf50;
  color: white;
  font-size: 11px;
  font-weight: bold;
  border-radius: 10px;
}

.grouped-container {
  background: rgba(0, 0, 0, 0.2);
  border-left: 4px solid var(--accent, #ffc107);
  padding: 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
}

.grouped-header {
  color: var(--accent, #ffc107);
  font-family: var(--display, 'Orbitron');
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.subquestion {
  margin-bottom: 20px;
  padding-left: 20px;
  border-left: 2px solid rgba(255, 193, 7, 0.3);
}

.subquestion-number {
  color: var(--text, #e0e6ed);
  font-weight: 600;
  margin-bottom: 8px;
}

.answer-display {
  padding: 15px;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.5);
  border-radius: 6px;
  color: var(--text, #e0e6ed);
  margin-top: 10px;
}

.answer-label {
  font-size: 12px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 5px;
  font-family: 'Orbitron', sans-serif;
}

/* Choice text must preserve original casing (units, symbols, etc.). */
.answer-option .answer-label {
  text-transform: none;
}

.answer-text {
  font-size: 16px;
  font-weight: 600;
  color: #4caf50;
  text-transform: none;
  font-family: 'Minion Pro', 'Segoe UI Symbol', 'Cambria Math', 'Times New Roman', serif;
}

/* ============================================
   QUESTIONNAIRE PAGE STYLES
   ============================================ */

/* Questionnaire root container */
#qnq-root { 
  color: #ffffff !important; 
  font-family: 'Poppins', system-ui, sans-serif; 
}

#qnq-root label { 
  font-family: var(--display, 'Orbitron'); 
  color: #ffffff !important; 
  font-weight: 700; 
  letter-spacing: .6px; 
  display: block; 
  margin-bottom: 6px; 
  text-transform: uppercase; 
  font-size: 12px; 
}

/* Form inputs and selects for questionnaires */
#qnq-root .form-input, 
#qnq-root .themed-select { 
  width: 100%; 
  background: rgba(30, 35, 45, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-family: 'Orbitron', sans-serif;
  border-radius: 0;
  clip-path: polygon(6px 0%, 100% 0%, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0% 100%, 0% 6px);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.2);
  padding: 12px;
}

#qnq-root .form-input:focus, 
#qnq-root .themed-select:focus { 
  outline: none; 
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1) !important;
  background: rgba(30, 35, 45, 0.9) !important;
}

#qnq-root .themed-select option {
  background: rgba(20, 25, 35, 0.98) !important;
  color: #ffffff !important;
  padding: 8px 12px !important;
}

#qnq-root .themed-select option:hover,
#qnq-root .themed-select option:checked {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

#qnq-root input.form-input[type=number] { 
  text-align: right; 
  font-variant-numeric: tabular-nums; 
  font-feature-settings: 'tnum'; 
}

/* Questionnaire form layouts */
#qnq-root .qnq-form-row, 
#qnq-root .settings-grid, 
#qnq-root .qnq-selects-row { 
  display: grid; 
  gap: 12px; 
}

#qnq-root .qnq-form-row { 
  grid-template-columns: max-content max-content max-content max-content; 
  gap: 16px; 
  margin-bottom: 12px; 
  align-items: start; 
}

#qnq-root .settings-grid {
  grid-template-columns: 160px 160px repeat(4, 200px);
  grid-template-areas:
    "time max download shuffle parts remove"
    "preview unlocked upload calculator manage .";
  column-gap: 12px;
  row-gap: 16px;
  align-items: center;
}

#qnq-root .settings-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 0;
}

#qnq-root .settings-grid label {
  white-space: nowrap;
}

#qnq-root .settings-cell form,
#qnq-root .settings-cell button,
#qnq-root .settings-cell .btn,
#qnq-root .settings-cell .button {
  width: 100%;
  position: relative;
  z-index: 2;
}

#qnq-root .settings-cell form {
  z-index: 1;
  position: relative;
}

/* Prevent hover animations from moving/overlapping hitboxes inside the Questionnaires controls grid */
#qnq-root .settings-grid .btn,
#qnq-root .settings-grid .button,
#qnq-root .settings-grid button,
#qnq-root .settings-grid input[type="button"],
#qnq-root .settings-grid input[type="submit"] {
  transform: none !important;
}

#qnq-root .settings-grid .btn:hover,
#qnq-root .settings-grid .btn:focus,
#qnq-root .settings-grid .btn:active,
#qnq-root .settings-grid .button:hover,
#qnq-root .settings-grid .button:focus,
#qnq-root .settings-grid .button:active,
#qnq-root .settings-grid button:hover,
#qnq-root .settings-grid button:focus,
#qnq-root .settings-grid button:active {
  transform: none !important;
}

/* ------------------------------------------------------------
   Questionnaires Controls: remake Upload + Calculator buttons
   to behave like the other controls (no glow overlays, no ring,
   no hitbox-changing effects).
   ------------------------------------------------------------ */
#qnq-root #btn-upload,
#qnq-root #btn-calculator-toggle {
  /* Match the "style_1" button look used across the dashboard */
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  text-shadow: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;

  /* Kill any hover/animation overlap issues */
  position: relative;
  z-index: 2;
  isolation: isolate;
  overflow: hidden;
}

/* Remove global .btn shine + any toggle rings */
#qnq-root #btn-upload::before,
#qnq-root #btn-upload::after,
#qnq-root #btn-calculator-toggle::before,
#qnq-root #btn-calculator-toggle::after {
  content: none !important;
  display: none !important;
}

#qnq-root #btn-upload:hover,
#qnq-root #btn-upload:focus,
#qnq-root #btn-calculator-toggle:hover,
#qnq-root #btn-calculator-toggle:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Calculator ON state: keep it distinct, but no breathing glow */
#qnq-root #btn-calculator-toggle[data-calculator="true"] {
  background: rgba(255, 0, 0, 0.18);
  border-color: rgba(255, 0, 0, 0.75);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 0, 0, 0.25);
}

#qnq-root #btn-calculator-toggle[data-calculator="true"]:hover,
#qnq-root #btn-calculator-toggle[data-calculator="true"]:focus {
  background: rgba(255, 0, 0, 0.24);
  border-color: rgba(255, 0, 0, 0.9);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 0 14px rgba(255, 0, 0, 0.32);
}

/* Parts toggle: add the same breathing glow effect as Shuffle when enabled */
#btn-parts-toggle {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

#btn-parts-toggle[data-use-parts="true"] {
  background-image: linear-gradient(160deg, #cc0000, #ff3333, #ff6666, #ff4444, #cc0000);
  border: 1px solid #ff0000;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 2px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.6),
              0 0 40px rgba(255, 0, 0, 0.4),
              0 3px 6px rgba(0, 0, 0, 0.16),
              inset 0 -2px 5px 1px rgba(139, 0, 0, 1),
              inset 0 -1px 1px 3px rgba(255, 100, 100, 1);
  animation: redGlow 2s ease-in-out infinite;
}

#btn-parts-toggle[data-use-parts="true"]:hover {
  background-size: 150% 150%;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.8),
              0 0 60px rgba(255, 0, 0, 0.5),
              0 10px 20px rgba(0, 0, 0, 0.19),
              inset 0 -2px 5px 1px rgba(200, 0, 0, 1),
              inset 0 -1px 1px 3px rgba(255, 150, 150, 1);
  border: 1px solid rgba(255, 0, 0, 0.8);
  color: #ffffff;
}

#qnq-root .settings-cell[data-area="time"] { grid-area: time; }
#qnq-root .settings-cell[data-area="max"] { grid-area: max; }
#qnq-root .settings-cell[data-area="download"] { grid-area: download; margin-left: 20px; }
#qnq-root .settings-cell[data-area="shuffle"] { grid-area: shuffle; }
#qnq-root .settings-cell[data-area="parts"] { grid-area: parts; }
#qnq-root .settings-cell[data-area="remove"] { grid-area: remove; align-self: stretch; justify-content: center; }
#qnq-root .settings-cell[data-area="preview"] { grid-area: preview; }
#qnq-root .settings-cell[data-area="unlocked"] { grid-area: unlocked; }
#qnq-root .settings-cell[data-area="upload"] { grid-area: upload; margin-left: 20px; }
#qnq-root .settings-cell[data-area="calculator"] { grid-area: calculator; }
#qnq-root .settings-cell[data-area="manage"] { grid-area: manage; }

#qnq-root .qnq-selects-row { 
  grid-template-columns: max-content max-content max-content max-content 1fr max-content; 
  align-items: center; 
  gap: 16px; 
}

#qnq-root .qnq-form-row .q-col { 
  width: max-content; 
}

#qnq-root .inline-actions { 
  margin-top: 8px; 
}

#qnq-root .q-col.small { 
  width: 120px; 
}

#qnq-root .qnq-toggle-row { 
  display: grid; 
  grid-template-columns: 140px 200px 1fr; 
  gap: 12px; 
  margin-top: 12px;
  align-items: center;
}

#qnq-root .toggle-row-left { 
  grid-column: 1 / 3;
  display: flex;
  gap: 10px;
}

#qnq-root .toggle-row-right { 
  grid-column: 3;
  display: flex;
  gap: 10px;
}

/* Button delete style */
.btn-delete,
#btn-delete.button {
  position: relative;
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  border: 1px solid #aa0000;
  border-radius: 5px;
  color: white;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s;
}

.btn-delete:hover,
#btn-delete.button:hover {
  background: linear-gradient(135deg, #ff6666, #ff2222);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

#btn-delete .icon {
  display: inline-block;
  margin-left: 5px;
}

#btn-delete .icon .fa-check {
  display: none;
}

/* Lock/Unlock Button Styles */
.btn-lock-toggle { 
  display: flex; 
  align-items: center; 
  justify-content: center;
  gap: 6px; 
  transition: all 0.3s ease; 
  white-space: nowrap;
  font-size: 11px;
  padding: 8px 12px;
  position: relative;
  z-index: 3;
  isolation: isolate;
}

.btn-lock-toggle .lock-icon { 
  font-size: 14px; 
  transition: all 0.3s ease; 
  flex-shrink: 0;
}

.btn-lock-toggle .lock-text { 
  font-weight: 600; 
  font-size: 11px;
  transition: all 0.3s ease; 
  white-space: nowrap;
}

.btn-lock-toggle[data-locked="false"] { 
  background: rgba(76, 175, 80, 0.2); 
  border-color: #4caf50; 
  color: #4caf50; 
}

.btn-lock-toggle[data-locked="false"]:hover { 
  background: rgba(76, 175, 80, 0.3); 
}

.btn-lock-toggle[data-locked="true"] { 
  background: rgba(244, 67, 54, 0.2); 
  border-color: #f44336; 
  color: #f44336; 
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.3); 
  animation: redGlow 2s ease-in-out infinite;
}

.btn-lock-toggle[data-locked="true"]:hover { 
  background: rgba(244, 67, 54, 0.3); 
  box-shadow: 0 0 15px rgba(244, 67, 54, 0.4); 
}

/* Shuffle Button Toggle Styles */
.btn-shuffle-toggle { 
  display: flex; 
  align-items: center; 
  gap: 8px;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.btn-shuffle-toggle .shuffle-icon { 
  font-size: 16px; 
  transition: all 0.2s ease; 
}

.btn-shuffle-toggle .shuffle-text { 
  font-weight: 600; 
  transition: all 0.2s ease; 
}

.btn-shuffle-toggle[data-shuffled="true"] {
  background-image: linear-gradient(160deg, #cc0000, #ff3333, #ff6666, #ff4444, #cc0000);
  border: 1px solid #ff0000;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 2px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.6),
              0 0 40px rgba(255, 0, 0, 0.4),
              0 3px 6px rgba(0, 0, 0, 0.16),
              inset 0 -2px 5px 1px rgba(139, 0, 0, 1),
              inset 0 -1px 1px 3px rgba(255, 100, 100, 1);
  animation: redGlow 2s ease-in-out infinite;
}

.btn-shuffle-toggle[data-shuffled="true"]:hover {
  background-size: 150% 150%;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.8),
              0 0 60px rgba(255, 0, 0, 0.5),
              0 10px 20px rgba(0, 0, 0, 0.19),
              inset 0 -2px 5px 1px rgba(200, 0, 0, 1),
              inset 0 -1px 1px 3px rgba(255, 150, 150, 1);
  border: 1px solid rgba(255, 0, 0, 0.8);
  color: #ffffff;
  z-index: 1;
}

/* Calculator Button Toggle Styles */
.btn-calculator-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: visible;
}

.btn-calculator-toggle .calc-icon {
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-calculator-toggle .calc-text {
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-calculator-toggle[data-calculator="true"] {
  background-image: linear-gradient(160deg, #cc0000, #ff3333, #ff6666, #ff4444, #cc0000);
  border: 1px solid #ff0000;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 2px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.6),
              0 0 40px rgba(255, 0, 0, 0.4),
              0 3px 6px rgba(0, 0, 0, 0.16),
              inset 0 -2px 5px 1px rgba(139, 0, 0, 1),
              inset 0 -1px 1px 3px rgba(255, 100, 100, 1);
  animation: redGlow 2s ease-in-out infinite;
}

.btn-calculator-toggle[data-calculator="true"]:hover {
  background-size: 150% 150%;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.8),
              0 0 60px rgba(255, 0, 0, 0.5),
              0 10px 20px rgba(0, 0, 0, 0.19),
              inset 0 -2px 5px 1px rgba(200, 0, 0, 1),
              inset 0 -1px 1px 3px rgba(255, 150, 150, 1);
  border: 1px solid rgba(255, 0, 0, 0.8);
  color: #ffffff;
  z-index: 1;
}

.btn-calculator-toggle[data-calculator="true"]::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 8px;
  border: 2px solid rgba(255, 0, 0, 0.55);
  box-shadow: 0 0 14px rgba(255, 0, 0, 0.45), 0 0 28px rgba(255, 0, 0, 0.35);
  pointer-events: none;
  z-index: -1;
  animation: arkride-ring-pulse 2.4s ease-in-out infinite;
}

@keyframes redGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6),
                0 0 40px rgba(255, 0, 0, 0.4),
                0 3px 6px rgba(0, 0, 0, 0.16),
                inset 0 -2px 5px 1px rgba(139, 0, 0, 1),
                inset 0 -1px 1px 3px rgba(255, 100, 100, 1);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8),
                0 0 60px rgba(255, 0, 0, 0.6),
                0 3px 6px rgba(0, 0, 0, 0.16),
                inset 0 -2px 5px 1px rgba(139, 0, 0, 1),
                inset 0 -1px 1px 3px rgba(255, 100, 100, 1);
  }
}

/* Dual pane layout */
.qnq-dual { 
  display: grid; 
  grid-template-columns: 1fr auto 1fr; 
  gap: 12px; 
  min-height: 400px; 
}

/* Panes */
.pane {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px;
  overflow: hidden;
}

.pane-header {
  background: var(--accent-bg);
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: #ffffff !important;
  text-transform: none;
  font-weight: normal;
}

.select-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.pane-search {
  flex: 1;
  max-width: 250px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  border-radius: 4px;
  outline: none;
  transition: all 0.2s ease;
}

.pane-search:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1) !important;
}

.pane-search::placeholder {
  color: rgba(224, 230, 237, 0.5);
}

.pane-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.parts-indicator {
  background: rgba(100, 181, 246, 0.05) !important;
  color: #ffffff !important;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Parts Editor */
.parts-editor {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px;
  padding: 15px;
  margin: 10px;
}

.parts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.parts-header strong {
  color: var(--accent);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.parts-actions {
  display: flex;
  gap: 10px;
}

.parts-list {
  max-height: 200px;
  overflow-y: auto;
}

/* Item list */
.item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
}

.item-list li {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 193, 7, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
  cursor: pointer;
}

.item-list li:hover {
  background: var(--accent-bg);
}

.item-list li.selected {
  background: rgba(255, 193, 7, 0.2);
  border-left: 3px solid var(--accent);
}

.item-list li.search-match {
  background: rgba(255, 193, 7, 0.15);
  border-left: 2px solid var(--accent);
}

.item-list li.search-match.selected {
  background: rgba(255, 193, 7, 0.3);
  border-left: 3px solid var(--accent);
}

.item-list input[type="checkbox"] {
  flex-shrink: 0;
}

.item-text {
  flex: 1;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
}

/* Arrow Rail */
.arkr-arrow-rail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 0 10px;
}

.arkr-arrow {
  width: 60px;
  height: 60px;
  background: url('/img/arrow_crystal.jpg') no-repeat center center;
  background-size: contain;
  cursor: pointer;
  transition: all 0.3s;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  position: relative;
}

.arkr-arrow.arkr-left {
  transform: rotate(180deg);
  --rotation: 180deg;
}

.arkr-arrow.arkr-right {
  transform: rotate(0deg);
  --rotation: 0deg;
}

.arkr-arrow:hover {
  filter: drop-shadow(0 0 20px var(--glow)) brightness(1.2);
  transform: scale(1.1) rotate(var(--rotation));
}

.arkr-arrow:active {
  transform: scale(0.95) rotate(var(--rotation));
}

/* Live indicator + Live Log (Teacher) */
#arkrideSseIndicator{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-family:'Roboto Mono','Courier New',monospace;
  font-size:12px;
  letter-spacing:0.5px;
  user-select:none;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(0,0,0,0.25);
  color:#fff;
}

#arkrideSseDot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#ffcc00;
  box-shadow:0 0 10px rgba(255,204,0,0.7);
}

#arkrideSseIndicator.state-connected #arkrideSseDot{
  background:#00ff6a;
  box-shadow:0 0 10px rgba(0,255,106,0.7);
}

#arkrideSseIndicator.state-disconnected #arkrideSseDot{
  background:#ff3b3b;
  box-shadow:0 0 10px rgba(255,59,59,0.7);
}

#arkrideSseLabel{ opacity:0.9; }

#arkrideLiveLogToggle{
  position:fixed;
  right:18px;
  bottom:18px;
  width:46px;
  height:46px;
  border-radius:999px;
  border:1px solid rgba(255,193,7,0.35);
  background:rgba(15,18,25,0.92);
  color:#ffc107;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:12000;
  box-shadow:0 0 22px rgba(255,193,7,0.18);
}

#arkrideLiveLogToggle:hover{
  box-shadow:0 0 28px rgba(255,193,7,0.28);
}

#arkrideLiveLogBadge{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#ff3b3b;
  color:#fff;
  font-weight:800;
  font-size:11px;
  line-height:18px;
  border:2px solid rgba(15,18,25,0.95);
  align-items:center;
  justify-content:center;
}

#arkrideLiveLogModal{
  position:fixed;
  right:18px;
  bottom:74px;
  width:360px;
  max-width:calc(100vw - 36px);
  height:420px;
  max-height:calc(100vh - 120px);
  background:linear-gradient(135deg,rgba(10,15,25,.98),rgba(20,25,35,.98));
  border:2px solid rgba(255,193,7,0.5);
  border-radius:14px;
  box-shadow:0 0 42px rgba(255,193,7,.28);
  z-index:12001;
  display:none;
  flex-direction:column;
  overflow:hidden;
}

#arkrideLiveLogModal.show{ display:flex; }

.arkride-live-log-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,193,7,0.25);
}

.arkride-live-log-title{
  display:flex;
  align-items:center;
  gap:8px;
  color:#ffc107;
  font-family:'Orbitron',sans-serif;
  letter-spacing:.6px;
  font-size:13px;
}

#arkrideLiveLogClose{
  background:transparent;
  border:none;
  color:#ffc107;
  font-size:20px;
  cursor:pointer;
  width:36px;
  height:36px;
  border-radius:10px;
}

#arkrideLiveLogClose:hover{ background:rgba(255,193,7,0.12); }

.arkride-live-log-list{
  flex:1;
  padding:12px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.arkride-live-bubble-wrap{
  display:flex;
}

.arkride-live-bubble-wrap.sys{ justify-content:center; }
.arkride-live-bubble-wrap.evt{ justify-content:flex-end; }

.arkride-live-bubble{
  max-width:92%;
  border-radius:16px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,0.15);
  background:rgba(0,0,0,0.25);
  color:#e0e6ed;
  box-shadow:0 0 18px rgba(0,0,0,0.25);
}

.arkride-live-bubble.evt{
  border-color:rgba(255,193,7,0.22);
  background:rgba(255,193,7,0.10);
}

.arkride-live-bubble.sys{
  border-color:rgba(13,202,240,0.22);
  background:rgba(13,202,240,0.10);
}

.arkride-live-bubble-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
  font-size:11px;
  opacity:0.9;
}

.arkride-live-bubble-type{
  font-family:'Roboto Mono','Courier New',monospace;
  color:#ffc107;
}

.arkride-live-bubble.sys .arkride-live-bubble-type{
  color:#0dcaf0;
}

.arkride-live-bubble-time{
  font-family:'Roboto Mono','Courier New',monospace;
  opacity:0.8;
}

.arkride-live-bubble-body{
  font-family:'Poppins',sans-serif;
  font-size:13px;
  line-height:1.35;
  word-break:break-word;
}

@media (max-width: 767px){
  #arkrideLiveLogModal{
    width:340px;
    height:380px;
    right:10px;
    bottom:70px;
    max-width:calc(100vw - 20px);
  }
  #arkrideLiveLogToggle{
    right:10px;
    bottom:10px;
  }
}

