/* ============================================================
   Build a Requirement — UTD First Year Program
   Shared Stylesheet
   ============================================================ */

/* ---- Color variables (Dark theme) ---- */
:root {
  --utd-orange: #E87500;
  --utd-orange-light: #FF9A3E;
  --utd-orange-hover: #FF8C1A;
  --utd-green: #1C6B4A;
  --utd-green-light: #238C5F;
  --utd-teal: #0F8A6A;
  --utd-blue: #0F9ED5;
  --white: #FFFFFF;
  --light-grey: #1A2332;
  --medium-grey: rgba(255, 255, 255, 0.45);
  --dark-text: #FFFFFF;
  --border-grey: rgba(255, 255, 255, 0.10);
  --success-green: #43A047;
  --success-bg: rgba(67, 160, 71, 0.12);
  --error-red: #EF5350;
  --error-bg: rgba(239, 83, 80, 0.12);
  --correct-green: #43A047;
  --correct-bg: rgba(67, 160, 71, 0.10);
  --wrong-red: #EF5350;
  --wrong-bg: rgba(239, 83, 80, 0.10);
  --bar-grey: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Dark theme surfaces */
  --bg-primary: #0A0F1A;
  --bg-surface: #111927;
  --bg-elevated: #1A2332;
  --bg-input: #1A2332;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.30);
}

/* ---- Particle canvas (shared across all pages) ---- */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---- Page transitions ---- */
body {
  animation: pageIn 0.5s ease-out;
}
body.page-exit {
  animation: pageOut 0.35s ease-in forwards;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pageOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Ensure content sits above the particle canvas */
.header-bar, .page-container, .landing-content, .landing-footer {
  position: relative;
  z-index: 1;
}

/* ---- Back button in header ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}
.back-link:hover {
  color: var(--white);
}
.back-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ---- Week grid (course landing) ---- */
.weeks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
}

.week-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
  opacity: 0.35;
}

.week-card .week-number {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 6px;
}

.week-card .week-title {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

.week-card.active {
  opacity: 1;
  border-color: var(--utd-orange);
  background: rgba(232, 117, 0, 0.08);
  cursor: pointer;
  box-shadow: 0 0 20px rgba(232, 117, 0, 0.1);
}

.week-card.active:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(232, 117, 0, 0.2);
  border-color: var(--utd-orange-light);
  background: rgba(232, 117, 0, 0.12);
}

.week-card.active .week-number {
  color: var(--utd-orange-light);
}

.week-card.active .week-title {
  color: var(--white);
  font-weight: 600;
}

/* ---- Mobile week hero card (only visible on mobile) ---- */
.mobile-week-hero {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.mobile-hero-card {
  display: block;
  width: 100%;
  max-width: 280px;
  padding: 18px 20px;
  background: rgba(232, 117, 0, 0.08);
  border: 2px solid var(--utd-orange);
  border-radius: var(--radius-md);
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 0 20px rgba(232, 117, 0, 0.1);
}

.mobile-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(232, 117, 0, 0.2);
  background: rgba(232, 117, 0, 0.12);
}

.mobile-hero-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--utd-orange);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 6px;
  margin-bottom: 8px;
}

.mobile-hero-number {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--utd-orange-light);
  margin-bottom: 2px;
}

.mobile-hero-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.mobile-hero-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.mobile-hero-arrow {
  margin-top: 8px;
  color: var(--utd-orange);
}

.show-all-btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  padding: 12px 28px;
  color: rgba(255, 255, 255, 0.4);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
  outline: none;
}

.show-all-btn:hover,
.show-all-btn:active {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 600px) {
  .mobile-week-hero {
    display: flex !important;
  }
  .weeks-grid {
    display: none !important;
  }
  .weeks-grid.mobile-show {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
    padding-bottom: 80px;
    animation: fadeIn 0.4s ease;
  }
  .course-content {
    min-height: auto;
    padding-bottom: 80px;
  }
  .course-footer {
    position: relative;
    bottom: auto;
    margin-top: 32px;
    padding-bottom: 24px;
  }
}

/* ---- Recent codes (join page) ---- */
.recent-codes {
  margin-top: 24px;
  text-align: center;
}

.recent-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 10px;
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.recent-chip {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-grey);
  border-radius: 50px;
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--utd-orange-light);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.08em;
}

