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

:root {
  --font-title: 'Outfit', 'Noto Sans Thai', sans-serif;
  --font-body: 'Inter', 'Noto Sans Thai', sans-serif;
  
  --bg-gradient: linear-gradient(135deg, #e0f2fe 0%, #e8e8ff 50%, #fae8ff 100%);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  
  --vector-f: #ef4444; /* Red */
  --vector-v: #3b82f6; /* Blue */
  --vector-b: #10b981; /* Green */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

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

header {
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

h1.app-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.6rem;
  background: linear-gradient(to right, #4f46e5, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.user-badge {
  background: rgba(255, 255, 255, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--text-dark);
}

.btn-icon {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-dark);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-icon:hover {
  background: white;
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.screen {
  width: 100%;
  max-width: 1200px;
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.screen.active {
  display: block;
}

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

/* Glassmorphism Card Style */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--glass-shadow);
}

/* Auth / Registration Screen */
.auth-container {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.auth-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--primary);
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

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

.form-input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.65);
  color: var(--text-dark);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  padding: 0.9rem 1.8rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

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

/* Activity Menu Screen */
.menu-header-box {
  text-align: center;
  margin-bottom: 2rem;
}

.menu-title {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 700;
}

.menu-subtitle {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.menu-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  color: var(--text-dark);
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--primary);
  opacity: 0.8;
}

.menu-card:nth-child(2)::before { background: #3b82f6; }
.menu-card:nth-child(3)::before { background: #10b981; }
.menu-card:nth-child(4)::before { background: #f59e0b; }

.menu-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--primary);
  box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.15);
}

.menu-card-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(99, 102, 241, 0.15);
  line-height: 1;
}

.menu-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.menu-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.menu-card-action {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Activity General Layout */
.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem;
}

.btn-back {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-back:hover {
  background: white;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-3px);
}

.activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.canvas-container {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10; /* Stable wide aspect ratio */
}

.canvas-container.taller {
  aspect-ratio: 0.9; /* Stable taller aspect ratio for 3D symbol visualizer */
}

.canvas-container.canvas-square-transparent {
  aspect-ratio: 16 / 7;
  background: transparent;
  border: none;
}

.canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Activity 1 Custom Layout */
.activity-1-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rotation-control-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.5);
  padding: 1rem;
  border-radius: 12px;
}

.angle-slider {
  flex: 1;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #e2e8f0;
  outline: none;
}

.angle-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: transform 0.1s;
}

.angle-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.badge-vector {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: bold;
  font-family: monospace;
}
.badge-f { background-color: rgba(239, 68, 68, 0.15); color: var(--vector-f); }
.badge-v { background-color: rgba(59, 130, 246, 0.15); color: var(--vector-v); }
.badge-b { background-color: rgba(16, 185, 129, 0.15); color: var(--vector-b); }

/* Activity 2 Submenu & Controls */
.sub-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sub-nav-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  transition: all 0.2s;
}

.sub-nav-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.exp-cards-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.exp-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.exp-card:hover, .exp-card.active {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.exp-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.exp-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Dashboard Panel */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 120px 1fr 50px;
  align-items: center;
  gap: 1rem;
}

.dashboard-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.btn-group {
  display: flex;
  gap: 0.5rem;
}

.btn-select {
  flex: 1;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: var(--text-dark);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  text-align: center;
}

.btn-select.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.btn-select:hover:not(.active) {
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary);
}

.explanation-box {
  background: rgba(255, 255, 255, 0.8);
  border-left: 4px solid var(--primary);
  padding: 1rem;
  border-radius: 4px 8px 8px 4px;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* Formula Summary View (2.2) */
.formula-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.formula-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  border: 1px solid #e2e8f0;
}

.formula-math {
  font-family: 'Times New Roman', serif;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  text-align: center;
  margin: 1rem 0;
  font-style: italic;
}

.formula-list {
  list-style: none;
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto;
  padding: 0;
}

.formula-list li {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 0.25rem;
}

/* Hand Graphic Representation */
.hand-view-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 250px;
  border: 1px solid var(--glass-border);
}

.hand-svg {
  width: 150px;
  height: 150px;
  transition: transform 0.3s ease;
}

.hand-label-overlay {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.4;
}

/* Quiz UI elements (Menu 4) */
.quiz-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 600;
}

