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

:root {
  --bg-primary: #07080e;
  --bg-secondary: #0b0f19;
  --bg-card: rgba(14, 19, 34, 0.85);
  --bg-card-hover: rgba(22, 30, 52, 0.95);
  --bg-input: #121829;
  --border-color: rgba(56, 189, 248, 0.15);
  --border-glow: rgba(56, 189, 248, 0.4);
  --border-active: #00d2ef;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --techyug-cyan: #00d2ef;
  --techyug-blue: #38bdf8;
  --techyug-purple: #a855f7;
  --techyug-gold: #fcbb00;
  --techyug-green: #00c758;
  --techyug-red: #ef4444;
  
  --char-correct: #00c758;
  --char-incorrect-bg: rgba(239, 68, 68, 0.35);
  --char-incorrect-color: #fca5a5;
  --char-active-cursor: #00d2ef;
  --char-pending: #64748b;
  
  --font-display: 'Audiowide', cursive, sans-serif;
  --font-outfit: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
}

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

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

/* Background Cyber Grid effect matching TechYug */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 210, 239, 0.12), transparent 45%),
    radial-gradient(circle at 90% 70%, rgba(168, 85, 247, 0.08), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(252, 187, 0, 0.05), transparent 35%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* Top Navigation Bar */
.techyug-nav {
  background: rgba(7, 8, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.techyug-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.techyug-brand-link:hover {
  opacity: 0.9;
}

.techyug-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(0, 210, 239, 0.4);
}

.techyug-brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff 30%, var(--techyug-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.techyug-college-badge {
  font-family: var(--font-outfit);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--techyug-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-right-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.main-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 210, 239, 0.1);
  border: 1px solid rgba(0, 210, 239, 0.3);
  color: var(--techyug-cyan);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.main-site-btn:hover {
  background: rgba(0, 210, 239, 0.2);
  border-color: var(--techyug-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 239, 0.3);
}

.container {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  flex: 1;
}

/* Event Banner Header */
.event-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.event-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--techyug-purple);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.event-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #ffffff 20%, var(--techyug-cyan) 60%, var(--techyug-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 25px rgba(0, 210, 239, 0.3);
}

.event-subtitle {
  font-family: var(--font-outfit);
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* Cards with TechYug glassmorphism */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--border-glow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-title {
  font-family: var(--font-outfit);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-outfit);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--techyug-cyan), #0284c7);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 210, 239, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 239, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--techyug-green), #16a34a);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 199, 88, 0.35);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 199, 88, 0.5);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--techyug-cyan);
}

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

.btn-large {
  font-size: 1.15rem;
  padding: 0.9rem 2rem;
  border-radius: 12px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--techyug-cyan);
  box-shadow: 0 0 0 3px rgba(0, 210, 239, 0.2);
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper .form-input {
  padding-right: 2.75rem;
}

.password-toggle-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.35rem;
  cursor: pointer;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  user-select: none;
  z-index: 2;
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-dim);
  transition: stroke 0.2s ease, transform 0.2s ease;
}

.password-toggle-btn:hover {
  background: rgba(0, 210, 239, 0.12);
}

.password-toggle-btn:hover svg {
  stroke: var(--techyug-cyan);
}

/* Status Dot */
.header-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--techyug-green);
  box-shadow: 0 0 8px var(--techyug-green);
}

.status-dot.offline {
  background-color: var(--techyug-red);
  box-shadow: 0 0 8px var(--techyug-red);
}

/* Stats Cards (Admin HUD & Participant Timer) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  position: relative;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1.2;
}

.stat-value.highlight {
  color: var(--techyug-cyan);
  text-shadow: 0 0 12px rgba(0, 210, 239, 0.4);
}

.stat-value.timer {
  color: var(--techyug-gold);
}

.stat-value.accuracy {
  color: var(--techyug-green);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
  font-weight: 600;
}

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--bg-input);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

/* Modern Unified Arena Stage */
body.arena-fullscreen-active {
  overflow: hidden;
  background: #060913;
}

body.arena-fullscreen-active .techyug-nav,
body.arena-fullscreen-active .event-header,
body.arena-fullscreen-active .app-footer {
  display: none !important;
}

body.arena-fullscreen-active .container {
  max-width: 100% !important;
  width: 100vw !important;
  min-height: 100vh !important;
  height: 100vh !important;
  padding: 1.25rem 2rem !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

body.arena-fullscreen-active #arenaScreen {
  width: 100% !important;
  max-width: 1100px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column;
}

body.arena-fullscreen-active .arena-card {
  padding: 1.75rem 2.25rem;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 210, 239, 0.15);
}

body.arena-fullscreen-active .typing-passage-box {
  min-height: 250px;
  max-height: calc(100vh - 350px);
  font-size: 1.45rem;
  line-height: 2.2;
  padding: 1.8rem 2.2rem;
}