.recent-chip:hover {
  background: rgba(232, 117, 0, 0.1);
  border-color: var(--utd-orange);
  color: var(--white);
  transform: translateY(-1px);
}

/* ---- Reset and base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--dark-text);
  background: var(--bg-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--utd-orange-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--utd-orange);
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

@keyframes barGrow {
  from { width: 0; }
}

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

@keyframes countPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

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

@keyframes checkmark {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

.fade-in-scale {
  animation: fadeInScale 0.3s ease forwards;
}

/* ---- Layout containers ---- */
.page-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-container.wide {
  max-width: 900px;
}

.page-container.projector {
  max-width: 1200px;
  padding: 40px 48px;
}

.page-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ---- Header bar ---- */
.header-bar {
  background: var(--bg-surface);
  color: var(--white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-bar .brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-bar .session-code {
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.15);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

.header-bar .header-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}

/* ---- Hero section (landing page) ---- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--utd-green) 0%, var(--utd-teal) 50%, var(--utd-green-light) 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  color: var(--white);
  min-height: 100vh;
}

.hero-icon {
  width: 80px;
  height: 80px;
  background: var(--utd-orange);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(232, 117, 0, 0.4);
  animation: fadeInScale 0.6s ease forwards;
}

.hero-icon svg {
  width: 44px;
  height: 44px;
  fill: var(--white);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero .subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 48px;
  max-width: 400px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero .footer-line {
  position: absolute;
  bottom: 32px;
  font-size: 0.85rem;
  opacity: 0.65;
  animation: fadeIn 0.6s ease 0.5s both;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  min-height: 48px;
  min-width: 48px;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 3px solid var(--utd-blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--utd-orange);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(232, 117, 0, 0.35);
}
.btn-primary:hover {
  background: var(--utd-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 117, 0, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(232, 117, 0, 0.3);
}

.btn-secondary {
  background: var(--utd-green);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--utd-green-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--utd-orange-light);
  border: 2px solid rgba(255, 255, 255, 0.15);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-danger {
  background: var(--error-red);
  color: var(--white);
}
.btn-danger:hover {
  background: #B71C1C;
}

.btn-small {
  padding: 8px 18px;
  font-size: 0.9rem;
  min-height: 40px;
}

.btn-large {
  padding: 18px 48px;
  font-size: 1.2rem;
  border-radius: var(--radius-lg);
  animation: fadeInUp 0.6s ease 0.3s both;
}

.btn-full {
  width: 100%;
}

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

/* ---- Cards ---- */
.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow var(--transition-normal);
  border: 1px solid var(--border-grey);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.14);
}

.card-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--utd-orange-light);
  margin-bottom: 12px;
}

/* ---- Form elements ---- */
.input-group {
  width: 100%;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--medium-grey);
  margin-bottom: 8px;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border-grey);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-family: inherit;
  color: var(--white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--bg-input);
  outline: none;
}

.input-field:focus {
  border-color: var(--utd-orange);
  box-shadow: 0 0 0 3px rgba(232, 117, 0, 0.2);
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.input-field.code-input {
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---- Error / success messages ---- */
.message {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  margin-bottom: 16px;
  animation: slideDown 0.3s ease;
}

.message-error {
  background: var(--error-bg);
  color: var(--error-red);
  border: 1px solid #FFCDD2;
}

.message-success {
  background: var(--success-bg);
  color: var(--success-green);
  border: 1px solid #C8E6C9;
}

/* ---- Waiting / pulse screen ---- */
.waiting-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.waiting-dot-group {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
}

.waiting-dot {
  width: 14px;
  height: 14px;
  background: var(--utd-orange);
  border-radius: 50%;
  animation: pulseRing 1.4s ease infinite;
}
.waiting-dot:nth-child(2) { animation-delay: 0.2s; }
.waiting-dot:nth-child(3) { animation-delay: 0.4s; }

.waiting-text {
  font-size: 1.2rem;
  color: var(--medium-grey);
  font-weight: 500;
}

.waiting-subtext {
  font-size: 0.95rem;
  color: var(--medium-grey);
  opacity: 0.7;
  margin-top: 8px;
}

/* ---- Question display ---- */
.question-number {
  display: inline-block;
  background: var(--utd-green);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.question-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 12px;
  line-height: 1.4;
}

.question-subtext {
  font-size: 1.05rem;
  color: var(--medium-grey);
  font-style: italic;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--light-grey);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--utd-orange);
}