.timer-box {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--vector-f);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timer-bar-container {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.timer-bar {
  height: 100%;
  background: var(--vector-f);
  width: 100%;
  transition: width 1s linear;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.btn-option {
  background: white;
  border: 1.5px solid #cbd5e1;
  padding: 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s;
  color: var(--text-dark);
}

.btn-option:hover {
  border-color: var(--primary);
  background: #f8fafc;
  transform: translateY(-1px);
}

.btn-option.correct {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}

.btn-option.incorrect {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
  border-radius: 20px;
  width: 90%;
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Premium Glassmorphic Scoreboard Table */
.score-table-container {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  padding: 0.5rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  margin-top: 0.5rem;
  overflow: hidden;
}

.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px; /* Spaced out rows for modern look */
  margin-top: 0;
}

.score-table th, .score-table td {
  text-align: left;
}

.score-table th {
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  border-bottom: none;
}

.score-table td {
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
  transition: background-color 0.2s ease;
}

.score-table td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 10px 0 0 10px;
  font-weight: bold;
  color: var(--primary);
  text-align: center;
  width: 50px;
}

.score-table td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 0 10px 10px 0;
}

.score-table tr.score-row {
  transition: all 0.2s ease;
}

.score-table tr.score-row:hover td {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}

/* Badge difficulty levels */
.badge-diff-easy {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.25) !important;
}

.badge-diff-medium {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #2563eb !important;
  border: 1.5px solid rgba(59, 130, 246, 0.25) !important;
}

.badge-diff-hard {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
  border: 1.5px solid rgba(245, 158, 11, 0.25) !important;
}

/* Firework Animation Container */
#firework-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Glassmorphism Symbol Legend Cards */
.symbol-legend-container {
  display: flex;
  gap: 1rem;
  margin: 0.5rem 0 1rem 0;
  width: 100%;
}

.symbol-legend-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.symbol-legend-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.symbol-badge {
  font-size: 1rem;
  font-weight: 800;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}

.legend-cross .symbol-badge {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.20);
}

.legend-dot .symbol-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.20);
}

.symbol-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

@media (max-width: 576px) {
  .symbol-legend-container {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Activity 2 Submenu styles */
.act2-submenu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.act2-submenu-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--glass-shadow);
  color: var(--text-dark);
}

.act2-submenu-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.12);
}

.act2-card-icon {
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.act2-card-content {
  flex: 1;
}

.act2-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.act2-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Adjustments for Simulator layout */
#act2-simulator-panel .activity-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

@media (max-width: 992px) {
  #act2-simulator-panel .activity-grid {
    grid-template-columns: 1fr;
  }
}

/* Explerify Light Glass Dashboard Styles */
.explerify-dashboard {
  font-family: 'Outfit', 'Noto Sans Thai', sans-serif !important;
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--text-dark) !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.explerify-row {
  margin-bottom: 1.25rem;
}

.explerify-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.explerify-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}

.explerify-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.8);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  min-width: 45px;
  text-align: center;
}

.explerify-slider-container {
  display: flex;
  align-items: center;
}

/* Custom Explerify slider styling */
.explerify-slider {
  flex: 1;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #6366f1 0%, #6366f1 var(--value-percent, 50%), #cbd5e1 var(--value-percent, 50%), #cbd5e1 100%);
  outline: none;
  transition: background 0.15s;
}

.explerify-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #f8fafc 0%, #cbd5e1 50%, #64748b 100%);
  border: 1.5px solid #94a3b8;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s;
}

.explerify-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: radial-gradient(circle, #ffffff 0%, #e2e8f0 50%, #94a3b8 100%);
}

/* Explerify B-field direction toggle button */
.explerify-toggle-btn {
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
  font-size: 0.9rem;
  padding: 0.6rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.explerify-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #ffffff;
}

.explerify-toggle-btn.into {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.explerify-toggle-btn.out {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #d97706;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

/* Explerify Charge selection group */
.explerify-charge-group {
  display: flex;
  gap: 0.75rem;
}

.btn-charge-sign {
  flex: 1;
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  color: var(--text-muted);
  padding: 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.btn-charge-sign:hover:not(.active) {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-dark);
  border-color: rgba(0, 0, 0, 0.2);
}

.btn-charge-sign.negative.active {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #991b1b;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.btn-charge-sign.positive.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #065f46;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.btn-charge-sign.neutral.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #b45309;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Action buttons */
.btn-shoot-explerify {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  border: none;
  color: #ffffff;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-shoot-explerify:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.btn-shoot-explerify:active {
  transform: translateY(0);
}

.btn-reset-explerify {
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  color: var(--text-dark);
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-explerify:hover {
  background: #ffffff;
  border-color: var(--text-muted);
}