.arena-card {
  background: rgba(13, 17, 30, 0.85);
  border: 1px solid rgba(0, 210, 239, 0.25);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 210, 239, 0.08);
  padding: 1.5rem 1.75rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.arena-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
  padding: 0.9rem 1.35rem;
  background: rgba(10, 15, 29, 0.75);
  border: 1px solid rgba(0, 210, 239, 0.25);
  border-radius: 14px;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 210, 239, 0.04);
}

.hud-left-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hud-timer-badge {
  background: rgba(252, 187, 0, 0.14);
  border: 1.5px solid rgba(252, 187, 0, 0.45);
  border-radius: 12px;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: 0 0 16px rgba(252, 187, 0, 0.15);
}

.hud-timer-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.hud-timer-val {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: var(--techyug-gold);
  text-shadow: 0 0 16px rgba(252, 187, 0, 0.55);
  letter-spacing: 0.06em;
  line-height: 1;
}

.hud-progress-pill {
  background: rgba(0, 210, 239, 0.12);
  border: 1.5px solid rgba(0, 210, 239, 0.35);
  border-radius: 12px;
  padding: 0.5rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--techyug-cyan);
  box-shadow: 0 0 14px rgba(0, 210, 239, 0.1);
}

.hud-right-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.hud-char-count {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-shield-tag {
  background: rgba(0, 199, 88, 0.14);
  border: 1px solid rgba(0, 199, 88, 0.4);
  color: var(--techyug-green);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.arena-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1.35rem;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.arena-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--techyug-cyan), var(--techyug-purple));
  box-shadow: 0 0 12px var(--techyug-cyan);
  transition: width 0.15s ease-out;
}

/* Sleek Typing Passage Box */
.typing-passage-box {
  background: rgba(6, 9, 18, 0.92);
  border: 1px solid rgba(0, 210, 239, 0.18);
  border-radius: 14px;
  padding: 1.6rem 1.8rem;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 1.35rem;
  line-height: 2.1;
  letter-spacing: 0.035em;
  min-height: 150px;
  max-height: 230px;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
  user-select: none;
  cursor: text;
  margin-bottom: 1.15rem;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6);
}

.typing-passage-box::-webkit-scrollbar {
  width: 6px;
}

.typing-passage-box::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.typing-passage-box::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 239, 0.3);
  border-radius: 999px;
}

.char {
  position: relative;
  transition: color 0.04s, background-color 0.04s;
}

.char.pending {
  color: rgba(140, 160, 195, 0.55);
}

.char.correct {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.char.incorrect {
  background-color: rgba(255, 82, 82, 0.22);
  color: #ff5252;
  text-decoration: underline wavy #ff5252;
  border-radius: 2px;
}

.char.cursor-position::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 12%;
  height: 76%;
  width: 2.5px;
  background-color: var(--techyug-cyan);
  box-shadow: 0 0 8px var(--techyug-cyan), 0 0 16px var(--techyug-cyan);
  border-radius: 2px;
  animation: cursor-pulse 0.9s ease-in-out infinite;
}

@keyframes cursor-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.25; transform: scaleY(0.9); }
}

/* Featherlight Floating Input Bar */
.typing-input-bar-container {
  position: relative;
}

.typing-input-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(18, 24, 42, 0.95);
  border: 1.5px solid rgba(0, 210, 239, 0.4);
  border-radius: 12px;
  padding: 0.75rem 1.15rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.typing-input-pill:focus-within {
  border-color: var(--techyug-cyan);
  box-shadow: 0 0 0 3px rgba(0, 210, 239, 0.2), 0 6px 25px rgba(0, 210, 239, 0.25);
  background: rgba(22, 30, 52, 0.98);
}

.typing-input-icon {
  font-size: 1.25rem;
  opacity: 0.7;
}

.typing-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.typing-input-field::placeholder {
  color: rgba(140, 160, 195, 0.45);
  font-size: 0.95rem;
}

.typing-input-field:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.typing-helper-hint {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  padding: 0 0.25rem;
}

/* Fullscreen High-Performance Smooth Countdown Overlay */
.countdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 14, 0.94);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.countdown-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.countdown-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem;
}

.countdown-aura-ring {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 239, 0.28) 0%, rgba(168, 85, 247, 0.18) 50%, transparent 70%);
  filter: blur(35px);
  pointer-events: none;
  animation: aura-pulse 2s ease-in-out infinite alternate;
}

@keyframes aura-pulse {
  0% { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 0.95; }
}

.countdown-text {
  font-family: var(--font-outfit);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--techyug-cyan);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(0, 210, 239, 0.6);
}

.countdown-number {
  font-size: clamp(6.5rem, 22vw, 13rem);
  font-weight: 900;
  font-family: var(--font-display);
  line-height: 1;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, #ffffff 0%, var(--techyug-cyan) 50%, var(--techyug-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 35px rgba(0, 210, 239, 0.7));
  will-change: transform, opacity;
  transform: translateZ(0);
}

