/* ============================================
   QuizOpus — Page-Specific Styles
   Consolidated from individual HTML <style> blocks.
   ============================================ */

/* ──────────────────────────────────────────
   index.html — Login / Create Project
   ────────────────────────────────────────── */
body.page-index {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 20px;
}
.page-index h1 {
  font-size: 32px; font-weight: 800; letter-spacing: 1px; margin-bottom: 8px;
  background: linear-gradient(135deg, #60a5fa, #8b5cf6, #f472b6);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: fadeSlideUp 0.5s var(--smooth);
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.25));
}
.page-index p.subtitle {
  color: var(--text-muted); margin-bottom: 36px; font-size: 14px;
  font-weight: 500; letter-spacing: 0.5px;
  animation: fadeSlideUp 0.6s var(--smooth) 0.08s both;
}
.page-index .card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-xl);
  border-radius: var(--radius-xl); padding: 32px;
  width: 100%; max-width: 420px; position: relative;
  animation: fadeSlideUp 0.7s var(--smooth) 0.12s both;
}
.page-index .card::before {
  content: ''; position: absolute; top: -1px; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.45), rgba(139,92,246,0.4), rgba(236,72,153,0.25), transparent);
  border-radius: 2px;
}
.page-index label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  display: block; margin-bottom: 6px; text-transform: uppercase;
  letter-spacing: 0.05em; transition: color 0.25s;
}
.page-index input {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--glass-border); background: rgba(15, 23, 42, 0.5);
  color: white; font-size: 15px; font-family: var(--font-family); margin-bottom: 16px;
  transition: border-color 0.35s var(--smooth), background 0.35s var(--smooth), box-shadow 0.35s var(--smooth);
}
.page-index input:hover { border-color: var(--glass-border-hover); background: rgba(15, 23, 42, 0.65); }
.page-index input:focus {
  outline: none; border-color: var(--primary); background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12), 0 0 24px rgba(59,130,246,0.08), inset 0 0 0 1px rgba(59,130,246,0.1);
}
.page-index input::placeholder { color: var(--text-faint); }
.page-index .tabs {
  display: flex; background: rgba(15, 23, 42, 0.5); border-radius: 30px;
  padding: 4px; margin-bottom: 24px; border: 1px solid var(--glass-border);
}
.page-index .tab {
  flex: 1; text-align: center; padding: 12px; color: var(--text-faint);
  cursor: pointer; font-weight: 600; font-size: 14px;
  transition: all 0.4s var(--smooth); position: relative; z-index: 10; border-radius: 26px;
}
.page-index .tab:hover:not(.active) { color: var(--text-muted); }
.page-index .tab.active {
  color: white; background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255,255,255,0.12);
}
.page-index .btn:not(.credential-row .btn) {
  width: 100%; padding: 15px; border-radius: var(--radius-md); border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform 0.5s var(--spring), box-shadow 0.4s var(--smooth), filter 0.3s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255,255,255,0.12);
  position: relative; overflow: hidden; font-family: var(--font-family);
}
.page-index .btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.03) 40%, transparent 100%);
  pointer-events: none;
}
.page-index .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); filter: brightness(1.08); }
.page-index .btn:active { transform: translateY(0) scale(0.97); box-shadow: var(--shadow-sm); transition-duration: 0.1s; filter: brightness(0.95); }
.page-index .btn:disabled { background: rgba(51, 65, 85, 0.6); color: var(--text-faint); cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(0.4); }
.magic-text { font-size: 11px; color: #64748b; margin-top: -8px; margin-bottom: 16px; display: flex; align-items: center; gap: 4px; }
.magic-text i { color: #f59e0b; }
.restore-link { display: block; text-align: center; font-size: 13px; color: #64748b; margin-top: 16px; text-decoration: none; cursor: pointer; transition: color 0.2s; }
.restore-link:hover { color: #94a3b8; text-decoration: underline; }
.status-msg-box { display: none; color: #fca5a5; font-size: 13px; margin-bottom: 16px; padding: 12px; background: rgba(239, 68, 68, 0.1); border-radius: 10px; border: 1px solid rgba(239, 68, 68, 0.2); text-align: center; }
.page-index .btn-micro:hover { background: rgba(255,255,255,0.1); color: white; }
.page-index .label-row label { margin-bottom: 0; }

/* ──────────────────────────────────────────
   admin.html — Admin Dashboard
   ────────────────────────────────────────── */
body.page-admin { padding: 0; }
.admin-container { width: 100%; margin: 0 auto; }
.admin-body { margin-top: 60px; padding: 24px; }
.tabs { display: flex; gap: 2px; margin-bottom: 24px; overflow-x: auto; padding: 4px; background: rgba(15,23,42,0.5); border-radius: var(--radius-md); border: 1px solid var(--glass-border); backdrop-filter: blur(8px); }
.tab-btn { padding: 10px 16px; background: transparent; border: none; color: var(--text-faint); font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 10px; transition: all 0.35s var(--smooth); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; position: relative; font-family: var(--font-family); }
.tab-btn.active { color: white; background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(99,102,241,0.2)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 16px rgba(59,130,246,0.15), 0 2px 8px rgba(0,0,0,0.2); }
.tab-btn:hover:not(.active) { color: var(--text-muted); background: rgba(255,255,255,0.05); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: tabSlideIn 0.4s var(--smooth); }
@keyframes tabSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.section { margin-bottom: 24px; }
.section h2 { font-size: 15px; color: var(--text-main); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { text-align: center; padding: 20px; transition: transform 0.4s var(--spring), box-shadow 0.3s var(--smooth); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-num { font-size: 32px; font-weight: 800; color: var(--primary); background: linear-gradient(135deg, #60a5fa, #3b82f6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 8px; font-weight: 600; text-transform: uppercase; }
.po-cell.conflict { background: #f85149; border-color: rgba(255,0,0,0.2); animation: pulse-red 2s infinite; }
.po-cell.inprogress { background: #1f6feb; border-color: rgba(31,111,235,0.1); }
@keyframes pulse-red { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }
.answer-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); margin-bottom: 6px; font-size: 13px; }
.ans-preview { width: 80px; height: 24px; object-fit: contain; cursor: pointer; border-radius: 3px; background: white; transition: transform 0.3s var(--spring); }
.ans-preview:hover { transform: scale(1.3); }
.entry-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.entry-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(145deg, rgba(30,41,59,0.6), rgba(15,23,42,0.8)); border: 1px solid var(--glass-border); border-radius: var(--radius-md); transition: all 0.35s var(--smooth); cursor: default; position: relative; }
.entry-card:hover { border-color: rgba(59,130,246,0.35); background: rgba(30,41,59,0.85); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25), 0 0 12px rgba(59,130,246,0.06); }
.entry-card.selected { border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.08); }
.entry-card .entry-info { flex: 1; min-width: 0; }
.entry-card .entry-name { font-weight: 700; font-size: 14px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-card .entry-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.entry-card .entry-num-badge { background: rgba(59,130,246,0.12); color: #60a5fa; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; border: 1px solid rgba(59,130,246,0.2); white-space: nowrap; }
.scan-cb { position: relative; width: 20px; height: 20px; flex-shrink: 0; }
.scan-cb input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; z-index: 2; }
.scan-cb .cb-icon { width: 20px; height: 20px; border-radius: 6px; border: 2px solid rgba(255,255,255,0.15); background: rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; font-size: 11px; color: transparent; }
.scan-cb input:checked + .cb-icon { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 0 8px rgba(59,130,246,0.4); }
.scan-cb:hover .cb-icon { border-color: rgba(59,130,246,0.5); }
.scan-select-all { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 6px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); transition: all 0.2s; user-select: none; }
.scan-select-all:hover { border-color: rgba(59,130,246,0.3); color: var(--text-main); }
.scan-select-all input { position: absolute; opacity: 0; pointer-events: none; }
.scan-select-icon { width: 18px; height: 18px; border-radius: 5px; border: 2px solid rgba(255,255,255,0.15); background: rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; font-size: 10px; color: transparent; transition: all 0.2s; }
.scan-select-all input:checked ~ .scan-select-icon { background: var(--primary); border-color: var(--primary); color: white; }
.link-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13px; }
.link-row a { color: var(--primary); word-break: break-all; }
.link-row .link-label { color: var(--text-muted); white-space: nowrap; min-width: 120px; font-weight: 600; }
.model-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); max-width: 100%; }
@media (min-width: 600px) { .model-grid { grid-template-columns: repeat(5, 1fr); } }
.model-cell { background: linear-gradient(145deg, rgba(30,41,59,0.7), rgba(15,23,42,0.9)); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 16px 12px; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, opacity 0.3s ease; }
.model-cell:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 6px 16px rgba(0,0,0,0.25); border-color: rgba(59,130,246,0.4); }
.model-cell.dragging { opacity: 0.3; transform: scale(0.9); box-shadow: inset 0 0 20px rgba(0,0,0,0.5); z-index: 10; border-color: var(--primary); }
.model-cell .q-label { color: var(--text-muted); font-size: 11px; font-weight: 700; margin-bottom: 8px; letter-spacing: 0.05em; display: inline-block; background: rgba(0,0,0,0.3); padding: 4px 8px; border-radius: 12px; }
.model-cell .q-answer { color: var(--text-main); font-weight: 800; font-size: 18px; word-break: break-all; line-height: 1.4; }
.dt-trigger { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-md); background: rgba(15,23,42,0.7); border: 1px solid var(--glass-border); color: var(--text-main); font-size: 13px; cursor: pointer; transition: all 0.2s; user-select: none; }
.dt-trigger:hover { border-color: var(--primary); background: rgba(15,23,42,0.9); }
.dt-trigger i { color: var(--primary); font-size: 14px; }
.dt-trigger span { flex: 1; }
.dt-picker { position: fixed; z-index: 9999; width: 300px; background: #1e293b; border: 1px solid rgba(255,255,255,0.15); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.6); padding: 16px; font-size: 13px; }
.dt-picker-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dt-picker-nav button { width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,0.06); color: var(--text-muted); cursor: pointer; font-size: 12px; transition: all 0.15s; }
.dt-picker-nav button:hover { background: rgba(255,255,255,0.12); color: white; }
.dt-picker-nav span { font-weight: 700; font-size: 14px; }
.dt-picker-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.dt-picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dt-day { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.1s; color: var(--text-main); border: none; background: none; }
.dt-day:hover { background: rgba(59,130,246,0.15); }
.dt-day.other { color: rgba(148,163,184,0.3); }
.dt-day.today { border: 1px solid var(--primary); }
.dt-day.selected { background: var(--primary); color: white; font-weight: 700; }
.dt-picker-time { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.dt-picker-time select { background: rgba(15,23,42,0.8); border: 1px solid rgba(255,255,255,0.1); color: white; padding: 6px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; outline: none; font-family: var(--font-family); }
.dt-picker-time select:focus { border-color: var(--primary); }
.dt-picker-actions { display: flex; gap: 8px; margin-top: 12px; }
.dt-clear, .dt-ok { flex: 1; padding: 8px; border-radius: 8px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font-family); transition: all 0.15s; }
.dt-clear { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.dt-clear:hover { background: rgba(239,68,68,0.15); color: #f87171; }
.dt-ok { background: var(--primary); color: white; }
.dt-ok:hover { background: var(--primary-hover); }
.stats-bar-wrap { margin-top: 16px; background: rgba(0,0,0,0.3); border-radius: 8px; overflow: hidden; height: 32px; display: flex; position: relative; }
.stats-bar-seg { height: 100%; transition: width 0.5s ease; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.9); min-width: 0; overflow: hidden; }
.stats-bar-seg.confirmed { background: #26a641; }
.stats-bar-seg.done { background: #0e6630; }
.stats-bar-seg.conflict { background: #f85149; }
.stats-bar-seg.inprogress { background: #1f6feb; }
.stats-bar-seg.untouched { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.3); }
.stats-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.stats-legend-item { display: flex; align-items: center; gap: 6px; }
.stats-legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* ──────────────────────────────────────────
   entry.html — Entry Form
   ────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.required::after { content: " *"; color: var(--danger); }
.hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
input[type="email"], .page-entry textarea {
  background: rgba(15, 23, 42, 0.5); border: 1px solid var(--glass-border);
  color: var(--text-main); padding: 12px 14px; border-radius: var(--radius-md);
  font-size: 14px; width: 100%; box-sizing: border-box; outline: none;
  transition: border-color 0.35s var(--smooth), background 0.35s var(--smooth), box-shadow 0.35s var(--smooth);
  font-family: var(--font-family);
}
input[type="email"]:focus, .page-entry textarea:focus {
  border-color: var(--primary); background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12), 0 0 24px rgba(59, 130, 246, 0.08), inset 0 0 0 1px rgba(59, 130, 246, 0.1);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.checkbox-label input[type="checkbox"] { margin-top: 2px; }
.result-info-box { background: rgba(15, 23, 42, 0.5); padding: 24px; border-radius: var(--radius-md); margin-bottom: 24px; border: 1px solid var(--glass-border); position: relative; }
.result-info-box::before { content: ''; position: absolute; top: -1px; left: 20%; right: 20%; height: 1px; background: linear-gradient(90deg, transparent, rgba(16,185,129,0.4), transparent); border-radius: 2px; }
.result-info-box .info-label { color: var(--text-muted); font-size: 12px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.result-info-box .info-value { font-size: 36px; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.pw-display { font-size: 24px; font-family: 'Courier New', monospace; letter-spacing: 6px; font-weight: bold; background: rgba(0,0,0,0.35); padding: 12px 20px; border-radius: var(--radius-md); color: var(--text-main); border: 1px solid rgba(255,255,255,0.05); }
.pw-warning { color: #f87171; font-size: 12px; font-weight: 700; margin-top: 14px; line-height: 1.5; }

/* ──────────────────────────────────────────
   judge.html — Question Assignment
   ────────────────────────────────────────── */
body.page-judge { padding: 24px; }
.header-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.header-bar .header-left { display: flex; align-items: center; gap: 16px; }
.header-bar .header-right { display: flex; align-items: center; gap: 8px; }
.legend {
  display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: rgba(15,23,42,0.4); border: 1px solid var(--glass-border);
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  backdrop-filter: blur(8px);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 14px; height: 14px; border-radius: 4px; }
.judge-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.judge-tab-btn { padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--glass-border); background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s var(--smooth); font-family: var(--font-family); }
.judge-tab-btn.active { background: rgba(59,130,246,0.15); color: #60a5fa; border-color: rgba(59,130,246,0.4); }
.judge-tab-btn:hover:not(.active) { border-color: rgba(255,255,255,0.15); color: var(--text-main); }
.q-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) { .q-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1024px) { .q-grid { grid-template-columns: repeat(8, 1fr); } }
.q-card {
  background: var(--glass-bg); backdrop-filter: blur(12px) saturate(180%);
  border-radius: var(--radius-md); padding: 14px; text-align: center;
  border: 1px solid var(--glass-border);
  cursor: pointer; transition: transform 0.4s var(--spring), box-shadow 0.35s var(--smooth), border-color 0.3s, background 0.3s;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  min-height: 120px; overflow: hidden;
}
.q-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-lg), 0 0 12px rgba(59,130,246,0.06); background: rgba(30,41,59,0.85); border-color: var(--glass-border-hover); }
.q-card.mine { border-color: rgba(59,130,246,0.5); box-shadow: 0 0 20px rgba(59,130,246,0.12), var(--shadow-sm); }
.q-card.locked { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.2); }
.q-card.done { border-color: rgba(16,185,129,0.35); }
.q-card.inprogress { border-color: rgba(59,130,246,0.3); }
.q-num { font-size: 18px; font-weight: 800; color: var(--text-main); margin-bottom: 8px; }
.q-scorers { font-size: 11px; color: var(--text-muted); min-height: 40px; margin-bottom: 8px; line-height: 1.4; display: flex; align-items: center; justify-content: center; }
.q-card .q-number { font-size: 22px; font-weight: 800; }
.q-card .q-status { padding: 6px 0; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; margin-top: auto; transition: background 0.3s; }
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 10px; font-weight: 700; }
.status-open { background: rgba(255,255,255,0.04); color: var(--text-muted); }
.status-inprogress { background: rgba(59,130,246,0.15); color: #60a5fa; }
.status-closed { background: rgba(239,68,68,0.1); color: #f87171; }
.status-done { background: rgba(16,185,129,0.15); color: #34d399; }
.status-locked { background: rgba(239,68,68,0.1); color: #f87171; }

/* ──────────────────────────────────────────
   question.html — Scoring Interface
   ────────────────────────────────────────── */
.q-badge { background: rgba(59, 130, 246, 0.2); color: #60a5fa; padding: 6px 16px; border-radius: var(--radius-pill); font-weight: 800; font-size: 16px; border: 1px solid rgba(59, 130, 246, 0.4); }
.answer-badge { font-size: 24px; font-weight: bold; letter-spacing: 2px; }
.progress-text { color: var(--text-muted); font-size: 13px; font-weight: 600; }
.answer-grid { margin-top: 80px; padding: 20px; display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) { .answer-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1024px) { .answer-grid { grid-template-columns: repeat(8, 1fr); } }
.answer-card { background: rgba(15, 23, 42, 0.65); border-radius: var(--radius-md); padding: 8px; text-align: center; border: 1px solid var(--glass-border); cursor: pointer; transition: transform 0.4s var(--spring), box-shadow 0.35s var(--smooth), border-color 0.3s, background 0.3s; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.answer-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-lg); background: rgba(255,255,255,0.05); border-color: var(--glass-border-hover); }
.answer-card.correct { border: 2px solid #10b981; background: rgba(16, 185, 129, 0.18); }
.answer-card.wrong { border: 2px solid #ef4444; background: rgba(239, 68, 68, 0.18); }
.answer-card.hold { border: 2px solid #f59e0b; background: rgba(245, 158, 11, 0.18); }
.answer-card img { width: 100%; object-fit: contain; border-radius: 4px; background: white; display: block; }
.answer-card .entry-num { font-size: 10px; font-weight: 600; color: var(--text-muted); margin-top: 4px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.answer-card.selected { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4), 0 0 16px rgba(59,130,246,0.12); transform: scale(1.03); z-index: 10; border-color: #3b82f6; }
.img-expired { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 24px 8px; color: var(--text-muted); font-size: 11px; background: rgba(255,255,255,0.03); border-radius: 4px; border: 1px dashed rgba(255,255,255,0.1); }
.img-expired i { font-size: 14px; color: #f59e0b; }
.loading-state { grid-column: 1 / -1; text-align: center; padding: 60px; color: var(--text-muted); font-size: 16px; font-weight: 600; }
.mobile-action-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--glass-bg-elevated); backdrop-filter: blur(var(--glass-blur-heavy)) saturate(180%); -webkit-backdrop-filter: blur(var(--glass-blur-heavy)) saturate(180%); border-top: 1px solid rgba(59,130,246,0.2); padding: 12px 16px; gap: 12px; z-index: 100; box-shadow: 0 -4px 24px rgba(0,0,0,0.3); }
.mobile-action-bar .btn { flex: 1; padding: 16px; font-size: 20px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: white !important; transition: transform 0.3s var(--spring), box-shadow 0.3s; }
.mobile-action-bar .btn:active { transform: scale(0.93); }
.mobile-action-bar .btn span { font-size: 12px; font-weight: 800; }
@media (hover: none) and (pointer: coarse) { .mobile-action-bar { display: flex; } .answer-grid { padding-bottom: 120px; } }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.preview-grid .pv-item { background: var(--glass-bg); border-radius: 12px; padding: 12px; text-align: center; border: 1px solid var(--glass-border); }
.preview-grid .pv-item img { width: 100%; background: white; border-radius: 6px; }
.preview-grid .pv-item .pv-label { font-size: 12px; color: var(--text-muted); margin-top: 8px; font-weight: 600; }

/* ──────────────────────────────────────────
   conflict.html — Conflict Resolution
   ────────────────────────────────────────── */
body.page-conflict { padding: 0; }
.counter { padding: 6px 16px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; white-space: nowrap; }
.counter.has-conflicts { background: rgba(245,158,11,0.2); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.counter.all-clear { background: rgba(16,185,129,0.2); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.conflict-grid { margin-top: 80px; padding: 20px; display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) { .conflict-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1024px) { .conflict-grid { grid-template-columns: repeat(8, 1fr); } }
.conflict-card { position: relative; background: rgba(15, 23, 42, 0.65); border-radius: var(--radius-md); padding: 8px; cursor: pointer; transition: transform 0.4s var(--spring), box-shadow 0.35s var(--smooth), border-color 0.3s, background 0.3s, opacity 0.3s; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--glass-border); }
.conflict-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-lg); background: rgba(255,255,255,0.05); border-color: var(--glass-border-hover); }
.conflict-card.resolved.correct { border: 2px solid #10b981; background: rgba(16, 185, 129, 0.18); }
.conflict-card.resolved.wrong { border: 2px solid #ef4444; background: rgba(239, 68, 68, 0.18); }
.conflict-card.selected { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4), 0 0 16px rgba(59,130,246,0.12); transform: scale(1.03); z-index: 10; border-color: #3b82f6; }
.conflict-card img { width: 100%; object-fit: contain; border-radius: 4px; background: white; display: block; }
.conflict-card .entry-num { font-size: 10px; font-weight: 600; color: var(--text-main); margin-top: 4px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; justify-content: center; gap: 4px; }
.conflict-card .votes-mini { display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 4px; }
.vote-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 900; color: white; text-shadow: 0 1px 1px rgba(0,0,0,0.5); }
.vote-dot.correct { background: #10b981; }
.vote-dot.wrong { background: #ef4444; }
.vote-dot.hold { background: #f59e0b; }
.model-ans-badge { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,0.7); color: #60a5fa; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 800; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conflict-model-ans { font-size: 11px; color: #60a5fa; margin-top: 2px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-tag-badge { position: absolute; top: 4px; right: 4px; background: rgba(59,130,246,0.9); color: white; font-size: 9px; padding: 2px 4px; border-radius: 4px; font-weight: 700; }
.no-conflict { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 20px; color: var(--text-muted); font-size: 16px; font-weight: 600; width: 100%; grid-column: 1 / -1; }

/* ──────────────────────────────────────────
   disclosure.html — Score Disclosure
   ────────────────────────────────────────── */


.result { display: none; }
.result-header { text-align: center; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--glass-border); }
.result-name { font-size: 22px; font-weight: 800; }
.result-score { font-size: 64px; font-weight: 800; margin: 12px 0; background: linear-gradient(135deg, #60a5fa, var(--primary), #8b5cf6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.result-score-label { font-size: 14px; color: var(--text-muted); }
.result-grid-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.result-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 8px; }
.result-cell { aspect-ratio: 1; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; transition: transform 0.3s var(--spring); }
.result-cell:hover { transform: scale(1.15); }
.result-cell .q-num { font-size: 8px; color: rgba(255,255,255,0.5); margin-bottom: 1px; }
.result-cell.correct { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.result-cell.wrong { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.back-btn { display: block; margin: 20px auto 0; padding: 10px 24px; border-radius: var(--radius-md); border: 1px solid var(--glass-border); background: transparent; color: var(--text-muted); font-size: 14px; cursor: pointer; font-family: var(--font-family); transition: all 0.3s var(--smooth); }
.back-btn:hover { color: white; background: rgba(255,255,255,0.05); border-color: var(--glass-border-hover); }

/* ──────────────────────────────────────────
   checkin.html — QR Check-in
   ────────────────────────────────────────── */
.main-content { margin-top: 70px; padding: 24px 40px; max-width: 1200px; margin-left: auto; margin-right: auto; display: grid; gap: 32px; grid-template-columns: 1fr; }
@media(min-width: 900px) { .main-content { grid-template-columns: 1fr 1fr; } }
#camera-container { position: relative; width: 100%; }
#video { width: 100%; border-radius: var(--radius-lg); border: 2px solid var(--glass-border); background: #000; transform: scaleX(-1); }
#canvas { display: none; }
#scanning-text { margin-top: 12px; color: var(--text-muted); font-size: 14px; text-align: center; font-weight: 600; }
#result { margin-top: 16px; width: 100%; padding: 20px; border-radius: var(--radius-lg); text-align: center; font-size: 18px; display: none; font-weight: 600; transition: all 0.35s var(--smooth); }
#result.success { background: rgba(16,185,129,0.12); border: 2px solid rgba(16,185,129,0.4); color: #34d399; }
#result.error { background: rgba(239,68,68,0.12); border: 2px solid rgba(239,68,68,0.4); color: #f87171; }
#result.already { background: rgba(245,158,11,0.12); border: 2px solid rgba(245,158,11,0.4); color: #fbbf24; }
#result.canceled { background: rgba(239,68,68,0.12); border: 2px solid rgba(239,68,68,0.4); color: #f87171; }
#result.loading { background: rgba(59,130,246,0.12); border: 2px solid rgba(59,130,246,0.4); color: #60a5fa; }
.name { font-size: 28px; font-weight: 800; margin: 10px 0; color: var(--text-main); }
.number { font-size: 16px; color: var(--text-muted); }
.stats-bar { margin-top: 24px; width: 100%; }
.stats-bar h3 { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; font-weight: 600; text-transform: uppercase; }
.stats-row { display: flex; justify-content: space-around; gap: 16px; }
.stat-item { text-align: center; flex: 1; padding: 16px; transition: transform 0.4s var(--spring); }
.stat-item:hover { transform: translateY(-2px); }
.stat-item .stat-num { font-size: 28px; font-weight: 800; }
.stat-item .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 600; }

/* ──────────────────────────────────────────
   entry_list.html — Public Entry List
   ────────────────────────────────────────── */
.stat-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 24px; margin-bottom: 24px; }
.stat-badge .stat-val { font-size: 28px; font-weight: 800; color: var(--primary); background: linear-gradient(135deg, #60a5fa, var(--primary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-badge .stat-label { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.list-container { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--glass-border); background: rgba(15, 23, 42, 0.35); backdrop-filter: blur(8px); }
.list-container table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.list-container th { background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.7)); color: var(--text-muted); font-weight: 600; padding: 14px 16px; text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; border-bottom: 1px solid rgba(59, 130, 246, 0.1); }
.list-container td { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.list-container tbody tr { transition: background 0.25s var(--smooth); }
.list-container tbody tr:hover { background: rgba(59, 130, 246, 0.06); }
.c-time { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.c-name { font-size: 16px; font-weight: 700; }
.c-affil { color: #60a5fa; }
.c-msg { font-size: 14px; color: var(--text-main); line-height: 1.4; word-break: break-word; }
@media (max-width: 600px) {
  .list-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .list-container table { min-width: 600px; }
}

/* ──────────────────────────────────────────
   cancel.html — Entry Cancellation
   ────────────────────────────────────────── */
.warning-box { margin-bottom: 20px; font-size: 13px; color: var(--warning); background: rgba(245,158,11,0.08); padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid rgba(245,158,11,0.2); line-height: 1.7; }

/* ──────────────────────────────────────────
   terms.html — Participation Terms
   ────────────────────────────────────────── */
.terms-container { max-width: 800px; margin: 60px auto; padding: 40px; background: linear-gradient(145deg, rgba(30, 41, 59, 0.65), rgba(15, 23, 42, 0.85)); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); line-height: 1.8; font-family: var(--font-family); position: relative; }
.terms-container h1 { font-size: 24px; margin-bottom: 24px; color: white; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 12px; }
.terms-container h2 { font-size: 20px; margin-top: 32px; margin-bottom: 16px; color: var(--primary); }
.terms-container h3 { font-size: 16px; margin-top: 24px; margin-bottom: 12px; color: #e2e8f0; }
.terms-container p { margin-bottom: 1em; color: var(--text-muted); }
.terms-container ul, .terms-container ol { margin-bottom: 1em; padding-left: 24px; color: var(--text-muted); }
.terms-container li { margin-bottom: 8px; }
.terms-container a { color: var(--primary); text-decoration: underline; }
.terms-loading { text-align: center; color: var(--text-muted); padding: 40px; }

/* ──────────────────────────────────────────
   legal.html — Privacy Policy / Terms of Use
   ────────────────────────────────────────── */
body.page-legal { background: var(--bg-base, #0a0e1a); color: var(--text-primary, #e2e8f0); font-family: 'Noto Sans JP', 'Inter', sans-serif; line-height: 1.8; }
.legal-container { max-width: 800px; margin: 0 auto; padding: 40px 24px 80px; }
.legal-header { text-align: center; margin-bottom: 48px; }
.legal-header h1 { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, #60a5fa, #a78bfa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.legal-header p { color: var(--text-muted, #8e8ea0); font-size: 14px; }
.legal-section { background: var(--surface-1, rgba(255,255,255,0.03)); border: 1px solid var(--border-subtle, rgba(255,255,255,0.06)); border-radius: 16px; padding: 32px; margin-bottom: 24px; }
.legal-section h2 { font-size: 20px; font-weight: 700; color: #60a5fa; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.legal-section h2 i { font-size: 18px; opacity: 0.7; }
.legal-section h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; color: var(--text-primary, #e2e8f0); }
.legal-section p, .legal-section li { font-size: 14px; color: var(--text-secondary, #a0a0b8); }
.legal-section ul { padding-left: 20px; margin: 8px 0; }
.legal-section li { margin-bottom: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #60a5fa; text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: 24px; }
.back-link:hover { text-decoration: underline; }
.effective-date { text-align: center; color: var(--text-muted, #8e8ea0); font-size: 13px; margin-top: 32px; }

/* ──────────────────────────────────────────
   404.html — Error Page
   ────────────────────────────────────────── */
body.page-404 { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; text-align: center; }
.error-container { max-width: 480px; animation: fadeSlideUp 0.7s var(--smooth); }
.error-code { font-size: 120px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; animation: float 3s ease-in-out infinite; filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.25)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.error-title { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.error-desc { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 32px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.error-actions .btn { width: auto; padding: 12px 24px; font-size: 14px; }
.btn.ghost { background: transparent; border: 1px solid var(--glass-border); color: var(--text-main); backdrop-filter: blur(8px); }
.btn.ghost::after { display: none; }
.btn.ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--glass-border-hover); transform: translateY(-1px); }
.decoration { font-size: 64px; margin-bottom: 24px; opacity: 0.12; }

/* ──────────────────────────────────────────
   Shared Animations
   ────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────
   Utility Classes for JS innerHTML   
   (Replacing inline styles from JS files)
   ────────────────────────────────────────── */

/* Table loading / empty state */
.td-loading { padding: 12px; text-align: center; }
.td-loading-error { padding: 12px; text-align: center; color: #ef5350; }
.text-muted-sm { font-size: 11px; color: #aaa; }
.text-muted-center { color: var(--text-muted); text-align: center; padding: 40px; font-size: 14px; }
.text-muted-loader { color: #aaa; }
.icon-empty { font-size: 28px; display: block; margin-bottom: 12px; opacity: 0.4; }
.model-answer-empty { color: var(--text-muted); font-style: italic; }

/* Preview overlay (shared.js + admin_scan.js) */
.preview-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9); backdrop-filter: blur(10px);
  z-index: 10000; display: none; overflow-y: auto; padding: 24px;
}
.preview-overlay-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.preview-overlay-title { color: white; font-size: 18px; }
.preview-overlay-content { text-align: center; }
.preview-image { max-width: 100%; max-height: 85vh; border-radius: 8px; background: white; box-shadow: 0 4px 24px rgba(0,0,0,0.5); }

/* Analytics rare row highlight */
.row-rare { background: rgba(255,152,0,0.2); font-weight: bold; }

/* Inline edit input (model answer edit) */
.inline-edit-input {
  width: 100%; padding: 4px 6px; font-size: 16px; font-weight: 800;
  text-align: center; border: 2px solid var(--primary); border-radius: 6px;
  background: rgba(0,0,0,0.3); color: white; outline: none;
}

/* Onboarding progress (dynamic width via JS) */
.onboarding-progress { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.onboarding-progress-bar { height: 100%; background: linear-gradient(135deg, #3b82f6, #8b5cf6); border-radius: 2px; transition: width 0.4s ease; }

/* Tour guide */
.tour-tooltip {
  position: absolute; z-index: 20001; pointer-events: auto;
}
.tour-step-badge {
  background: rgba(59,130,246,0.15); color: #60a5fa;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px;
}
.tour-step-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tour-step-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.tour-step-text { font-size: 13px; color: #94a3b8; line-height: 1.6; margin-bottom: 16px; }
.tour-step-actions { display: flex; gap: 8px; justify-content: flex-end; }
.tour-skip {
  padding: 8px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: #94a3b8; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.tour-next {
  padding: 8px 20px; border-radius: 8px; border: none;
  background: #3b82f6; color: white; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}

/* Auth redirect message */
.auth-redirect { padding: 40px; text-align: center; color: #f87171; font-weight: bold; }

/* Confirm dialog inner */
.confirm-body { flex: 1; }
