/* Custom CSS - "Beat the AutoML System" Interactive Game */

:root {
  --bg-deep: #EDE8E0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F5F1EA;
  --border-glass: rgba(54, 43, 124, 0.22);
  --border-focus: #362B7C;
  
  --text-primary: #1A1625;
  --text-secondary: #3A3448;
  --text-muted: #5E5770;
  
  --cyan: #362B7C;
  --cyan-soft: #E8E4F4;
  --indigo: #4A3D9C;
  --indigo-soft: #F3F0FA;
  --teal: #15864C;
  --teal-soft: #D8F0E4;
  --coral: #A3362A;
  --coral-soft: #F4DDD9;
  --gold: #8A6510;
  --silver: #94a3b8;
  --bronze: #b45309;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Header Styling */
.app-header {
  background: rgba(237, 232, 224, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 24px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.mooc-logo {
  height: 36px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: var(--text-primary);
}

.logo-sub {
  font-size: 12px;
  color: var(--cyan);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.organizer-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.organized-by {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.organizer-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.organizer-link:hover {
  transform: translateY(-1px);
  opacity: 0.85;
}

.l3s-logo {
  height: 28px;
  width: auto;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.1));
}

.naira-logo {
  height: 28px;
  width: auto;
  max-height: 28px;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.1));
  object-fit: contain;
  vertical-align: middle;
}

/* Container */
.game-container {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Glass Card styling */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(26, 22, 37, 0.06), 0 2px 4px rgba(26, 22, 37, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Registration overlay screen */
.screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 22, 37, 0.6);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px;
  backdrop-filter: blur(6px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.registration-card {
  max-width: 500px;
  width: 100%;
  text-align: center;
  border-color: rgba(99, 102, 241, 0.3);
  position: relative;
  margin: auto 0;
}

.badge-ijcai {
  background: linear-gradient(135deg, var(--cyan), var(--indigo));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.intro-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Form Styles */
.registration-form {
  text-align: left;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-group label i {
  color: var(--cyan);
  margin-right: 6px;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group select {
  width: 100%;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: inherit;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.input-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

.consent-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 24px;
}

.prize-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--coral-soft);
  border: 1px solid var(--coral);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-primary);
}

.prize-notice i {
  color: var(--coral);
  margin-top: 2px;
  flex-shrink: 0;
}

.consent-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.consent-checkbox-label input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--cyan);
}

.consent-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  user-select: none;
}

.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--indigo));
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-block {
  display: flex;
  width: 100%;
}

.registration-footer {
  margin-top: 24px;
  font-size: 11px;
  color: var(--text-muted);
}

.registration-footer a {
  color: var(--cyan);
  text-decoration: underline;
}

/* Active Game Screens */
.game-main {
  animation: fadeIn 0.5s ease-out;
}

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

.hidden {
  display: none !important;
}

/* Status Dashboard */
.game-dashboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 16px 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.player-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-letter {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--cyan), var(--indigo));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.profile-details h4 {
  font-size: 16px;
  font-weight: 600;
}

.affiliation-text {
  font-size: 12px;
  color: var(--text-muted);
}

.score-display {
  display: flex;
  gap: 32px;
}

.score-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.score-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.score-val {
  font-size: 24px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}

.text-cyan { color: var(--cyan); }
.text-indigo { color: var(--indigo); }
.text-coral { color: var(--coral); }
.text-green { color: var(--teal); }
.text-gold { color: var(--gold); }

/* Level Navigation Tabs */
.level-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  color: var(--text-secondary);
}

.tab-btn.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--indigo);
  color: #fff;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.tab-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-btn.active .tab-num {
  background: var(--indigo);
  color: #fff;
}

.tab-name {
  font-weight: 600;
  font-size: 14px;
}

/* Viewport & Level Panels */
.level-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.4s ease-out;
}

.level-intro {
  background: rgba(255, 255, 255, 0.01);
  border-left: 3px solid var(--cyan);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
}