.countdown-number.countdown-tick {
  animation: smooth-countdown-tick 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.countdown-number.countdown-go {
  background: linear-gradient(135deg, #ffffff 0%, #00ff88 45%, var(--techyug-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 50px rgba(0, 255, 136, 0.9));
  animation: smooth-countdown-go 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes smooth-countdown-tick {
  0% {
    transform: scale(0.4) translateY(12px);
    opacity: 0;
    filter: blur(10px);
  }
  20% {
    transform: scale(1.15) translateY(-4px);
    opacity: 1;
    filter: blur(0px);
  }
  40% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  85% {
    transform: scale(0.98) translateY(0);
    opacity: 1;
  }
  100% {
    transform: scale(0.9) translateY(-8px);
    opacity: 0.2;
  }
}

@keyframes smooth-countdown-go {
  0% {
    transform: scale(0.35);
    opacity: 0;
    filter: blur(12px);
  }
  40% {
    transform: scale(1.35);
    opacity: 1;
    filter: blur(0px);
  }
  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.countdown-subtext {
  font-family: var(--font-outfit);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 0.75rem;
}

.countdown-fullscreen-btn {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-outfit);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 210, 239, 0.15);
  border: 1.5px solid rgba(0, 210, 239, 0.5);
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 210, 239, 0.2);
  transition: all 0.2s ease;
  pointer-events: auto;
}

.countdown-fullscreen-btn:hover {
  background: rgba(0, 210, 239, 0.3);
  border-color: var(--techyug-cyan);
  box-shadow: 0 0 25px rgba(0, 210, 239, 0.45);
  transform: translateY(-1px);
}

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

/* Leaderboard Table (Admin) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.leaderboard-table th {
  background: #090d17;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.leaderboard-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.leaderboard-table tr:hover td {
  background: var(--bg-card-hover);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-waiting {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-typing {
  background: rgba(0, 210, 239, 0.15);
  color: var(--techyug-cyan);
  border: 1px solid rgba(0, 210, 239, 0.3);
}

.badge-typing::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--techyug-cyan);
  animation: pulse-dot 1.2s infinite;
}

.badge-finished {
  background: rgba(0, 199, 88, 0.15);
  color: var(--techyug-green);
  border: 1px solid rgba(0, 199, 88, 0.3);
}

.badge-timed-out {
  background: rgba(252, 187, 0, 0.15);
  color: var(--techyug-gold);
  border: 1px solid rgba(252, 187, 0, 0.3);
}

.badge-disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--techyug-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.4; }
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
}

.rank-1 {
  background: linear-gradient(135deg, #fcbb00, #d97706);
  color: #000;
}

.rank-2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #000;
}

.rank-3 {
  background: linear-gradient(135deg, #d97706, #78350f);
  color: #fff;
}

/* Modals */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.qr-modal.active {
  opacity: 1;
  pointer-events: all;
}

.qr-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 0 30px rgba(0, 210, 239, 0.25);
}

.qr-code-box {
  background: #ffffff;
  padding: 1rem;
  border-radius: 12px;
  display: inline-block;
  margin: 1rem 0;
}

/* Submission Confirmation Card (Participant) */
.confirmation-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  max-width: 600px;
  margin: 2rem auto;
}

.success-icon-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 199, 88, 0.15);
  border: 2px solid var(--techyug-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 0 25px rgba(0, 199, 88, 0.35);
}

.confirmation-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, var(--techyug-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.submission-meta-box {
  background: rgba(14, 20, 36, 0.7);
  border: 1px solid rgba(0, 210, 239, 0.18);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
  font-size: 0.95rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.submission-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.submission-meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

.submission-meta-row:first-child {
  padding-top: 0.2rem;
}

.wpm-hero-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto 1.75rem auto;
}

.wpm-hero-number {
  font-family: var(--font-mono);
  font-size: clamp(3.8rem, 11vw, 5.2rem);
  font-weight: 900;
  line-height: 1;
  color: var(--techyug-cyan);
  text-shadow: 0 0 25px rgba(0, 210, 239, 0.55), 0 0 50px rgba(0, 210, 239, 0.25);
  letter-spacing: -0.02em;
}

.wpm-hero-label {
  font-family: var(--font-outfit);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.5rem;
}

/* Footer */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: rgba(7, 8, 14, 0.6);
}

.app-footer a {
  color: var(--techyug-cyan);
  text-decoration: none;
  font-weight: 600;
}

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

@media (max-width: 768px) {
  .container {
    padding: 1rem 0.75rem;
  }
  
  .typing-passage-box {
    font-size: 1.05rem;
    padding: 1rem;
    line-height: 1.6;
  }
  
  .typing-input {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
  
  .event-title {
    font-size: 1.6rem;
  }
  
  .techyug-brand-title {
    font-size: 1.1rem;
  }
}
