/* ==========================================================================
   Takoot - Ultra Modern Kahoot-Style Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@500;700;800&display=swap');

:root {
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
  --surface-glass: rgba(255, 255, 255, 0.75);
  --surface-glass-border: rgba(203, 213, 225, 0.8);
  --surface-card: #ffffff;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  /* Brand Shape Colors */
  --color-red: #e21b3c;
  --color-red-grad: linear-gradient(135deg, #ff2a4b, #c20d2a);
  --color-blue: #1368ce;
  --color-blue-grad: linear-gradient(135deg, #257eff, #0a4f9e);
  --color-yellow: #d89e00;
  --color-yellow-grad: linear-gradient(135deg, #fabb00, #b08000);
  --color-green: #26890c;
  --color-green-grad: linear-gradient(135deg, #32b512, #1b6b06);

  --color-accent: #7c3aed;
  --color-accent-grad: linear-gradient(135deg, #7c3aed, #6d28d9);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 25px rgba(124, 58, 237, 0.2);

  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Background Animated Gradient Mesh */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at 20% 20%, rgba(226, 27, 60, 0.15), transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(19, 104, 206, 0.15), transparent 40%),
              radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.12), transparent 50%);
  z-index: -1;
  pointer-events: none;
  animation: pulseMesh 12s ease-in-out infinite alternate;
}

@keyframes pulseMesh {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.05) rotate(3deg); }
}

/* App Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.brand-logo span.badge {
  font-size: 0.75rem;
  background: var(--color-accent-grad);
  -webkit-text-fill-color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Main Container Views */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view-section {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-family);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-accent-grad);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-success {
  background: var(--color-green-grad);
  color: #fff;
}

.btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1.3rem;
  border-radius: var(--radius-lg);
}

/* Landing Page Cards */
.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 960px;
  margin-top: 2rem;
}

.card {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.card-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Forms & Inputs */
.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-family);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  color: #0f172a;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

/* Avatar Selector */
.avatar-grid {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.avatar-opt {
  font-size: 1.8rem;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-opt:hover, .avatar-opt.selected {
  border-color: var(--color-accent);
  background: rgba(139, 92, 246, 0.25);
  transform: scale(1.15);
}

/* XML Upload Zone */
.drop-zone {
  width: 100%;
  border: 2px dashed var(--surface-glass-border);
  border-radius: var(--radius-md);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 1rem;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--color-accent);
  background: rgba(139, 92, 246, 0.1);
}

.drop-zone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* Host Lobby View */
.lobby-header {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  padding: 1.5rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 92, 246, 0.3);
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(30, 27, 75, 0.3);
}

.pin-display {
  display: flex;
  flex-direction: column;
}

.pin-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #cbd5e1;
  font-weight: 700;
}

.pin-label span {
  color: #38bdf8;
}

.pin-code {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fde047;
  text-shadow: 0 0 25px rgba(253, 224, 71, 0.4);
}

.qr-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.qr-box img, .qr-box canvas {
  width: 90px;
  height: 90px;
}

.qr-text {
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Player Grid in Lobby */
.player-list-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.player-count-badge {
  background: var(--color-accent-grad);
  color: #ffffff;
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  width: 100%;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
}

.player-chip {
  background: #ffffff;
  color: #0f172a;
  border: 2px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  word-break: break-word;
}

@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.player-chip .avatar {
  font-size: 1.5rem;
}

/* Live Question Screen (Host View) */
.question-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.question-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.question-counter {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.timer-circle {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-full);
  background: var(--color-accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s ease;
}

.timer-circle.warning {
  background: var(--color-red-grad);
  animation: timerPulse 0.5s ease infinite alternate;
}

@keyframes timerPulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); box-shadow: 0 0 30px rgba(226, 27, 60, 0.8); }
}

.question-box {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--surface-glass-border);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.question-text {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
}

/* Question Choices Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  width: 100%;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem 1.8rem;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-family);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.option-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}

.option-btn:active {
  transform: translateY(1px);
}

.option-btn.opt-0 { background: var(--color-red-grad); }
.option-btn.opt-1 { background: var(--color-blue-grad); }
.option-btn.opt-2 { background: var(--color-yellow-grad); }
.option-btn.opt-3 { background: var(--color-green-grad); }

.option-shape {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-text {
  flex: 1;
  word-break: break-word;
}

/* Results Graph Chart */
.results-chart-container {
  width: 100%;
  background: var(--surface-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-glass-border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  height: 240px;
  align-items: flex-end;
  padding-top: 2rem;
}

.bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  justify-content: flex-end;
}