/* ---- Option buttons ---- */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border: 2px solid var(--border-grey);
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-normal);
  color: var(--white);
  line-height: 1.45;
  min-height: 54px;
}

.option-btn:hover {
  border-color: var(--utd-orange);
  background: rgba(232, 117, 0, 0.08);
  box-shadow: var(--shadow-sm);
}

.option-btn:active {
  transform: scale(0.985);
}

.option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--utd-orange-light);
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.option-text {
  flex: 1;
  padding-top: 4px;
}

/* Selected state */
.option-btn.selected {
  border-color: var(--utd-orange);
  background: rgba(232, 117, 0, 0.12);
  box-shadow: 0 0 0 3px rgba(232, 117, 0, 0.15);
}
.option-btn.selected .option-key {
  background: var(--utd-orange);
  color: var(--white);
}

/* Correct / wrong states */
.option-btn.correct {
  border-color: var(--correct-green);
  background: var(--correct-bg);
}
.option-btn.correct .option-key {
  background: var(--correct-green);
  color: var(--white);
}

.option-btn.wrong {
  border-color: var(--wrong-red);
  background: var(--wrong-bg);
}
.option-btn.wrong .option-key {
  background: var(--wrong-red);
  color: var(--white);
}

.option-btn.dimmed {
  opacity: 0.5;
}

.option-btn.locked {
  cursor: default;
  pointer-events: none;
}

/* ---- Result / feedback ---- */
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
  animation: fadeInScale 0.3s ease;
}

.result-badge.correct {
  background: var(--correct-bg);
  color: var(--correct-green);
}

.result-badge.wrong {
  background: var(--wrong-bg);
  color: var(--wrong-red);
}

.explanation-box {
  background: var(--light-grey);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-top: 20px;
  border-left: 4px solid var(--utd-green);
  animation: fadeInUp 0.4s ease;
}

.explanation-box .explain-label {
  font-weight: 700;
  color: var(--utd-green);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.explanation-box p {
  color: var(--dark-text);
  font-size: 1rem;
  line-height: 1.5;
}

/* ---- Answer count ---- */
.answer-count {
  text-align: center;
  padding: 16px;
  margin-top: 20px;
  color: var(--medium-grey);
  font-size: 1rem;
}

.answer-count .count-number {
  font-weight: 700;
  color: var(--utd-orange);
  font-size: 1.3rem;
  display: inline-block;
  transition: transform 0.2s ease;
}

.answer-count .count-number.pop {
  animation: countPop 0.3s ease;
}

/* ---- Result summary (correct vs incorrect) ---- */
.result-summary {
  width: 100%;
  margin-top: 20px;
  margin-bottom: 8px;
}

.summary-row {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.summary-card {
  flex: 1;
  max-width: 340px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  text-align: center;
}

.summary-correct {
  background: rgba(39, 139, 58, 0.08);
  border: 2px solid var(--correct-green);
}

.summary-incorrect {
  background: rgba(192, 57, 43, 0.08);
  border: 2px solid var(--wrong-red);
}

.summary-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.summary-correct .summary-number {
  color: var(--correct-green);
}

.summary-incorrect .summary-number {
  color: var(--wrong-red);
}

.summary-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--medium-grey);
  margin-bottom: 12px;
}

.summary-bar-track {
  height: 10px;
  background: var(--light-grey);
  border-radius: 5px;
  overflow: hidden;
}

.summary-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.summary-bar-correct {
  background: var(--correct-green);
}

.summary-bar-incorrect {
  background: var(--wrong-red);
}

.bar-row-correct {
  background: rgba(39, 139, 58, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-left: -12px;
  margin-right: -12px;
}

.correct-marker {
  color: var(--correct-green);
  font-weight: 800;
}

/* ---- Bar chart (projector) ---- */
.bar-chart {
  width: 100%;
  margin-top: 24px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 8px 0;
}

.bar-label {
  min-width: 44px;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--utd-green);
  text-align: center;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 48px;
  background: var(--light-grey);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding-left: 14px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 0;
}