.level-intro h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.level-intro p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Layout for panels (Columns) */
.panel-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

/* HPO Canvas Area */
.interactive-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.canvas-container {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

#hpo-heatmap {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: crosshair;
  background: #f5f1ea;
}

.canvas-prompt {
  position: absolute;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.5s ease;
  box-shadow: 0 4px 20px rgba(26, 22, 37, 0.08);
}

.pulse-icon {
  color: var(--cyan);
  animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 10px var(--cyan); }
  100% { transform: scale(1); opacity: 0.8; }
}

.canvas-prompt p {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Fine tuning slider area */
.fine-tuning-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.inline-input {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inline-input label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.inline-input input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
  background: rgba(255,255,255,0.05);
}

.range-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-container input[type="range"] {
  flex: 1;
  accent-color: var(--cyan);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--cyan);
  font-weight: 500;
}

/* Sidebar Columns */
.status-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.fill-cyan { background: linear-gradient(90deg, var(--cyan), var(--indigo)); }
.fill-gold { background: linear-gradient(90deg, #f59e0b, #eab308); }
.fill-coral { background: linear-gradient(90deg, var(--coral), #f43f5e); }
.fill-green { background: linear-gradient(90deg, var(--teal), #10b981); }

/* Comparison Grid */
.comparison-card h4 {
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 8px;
}

.comp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px dashed rgba(255,255,255,0.03);
}

.comp-row strong {
  font-size: 18px;
  font-family: 'Outfit', sans-serif;
}

.comp-status {
  margin-top: 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  align-items: center;
}

.comp-status i {
  color: var(--cyan);
}

/* Logs Table */
.logs-card h4 {
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.log-table-wrapper {
  max-height: 160px;
  overflow-y: auto;
}

.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.log-table th {
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-glass);
}

.log-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.empty-log {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 0 !important;
}

/* NAS Level Styling */
.nas-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
}

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

.form-group.full-width {
  flex: 0 0 100%;
}

.form-group label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}

/* Visual Model representation */
.model-visualization {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-visualization h4 {
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.model-stack-container {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 12px;
  padding: 20px;
  min-height: 180px;
  justify-content: center;
}

.vis-layer {
  height: 18px;
  border-radius: 4px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 18px;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.vis-embed {
  background: #3b82f6;
  width: 90%;
}

.vis-head {
  background: #ec4899;
  width: 90%;
}

.layer-mha { background: #818cf8; }
.layer-gqa { background: #10b981; }
.layer-mqa { background: #f59e0b; }

/* Console terminal card */
.console-card {
  background: #06040f;
  border: 1px solid #1f1a3a;
  border-radius: 12px;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  color: #e2e8f0;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94a3b8;
  border-bottom: 1px solid #1f1a3a;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.console-card .text-coral { color: #fca5a5 !important; }
.console-card .text-coral-soft { color: #fecaca !important; }
.console-card .text-green { color: #34d399 !important; }
.console-card .text-yellow { color: #fbbf24 !important; }
.console-card .text-blue { color: #60a5fa !important; }
.console-card .text-muted { color: #94a3b8 !important; }

.blink-dot {
  width: 8px;
  height: 8px;
  background-color: var(--teal);
  border-radius: 50%;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 6px var(--teal);
}

@keyframes blink {
  50% { opacity: 0; }
}

.console-body {
  height: 120px;
  overflow-y: auto;
  font-size: 11px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.console-line {
  word-break: break-all;
}

.text-green { color: #10b981; }
.text-yellow { color: #f59e0b; }
.text-red { color: #ef4444; }
.text-blue { color: #60a5fa; }

/* CASH level algorithm selectors */
.cash-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.algorithm-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.algorithm-card input[type="radio"] {
  accent-color: var(--cyan);
}

.algo-details {
  display: flex;
  flex-direction: column;
}

.algo-title {
  font-weight: 700;
  font-size: 13px;
}

.algo-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.algorithm-card:has(input[type="radio"]:checked) {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.cash-hyperparams-area {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  min-height: 130px;
}

.cash-param-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.3s ease-out;
}

.cash-chart-wrapper {
  width: 100%;
  height: 200px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 10px;
}

/* Modals & Dialogs */
.end-game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 22, 37, 0.5);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  animation: modalScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: auto 0;
}

@keyframes modalScale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon-container {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-metrics {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.modal-metric-row strong {
  font-size: 16px;
}

.leaderboard-card-modal {
  max-width: 600px;
}

.leaderboard-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.leaderboard-table-wrapper {
  max-height: 380px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  margin-bottom: 16px;
}

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

.leaderboard-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 10px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-glass);
}

.leaderboard-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.leaderboard-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.leaderboard-table tr.current-user-row td {
  background: rgba(6, 182, 212, 0.12) !important;
  color: var(--cyan);
  font-weight: 600;
}

.rank-badge {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.rank-1 { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.rank-2 { background: var(--silver); box-shadow: 0 0 6px var(--silver); }
.rank-3 { background: var(--bronze); box-shadow: 0 0 6px var(--bronze); }
.rank-other { background: rgba(255,255,255,0.1); color: var(--text-secondary); }

.user-rank-status {
  padding: 10px 14px;
  background: var(--cyan-soft);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-glass);
  padding: 16px 24px;
  background: rgba(237, 232, 224, 0.9);
  margin-top: auto;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--cyan);
  text-decoration: underline;
}

/* Responsiveness (Smartphone first tweaks) */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  .game-container {
    padding: 16px;
  }
  
  .header-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .game-dashboard {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px;
  }
  
  .score-display {
    gap: 16px;
  }
  
  .level-tabs {
    flex-direction: column;
    gap: 8px;
  }
  
  .tab-btn {
    padding: 10px;
  }
  
  .panel-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .cash-selectors {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .fine-tuning-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .fine-tuning-bar button {
    width: 100%;
  }
  
  .modal-card {
    padding: 16px;
  }

  /* Mobile registration optimizations */
  .screen-overlay {
    padding: 12px 10px;
    align-items: flex-start;
  }

  .registration-card {
    padding: 18px 14px;
    border-radius: 14px;
    margin: auto 0;
  }

  .registration-card h2 {
    font-size: 1.35rem;
    margin-bottom: 6px;
  }

  .registration-card .badge-ijcai {
    font-size: 10px;
    padding: 4px 10px;
    margin-bottom: 8px;
  }

  .intro-desc {
    font-size: 12.5px;
    line-height: 1.45;
    margin-bottom: 14px;
  }

  .input-group {
    margin-bottom: 12px;
  }

  .input-group label {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .input-group input[type="text"],
  .input-group input[type="email"],
  .input-group select {
    padding: 10px 12px;
    font-size: 16px; /* 16px prevents iOS Safari auto-zoom */
    border-radius: 8px;
  }

  .input-hint {
    font-size: 10px;
    margin-top: 3px;
  }

  .prize-notice {
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 11.5px;
    line-height: 1.45;
    gap: 8px;
  }

  .consent-box {
    padding: 10px 12px;
    margin-bottom: 14px;
  }

  .consent-text {
    font-size: 11px;
    line-height: 1.4;
  }

  .registration-footer {
    margin-top: 10px;
    font-size: 10.5px;
  }
}

/* AutoML Step-by-Step Visualization Styles */
.automl-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(237, 232, 224, 0.05); /* almost fully transparent */
  backdrop-filter: none;
  display: flex;
  align-items: flex-start; /* align content to top */
  justify-content: center;
  z-index: 50;
  border-radius: 16px;
  border: 2px solid var(--coral); /* red border showing AutoML is active */
  box-shadow: inset 0 0 15px rgba(163, 54, 42, 0.1);
  padding: 12px;
  pointer-events: auto; /* block clicks underneath */
  animation: fadeIn 0.3s ease-out;
}

.automl-overlay-content {
  background: rgba(26, 22, 37, 0.95); /* dark high-contrast theme */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  flex-direction: row; /* horizontal layout */
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  flex-wrap: wrap; /* responsive wrap if width is narrow */
}

.automl-overlay-content i.fa-gears {
  font-size: 20px; /* smaller icon */
  color: #fca5a5; /* lighter coral for dark background readability */
  filter: drop-shadow(0 0 6px rgba(252, 165, 165, 0.6));
}

.automl-overlay-content h4 {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  white-space: nowrap;
}

.automl-overlay-content p {
  font-size: 11px;
  margin: 0;
  color: #fca5a5; /* lighter coral */
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speed-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0; /* remove top margin */
  background: rgba(255,255,255,0.08);
  padding: 4px 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
}

.speed-label {
  font-size: 9px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-right: 2px;
}

.btn-speed {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-speed:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-speed.active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

/* Card Logs Tabs */
.card-tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 14px;
  gap: 16px;
}

.log-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px 10px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.log-tab-btn:hover {
  color: var(--text-secondary);
}

.log-tab-btn.active {
  color: var(--cyan);
}

.log-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* Active AutoML Glow effects */
.algorithm-card.automl-active {
  border-color: var(--coral) !important;
  background: rgba(244, 63, 94, 0.08) !important;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.2) !important;
}

.model-stack-container.automl-active {
  border: 1px solid rgba(244, 63, 94, 0.2);
  box-shadow: inset 0 0 15px rgba(244, 63, 94, 0.05);
}

.log-reasoning {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
}

.automl-log-row td {
  border-bottom: 1px solid rgba(244, 63, 94, 0.08) !important;
}

/* CASH Pipeline selectors styling */
.pipeline-section {
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.pipeline-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 10px;
}

.pipeline-select {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
  margin-top: 4px;
  cursor: pointer;
}

.pipeline-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.pipeline-sub-params {
  background: rgba(54, 43, 124, 0.04);
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pipeline-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.pipeline-input-group label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.pipeline-input-group select {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}

.pipeline-input-group select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.range-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.range-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* AutoML Technology Explanation Info Boxes */
.tech-info-box {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(26, 22, 37, 0.06);
  width: 100%;
}

.tech-info-box i {
  font-size: 24px;
  color: var(--cyan);
  margin-top: 2px;
}

.tech-info-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tech-info-content p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Bonus Level: LoRA Quantized HPO Styling */
.lora-select-cb {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

tr.eliminated-row {
  opacity: 0.45;
}

tr.eliminated-row td {
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}

.lora-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.lora-status.lora-active {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.lora-status.lora-eliminated {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.lora-status.lora-champion {
  background: var(--gold);
  color: #fff;
}

.lora-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.log-table tr.current-user-row td {
  background: rgba(6, 182, 212, 0.12) !important;
  color: var(--cyan);
  font-weight: 600;
}



/* Sortable Table Headers */
.sortable-th {
  cursor: pointer !important;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.sortable-th:hover {
  background: rgba(6, 182, 212, 0.08) !important;
  color: var(--cyan);
}

.sortable-th.sorted {
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.05);
}

.sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
}

/* Leaderboard Prize Tiers & Cutoff Dividers */
.rank-top10 {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 5px rgba(245, 158, 11, 0.15);
}

.leaderboard-divider-row td {
  padding: 6px 12px !important;
  background: rgba(15, 12, 25, 0.85) !important;
  border-top: 1px dashed rgba(255, 255, 255, 0.15) !important;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15) !important;
}

.tier-divider-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tier-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
}

.tier-divider-badge {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tier-badge-gold {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.tier-badge-silver {
  background: rgba(6, 182, 212, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.15);
}

.tier-divider-tag {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