.bar-count {
  font-weight: 800;
  font-size: 1.4rem;
}

.bar-column {
  width: 100%;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 10px;
  position: relative;
}

.bar-wrapper.correct .bar-column {
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

.bar-wrapper.opt-0 .bar-column { background: var(--color-red-grad); }
.bar-wrapper.opt-1 .bar-column { background: var(--color-blue-grad); }
.bar-wrapper.opt-2 .bar-column { background: var(--color-yellow-grad); }
.bar-wrapper.opt-3 .bar-column { background: var(--color-green-grad); }

/* Student Answer Pad (Player View) */
.player-pad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  width: 100%;
  max-width: 600px;
  margin: auto;
  flex: 1;
  padding: 1rem 0;
}

.player-btn {
  border: none;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.15s ease;
  min-height: 160px;
}

.player-btn:active {
  transform: scale(0.95);
}

.player-btn.opt-0 { background: var(--color-red-grad); }
.player-btn.opt-1 { background: var(--color-blue-grad); }
.player-btn.opt-2 { background: var(--color-yellow-grad); }
.player-btn.opt-3 { background: var(--color-green-grad); }

/* Player Outcome Screen */
.outcome-card {
  width: 100%;
  max-width: 500px;
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.outcome-card.correct {
  background: linear-gradient(135deg, #15803d, #166534);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.4);
}

.outcome-card.wrong {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.4);
}

.outcome-title {
  font-size: 2.8rem;
  font-weight: 900;
}

.outcome-points {
  font-size: 1.8rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-full);
}

.streak-badge {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fde047;
  margin-top: 0.5rem;
}

/* Leaderboard & Podium */
.leaderboard-list {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-card);
  border: 1px solid var(--surface-glass-border);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  font-weight: 700;
}

.leaderboard-row .rank {
  font-size: 1.4rem;
  font-weight: 900;
  width: 40px;
  color: var(--color-accent);
}

.leaderboard-row .player-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
}

.leaderboard-row .score {
  font-size: 1.4rem;
  font-weight: 900;
  color: #38bdf8;
}

/* Winner Podium */
.podium-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 700px;
  height: 320px;
  margin-top: 2rem;
}

.podium-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 180px;
}

.podium-player {
  margin-bottom: 0.8rem;
  text-align: center;
}

.podium-block {
  width: 100%;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 2rem;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.podium-step.first .podium-block {
  height: 220px;
  background: linear-gradient(135deg, #eab308, #ca8a04);
}

.podium-step.second .podium-block {
  height: 160px;
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.podium-step.third .podium-block {
  height: 110px;
  background: linear-gradient(135deg, #d97706, #b45309);
}

/* Utility Animations */
.animate-bounce {
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

/* Footer Note */
.app-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--surface-glass-border);
}

/* Modal Overlay & Card */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Saved Quizzes Grid & Cards */
.saved-quizzes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.saved-quiz-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.saved-quiz-card:hover {
  background: #ffffff;
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.saved-quiz-card.selected {
  border-color: #0284c7;
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.2);
  background: rgba(2, 132, 199, 0.08);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* Question Image Container */
.question-img-box {
  width: 100%;
  max-width: 440px;
  max-height: 230px;
  margin: 0.8rem auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid #e2e8f0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-img {
  width: 100%;
  height: 100%;
  max-height: 230px;
  object-fit: contain;
}

/* XML Code Inspector */
.xml-code-box {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  line-height: 1.4;
  background: #0f172a;
  color: #38bdf8;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  max-height: 380px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: text;
}

/* Dual-Mode Quiz Previewer Styles */
.preview-tab-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preview-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.preview-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
}

.visual-questions-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.4rem;
}

.preview-question-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.preview-q-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.preview-q-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.preview-q-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.preview-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.preview-opt-item {
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.preview-opt-item.correct {
  background: rgba(38, 137, 12, 0.12);
  border-color: #26890c;
  color: #15803d;
  font-weight: 700;
}

/* Rebuilt Long-Card Grid Layout for Available Test Library */
#hostUploadView .card {
  max-width: 1400px !important;
  width: 100% !important;
  padding: 2rem 2.5rem !important;
}

#librarySection {
  width: 100%;
}

.test-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.6rem;
  width: 100%;
  margin-top: 1rem;
}

.test-card-item {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 200px;
}

.test-card-item:hover {
  transform: translateY(-4px);
  border-color: #0284c7;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.18);
}