.bar-fill.correct-bar {
  background: linear-gradient(135deg, var(--correct-green), #43A047);
}

.bar-fill.wrong-bar {
  background: var(--bar-grey);
}

.bar-fill.selected-wrong-bar {
  background: linear-gradient(135deg, var(--wrong-red), #E53935);
}

.bar-count {
  min-width: 48px;
  text-align: right;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark-text);
  flex-shrink: 0;
}

.bar-percent {
  font-size: 0.85rem;
  color: var(--medium-grey);
  font-weight: 400;
}

/* ---- Projector-specific ---- */
.projector-body {
  background: var(--bg-primary);
  min-height: 100vh;
}

.projector-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}

.projector-session-code {
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 5rem;
  font-weight: 800;
  color: var(--utd-orange);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  animation: fadeInScale 0.5s ease;
}

.projector-join-url {
  font-size: 1.4rem;
  color: var(--medium-grey);
  margin-bottom: 24px;
}

.projector-student-count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--utd-green);
}

.projector-student-count .count-number {
  color: var(--utd-orange);
  font-size: 2.5rem;
}

.projector-question-text {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.projector-question-subtext {
  font-size: 1.4rem;
  color: var(--medium-grey);
  font-style: italic;
  margin-bottom: 32px;
  padding: 18px 24px;
  background: var(--light-grey);
  border-radius: var(--radius-sm);
  border-left: 5px solid var(--utd-orange);
}

.projector-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.projector-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--light-grey);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  border: 3px solid transparent;
  transition: all var(--transition-normal);
}

.projector-option .option-key {
  min-width: 48px;
  height: 48px;
  font-size: 1.2rem;
  border-radius: 12px;
}

.projector-option.correct {
  border-color: var(--correct-green);
  background: var(--correct-bg);
}
.projector-option.correct .option-key {
  background: var(--correct-green);
  color: var(--white);
}

.projector-explanation {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  margin-top: 28px;
  border-left: 5px solid var(--utd-orange);
  animation: fadeInUp 0.4s ease;
  border: 1px solid var(--border-grey);
  border-left: 5px solid var(--utd-orange);
}

.projector-explanation .explain-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--utd-orange-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.projector-explanation p {
  font-size: 1.3rem;
  line-height: 1.5;
}

.projector-answer-count {
  text-align: center;
  padding: 24px;
  font-size: 1.5rem;
  color: var(--medium-grey);
}

.projector-answer-count .count-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--utd-orange);
}

/* ---- Exit ticket ---- */
.exit-ticket-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.et-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-grey);
  transition: background var(--transition-normal);
}

.et-dot.active {
  background: var(--utd-orange);
}

.et-dot.done {
  background: var(--correct-green);
}

/* ---- Thank you screen ---- */
.thank-you {
  text-align: center;
  padding: 60px 20px;
  animation: fadeInUp 0.5s ease;
}

.thank-you .check-circle {
  width: 80px;
  height: 80px;
  background: var(--correct-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: checkmark 0.5s ease;
}

.thank-you .check-circle .checkmark {
  font-size: 2.5rem;
  color: var(--correct-green);
  font-weight: 700;
}

.thank-you h2 {
  font-size: 1.8rem;
  color: var(--utd-green);
  margin-bottom: 12px;
}

.thank-you p {
  color: var(--medium-grey);
  font-size: 1.1rem;
}

/* ---- Admin: session list ---- */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-header h1 {
  font-size: 1.5rem;
  color: var(--utd-green);
}

.session-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.session-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.14);
}

.session-card .session-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-card .session-code-label {
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--utd-orange);
}

.session-card .session-meta {
  font-size: 0.85rem;
  color: var(--medium-grey);
}

.session-card .session-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.state-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.state-badge.waiting { background: rgba(232, 117, 0, 0.15); color: var(--utd-orange-light); }
.state-badge.question { background: rgba(15, 158, 213, 0.15); color: var(--utd-blue); }
.state-badge.revealed { background: rgba(160, 60, 200, 0.15); color: #CE93D8; }
.state-badge.exitTicket { background: rgba(67, 160, 71, 0.15); color: var(--correct-green); }
.state-badge.done { background: rgba(255, 255, 255, 0.06); color: var(--medium-grey); }

/* ---- Admin create form ---- */
.create-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 32px;
}

.create-form .input-group {
  flex: 1;
  margin-bottom: 0;
}

/* ---- Admin live panel ---- */
.live-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border-grey);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--utd-orange-light);
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--medium-grey);
  margin-top: 4px;
}

.control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.control-buttons .btn {
  flex: 1;
  min-width: 140px;
}

.question-preview {
  background: var(--bg-elevated);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.question-preview .preview-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--medium-grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.question-preview .preview-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 8px;
}

.question-preview .preview-answer {
  font-size: 0.9rem;
  color: var(--correct-green);
  font-weight: 600;
}

.response-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.response-count-pill {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-grey);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}

.response-count-pill.is-correct {
  border-color: var(--correct-green);
  color: var(--correct-green);
}

/* Exit ticket results panel */
.et-results {
  margin-top: 24px;
}

.et-results h3 {
  font-size: 1.1rem;
  color: var(--utd-green);
  margin-bottom: 16px;
}

.et-result-item {
  margin-bottom: 16px;
  background: var(--light-grey);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.et-result-item .et-question {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--dark-text);
}

.et-mini-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.et-mini-bar-label {
  min-width: 140px;
  font-size: 0.85rem;
  color: var(--dark-text);
  text-align: right;
}

.et-mini-bar-track {
  flex: 1;
  height: 24px;
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
}

.et-mini-bar-fill {
  height: 100%;
  background: var(--utd-orange);
  border-radius: 4px;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--white);
}

.et-mini-bar-count {
  min-width: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--medium-grey);
}

/* ---- Projector bar sizes ---- */
.projector-body .bar-track {
  height: 56px;
}

.projector-body .bar-label {
  font-size: 1.6rem;
  min-width: 56px;
}

.projector-body .bar-fill {
  font-size: 1.3rem;
}

.projector-body .bar-count {
  font-size: 1.3rem;
  min-width: 60px;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--medium-grey);
}

.empty-state p {
  font-size: 1.1rem;
}

/* ---- Utility ---- */
.hidden {
  display: none !important;
}

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

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .page-container {
    padding: 16px 14px;
  }

  .page-container.projector {
    padding: 20px 16px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .question-text {
    font-size: 1.15rem;
  }

  .projector-question-text {
    font-size: 1.4rem;
  }

  .projector-question-subtext {
    font-size: 1.05rem;
  }

  .projector-session-code {
    font-size: 3rem;
  }

  .projector-student-count {
    font-size: 1.3rem;
  }

  .projector-student-count .count-number {
    font-size: 1.6rem;
  }

  .projector-option {
    font-size: 1.1rem;
    padding: 14px 18px;
  }

  .projector-option .option-key {
    min-width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .projector-explanation p {
    font-size: 1.05rem;
  }

  .projector-answer-count {
    font-size: 1.1rem;
  }

  .projector-answer-count .count-number {
    font-size: 1.4rem;
  }

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

  .control-buttons {
    flex-direction: column;
  }

  .control-buttons .btn {
    min-width: unset;
  }

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

  .session-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-bar {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .bar-track {
    height: 36px;
  }

  .bar-label {
    font-size: 1rem;
    min-width: 32px;
  }

  .bar-fill {
    font-size: 0.9rem;
  }

  .bar-count {
    font-size: 0.9rem;
    min-width: 36px;
  }
}

/* Large screens (projector) */
@media (min-width: 1200px) {
  .projector-question-text {
    font-size: 2.6rem;
  }

  .projector-question-subtext {
    font-size: 1.6rem;
  }

  .projector-session-code {
    font-size: 7rem;
  }

  .projector-option {
    font-size: 1.7rem;
    padding: 22px 28px;
  }

  .projector-option .option-key {
    min-width: 56px;
    height: 56px;
    font-size: 1.4rem;
  }

  .projector-explanation p {
    font-size: 1.5rem;
  }

  .projector-body .bar-track {
    height: 64px;
  }

  .projector-body .bar-label {
    font-size: 1.8rem;
  }

  .projector-body .bar-fill {
    font-size: 1.5rem;
  }

  .projector-body .bar-count {
    font-size: 1.5rem;
  }
}
