/* ── Reset & Base ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
    --bg-deep:   #0D1117;
  --bg-card:   #161B22;
  --bg-glass:  #1F2328;
  --border:    #374151;
  --accent-1:  #8DD6FF;
  --accent-2:  #58A6FF;
  --accent-3:  #388BFD;
  --success:   #08872B;
  --accent-muted: #0AA334;
  --warning:   #D29922;
  --text-1:    #FFFFFF;
  --text-2:    #C9D1D9;
    --timer-normal:  #1F2328;
  --timer-warning: #D29922;
  --timer-danger:  #F85149;
    --achievement-unlocked: #08872B;
  --achievement-locked:   #30363D;
    --bg-modal:  #161B22;
  --border-modal: 1px solid #374151;
  --text-3: #8B949E;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
  --shadow-glow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: "Inter", sans-serif;
  --font-display: "Space Grotesk", sans-serif;
  --font-mono: monospace;
  --font-size-base: 14px;
}

body.theme-clean {
    --bg-deep: #f8fafc;
  --bg-card: #ffffff;
  --bg-glass: #ffffff;
  --border: #e2e8f0;
  --accent-1: #3b82f6;
  --accent-2: #0ea5e9;
  --accent-3: #6366f1;
  --success: #16a34a;
  --warning: #d97706;
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-glow: rgba(0, 0, 0, 0.08) 0px 4px 16px 0px;
  --transition: all 160ms ease;
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --font-size-base: 16px;
}

body.theme-neobrutalism {
    --neo-bg-base: #fdfbf7;
  --neo-bg-surface: #ffffff;
  --neo-text-main: #000000;
  --neo-btn-primary: #b4a0ff;
  --neo-btn-secondary: #ffffff;
  --neo-btn-success: #82e0aa;
  --neo-btn-warning: #ffd166;
  --neo-btn-danger: #ff6b6b;
  --neo-btn-info: #48cae4;

  --bg-deep: var(--neo-bg-base);
  --bg-card: var(--neo-bg-surface);
  --bg-glass: var(--neo-bg-surface);
  --border: #000000;
  --accent-1: var(--neo-btn-primary);
  --accent-2: var(--neo-btn-info);
  --accent-3: var(--neo-btn-success);
  --success: var(--neo-btn-success);
  --warning: var(--neo-btn-warning);
  --text-1: var(--neo-text-main);
  --text-2: var(--neo-text-main);
  --text-3: var(--neo-text-main);
  --radius-lg: 5px;
  --radius-md: 5px;
  --radius-sm: 5px;
  --shadow-glow: 4px 4px 0px 0px var(--border);
  --transition: all 150ms ease;
  --font-body: "DM Sans", sans-serif;
  --font-display: "DM Sans", sans-serif;
  --font-mono: monospace;
  --font-size-base: 14px;
}

html,
body {
  height: 100%;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  background: var(--bg-deep);
  color: var(--text-1);
  overflow-x: hidden;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

body:not(.theme-clean):not(.theme-neobrutalism)::before {
  display: none;
}
body:not(.theme-clean):not(.theme-neobrutalism)::after {
  display: none;
}

.app-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 40px;
  gap: 24px;
}

header {
  text-align: center;
  padding: 8px 0;
  margin-top: 20px;
}
footer {
  margin-top: auto;   padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  width: 100%;
  max-width: 1250px;
  border-top: 1px solid var(--border);
}
footer span {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  color: var(--text-1);
}
body.theme-neobrutalism footer {
  border-top: 4px solid #000;
  color: #000;
}
body.theme-neobrutalism footer span {
  color: #000;
}
.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1F2328;
  border: 1px solid #30363D;
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #C9D1D9;
  margin-bottom: 14px;
}
body.theme-clean .header-badge {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--accent-1);
}
body.theme-neobrutalism .header-badge {
  background: #ffffff;
  border: 2px solid #000;
  color: #000;
  border-radius: 0;
  box-shadow: 2px 2px 0 0 #000;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
body:not(.theme-clean):not(.theme-neobrutalism) h1 {
  background: none;
  color: var(--text-1);
}
.subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
  font-weight: 400;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  align-items: start;
  transition: all 0.3s ease;
}
body.dev-mode .main-grid {
  grid-template-columns: 1.15fr 360px;
  max-width: 1150px;
}
body:not(.dev-mode):not(.theme-stats):not(.theme-collect) .main-grid {
  grid-template-columns: 1.25fr 1fr;
  max-width: 1250px;
}
body.theme-stats .main-grid {
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
}

@media (max-width: 860px) {
  .main-grid,
  body.dev-mode .main-grid,
  body:not(.dev-mode):not(.theme-stats):not(.theme-collect) .main-grid,
  body.theme-stats .main-grid,
  body.theme-collect .main-grid {
    grid-template-columns: 1fr !important;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  transition: var(--transition);
}
body.theme-neobrutalism .card {
  border: 2px solid var(--border);
  box-shadow: var(--shadow-glow);
  backdrop-filter: none;
}
body.theme-clean .card {
  box-shadow: var(--shadow-glow);
  backdrop-filter: none;
}
body:not(.theme-clean):not(.theme-neobrutalism) .card:hover {
  border-color: color-mix(in srgb, var(--accent-1) 50%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent-1) 15%, transparent);
}

.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
body.theme-neobrutalism .camera-header {
  border-bottom: 2px solid var(--border);
}
.camera-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--text-1) 6%, transparent);
  border: 1px solid var(--border);
  transition: var(--transition);
}
body.theme-neobrutalism .status-pill {
  border: 2px solid var(--border);
  border-radius: 0;
  box-shadow: 2px 2px 0 0 #000;
  background: #fff;
}
.status-pill.connected {
  background: rgba(8, 135, 43, 0.1);
  border-color: rgba(8, 135, 43, 0.4);
  color: var(--success);
}
.status-pill.disconnected {
  background: color-mix(in srgb, var(--accent-3) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent-3) 30%, transparent);
  color: var(--warning);
}
.status-pill.connecting {
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
  color: var(--warning);
}
.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill.connected .status-indicator {
  animation: pulse-dot 2s infinite;
}

.video-wrapper {
  position: relative;
  background: #000;
  aspect-ratio: 16/9;
  overflow: hidden;
}
body.theme-neobrutalism .video-wrapper {
  border-bottom: 2px solid var(--border);
}
#videoElement,
#outputCanvas,
#videoCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: block;
}
#outputCanvas,
#videoCanvas {
  position: absolute;
  inset: 0;
}
#outputCanvas {
  pointer-events: none;
}

.fps-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: color-mix(in srgb, var(--bg-deep) 50%, transparent);
  color: var(--text-1);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  backdrop-filter: blur(4px);
}
body.theme-neobrutalism .fps-badge {
  border: 2px solid #000;
  box-shadow: 2px 2px 0 0 #000;
  background: #fff;
  color: #000;
}

.prediction-overlay {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.overlay-letter {
  font-size: 64px;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1;
  color: #ffffff;
  background: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
  transition: var(--transition);
}
body.theme-clean .overlay-letter,
body.theme-neobrutalism .overlay-letter {
  background: transparent;
  -webkit-text-fill-color: #fff;
  -webkit-background-clip: border-box;
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 1));
}

.overlay-confidence {
  background: color-mix(in srgb, var(--bg-deep) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-1) 20%, transparent);
  padding: 6px 12px;
  border-radius: 100px;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 10px;
}
body.theme-neobrutalism .overlay-confidence {
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: 2px 2px 0 0 #000;
}
body.theme-clean .overlay-confidence {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 8px;
  padding: 4px 0;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-value {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-family: var(--font-display);
}
.stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  font-weight: 600;
}
body.theme-neobrutalism .stat-value {
  color: #000000;
}
body.theme-neobrutalism .stat-label {
  color: #000000;
  opacity: 0.6;
}
body.theme-clean .stat-value {
  color: var(--text-1);
}
.prediction-card {
  padding: 20px;
  text-align: center;
}

.big-letter-display {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--text-1) 3%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
body.theme-neobrutalism .big-letter-display {
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: inset 4px 4px 0px rgba(0, 0, 0, 0.1);
}
body.theme-clean .big-letter-display {
  background: #f1f5f9;
}

#mainPrediction {
  font-size: 100px;
  font-weight: 800;
  font-family: var(--font-display);
  color: #ffffff;
  background: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}
body.theme-neobrutalism #mainPrediction,
body.theme-clean #mainPrediction {
  background: transparent;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: var(--text-1);
  filter: none;
}


.confidence-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.word-card {
  padding: 20px;
}
.word-display {
  background: color-mix(in srgb, var(--bg-deep) 30%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 24px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-2);
  min-height: 64px;
  display: block;
  word-break: break-all;
  overflow-wrap: anywhere;
  margin-bottom: 16px;
}
body.theme-neobrutalism .word-display {
  background: #fff;
  border: 2px solid #000;
  color: #000;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 0 rgba(0, 0, 0, 0.1);
}
body.theme-clean .word-display {
  background: #f8fafc;
  color: var(--accent-1);
}

.word-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.btn {
  flex: 1;
  background: color-mix(in srgb, var(--text-1) 5%, transparent);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  font-family: inherit;
}
body.theme-neobrutalism .btn {
  background: var(--neo-bg-surface);
  border: 2px solid var(--border);
  color: var(--neo-text-main);
  border-radius: 0;
  box-shadow: 2px 2px 0 0 var(--border);
}
body.theme-neobrutalism .btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 0 var(--border);
}
body.theme-neobrutalism .btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 0 var(--border);
}

body.theme-neobrutalism .camera-card {
  background: #ffe259 !important;
  color: #000000;
}
body.theme-neobrutalism .side-panel .card:nth-child(1),
body.theme-neobrutalism .prediction-card {
  background: #ff9a9e !important;
  color: #000000;
}
body.theme-neobrutalism .side-panel .card:nth-child(2),
body.theme-neobrutalism .word-card {
  background: #a1c4fd !important;
  color: #000000;
}
body.theme-neobrutalism .side-panel .card:nth-child(3),
body.theme-neobrutalism .stats-card {
  background: #bff098 !important;
  color: #000000;
}
body.theme-neobrutalism .side-panel .card:nth-child(4),
body.theme-neobrutalism .log-card {
  background: #e0c3fc !important;
  color: #000000;
}
body.theme-neobrutalism .stats-global-card {
  background: #e0c3fc !important;
  color: #000000;
}
body.theme-neobrutalism .matrix-container {
  background: #bff098 !important;
  color: #000000;
}

/* ── Neobrutalism Semantic Buttons (Earth Tones) ──────────────────────────────────────────────── */
body.theme-neobrutalism .neo-btn-primary,
body.theme-neobrutalism .neo-btn-secondary,
body.theme-neobrutalism .neo-btn-success,
body.theme-neobrutalism .neo-btn-warning,
body.theme-neobrutalism .neo-btn-danger,
body.theme-neobrutalism .neo-btn-info {
  border: 2px solid var(--border);
  box-shadow: 2px 2px 0 0 var(--border);
  border-radius: 0;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  transition: all 150ms ease;
}

body.theme-neobrutalism .neo-btn-primary:hover,
body.theme-neobrutalism .neo-btn-secondary:hover,
body.theme-neobrutalism .neo-btn-success:hover,
body.theme-neobrutalism .neo-btn-warning:hover,
body.theme-neobrutalism .neo-btn-danger:hover,
body.theme-neobrutalism .neo-btn-info:hover {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 0 var(--border);
}

body.theme-neobrutalism .neo-btn-primary:active,
body.theme-neobrutalism .neo-btn-secondary:active,
body.theme-neobrutalism .neo-btn-success:active,
body.theme-neobrutalism .neo-btn-warning:active,
body.theme-neobrutalism .neo-btn-danger:active,
body.theme-neobrutalism .neo-btn-info:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 0 var(--border);
}

body.theme-neobrutalism .neo-btn-primary {
  background: var(--neo-btn-primary);
  color: #000000;
}
body.theme-neobrutalism .neo-btn-secondary {
  background: var(--neo-btn-secondary);
  color: var(--neo-text-main);
}
body.theme-neobrutalism .neo-btn-success {
  background: var(--neo-btn-success);
  color: #000000;
}
body.theme-neobrutalism .neo-btn-warning {
  background: var(--neo-btn-warning);
  color: #000000;
}
body.theme-neobrutalism .neo-btn-danger {
  background: var(--neo-btn-danger);
  color: #000000;
}
body.theme-neobrutalism .neo-btn-info {
  background: var(--neo-btn-info);
  color: #000000;
}

body.theme-neobrutalism #btnToggleCamera.start {
  background: var(--neo-btn-success) !important;
  color: #000000 !important;
}
body.theme-neobrutalism #btnToggleCamera.stop {
  background: var(--neo-btn-danger) !important;
  color: #000000 !important;
}
body.theme-neobrutalism #btnSpace {
  background: var(--neo-btn-success) !important;
  color: #000000 !important;
}
body.theme-neobrutalism #btnBackspace {
  background: var(--neo-btn-warning) !important;
  color: #000000 !important;
}
body.theme-neobrutalism #btnClear {
  background: var(--neo-btn-danger) !important;
  color: #000000 !important;
}
body.theme-neobrutalism #btnSpeak {
  background: var(--neo-btn-info) !important;
  color: #000000 !important;
}
body.theme-neobrutalism #btnFlashcard {
  background: var(--neo-btn-primary) !important;
  color: #000000 !important;
}
body.theme-neobrutalism #btnWordChallenge {
  background: #ff9a9e !important;
  color: #000000 !important;
}

body.theme-neobrutalism #btnFlashcardHint {
  background: var(--neo-btn-success) !important;
  color: #000000 !important;
}
body.theme-neobrutalism #btnAchievements {
  background: #ffd700 !important;
  color: #000000 !important;
}
body.theme-neobrutalism .flashcard-btn-skip {
  background: #e0c3fc !important;
  color: #000000 !important;
}
body.theme-neobrutalism .flashcard-btn-stop {
  background: var(--neo-btn-danger) !important;
  color: #000000 !important;
}
body.theme-neobrutalism #achievementsModal .btn-danger {
  background: var(--neo-btn-danger) !important;
  color: #000000 !important;
}

.btn:hover {
  background: color-mix(in srgb, var(--text-1) 10%, transparent);
  border-color: color-mix(in srgb, var(--text-1) 20%, transparent);
}
.btn-primary {
  background: color-mix(in srgb, var(--accent-1) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent-1) 40%, transparent);
  color: color-mix(in srgb, var(--accent-1) 80%, white);
}
body.theme-clean .btn-primary {
  background: var(--accent-1);
  color: #fff;
  border: none;
}
body.theme-neobrutalism .btn-primary {
  background: var(--accent-1);
  color: #1a1a1a;
}
.btn.stop {
  background: color-mix(in srgb, var(--accent-3) 10%, transparent);
  color: var(--accent-3);
  border-color: color-mix(in srgb, var(--accent-3) 30%, transparent);
}
body.theme-clean .btn.stop {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}
body.theme-neobrutalism .btn.stop {
  background: var(--neo-btn-danger);
  color: #000000;
}

.btn.start {
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 40%, transparent);
}
body.theme-clean .btn.start {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.matrix-container {
  overflow-x: auto;
  padding: 20px;
}
table.matrix {
  border-collapse: collapse;
  font-size: 11px;
  text-align: center;
  font-family: var(--font-mono);
  width: 100%;
}
table.matrix th,
table.matrix td {
  border: 1px solid var(--border);
  padding: 4px;
  width: 22px;
  height: 22px;
}
body.theme-neobrutalism table.matrix th,
body.theme-neobrutalism table.matrix td {
  border: 2px solid #000;
}
body.theme-neobrutalism table.matrix td {
  color: #000000 !important;
  font-weight: 700;
}
body.theme-clean table.matrix td {
  color: #0f172a !important;
  font-weight: 600;
}
table.matrix th {
  background: color-mix(in srgb, var(--text-1) 5%, transparent);
  color: var(--text-2);
  font-weight: normal;
}
body.theme-clean table.matrix th {
  background: #f8fafc;
  font-weight: 600;
}
body.theme-neobrutalism table.matrix th {
  background: #ffde59;
  font-weight: 600;
  color: #000;
}

select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 14px;
}
body.theme-neobrutalism select,
body.theme-neobrutalism input[type="number"] {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  border-radius: 0 !important;
  box-shadow: 2px 2px 0 0 #000000 !important;
  font-weight: 600 !important;
}
select option {
  background-color: var(--bg-card);
  color: var(--text-1);
}
body.theme-neobrutalism select option {
  background-color: #fff !important;
  color: #000 !important;
}
body.theme-clean select option {
  background-color: #fff;
  color: #000;
}

body.theme-neobrutalism #serverStats {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  border-radius: 0 !important;
}

#progress-bar {
  width: 100%;
  height: 12px;
  background: color-mix(in srgb, var(--text-1) 10%, transparent);
  border-radius: 6px;
  margin-top: 10px;
  overflow: hidden;
}
body.theme-neobrutalism #progress-bar {
  border: 2px solid #000;
  border-radius: 0;
  background: #fff;
}
body.theme-clean #progress-bar {
  background: #e2e8f0;
}

#progress-fill {
  height: 100%;
  min-width: 6px;   width: 0%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: inherit;
  transition: width 0.15s linear;
}
#progress-fill[data-stage="mid"] {
  background: linear-gradient(90deg, var(--achievement-unlocked), #fcd34d);
}
#progress-fill[data-stage="done"] {
  background: linear-gradient(90deg, #10b981, #34d399);
}
body.theme-neobrutalism #progress-fill {
  background: var(--accent-1);
  border-right: 2px solid #000;
  min-width: 4px;
}

.theme-switcher {
  position: absolute;
  top: 8px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: var(--radius-sm);
}
body.theme-neobrutalism .theme-switcher {
  background: #ffffff !important;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: 4px 4px 0 0 #000;
}
.theme-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.2s;
  font-family: var(--font-body);
}
body.theme-neobrutalism .theme-btn {
  border-radius: 0;
  color: #000000 !important;
}
body.theme-neobrutalism .theme-btn:hover {
  background: #00e5ff !important;
  color: #000000 !important;
}
.theme-btn.active {
  background: color-mix(in srgb, var(--accent-1) 15%, transparent);
  color: var(--accent-1);
}
body.theme-neobrutalism .theme-btn.active {
  background: #ff66c4 !important;
  color: #000000 !important;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 0 #000;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.card {
  animation: fadeIn 0.5s ease forwards;
}
.side-panel .card:nth-child(2) {
  animation-delay: 0.05s;
}
.side-panel .card:nth-child(3) {
  animation-delay: 0.1s;
}
.side-panel .card:nth-child(4) {
  animation-delay: 0.15s;
}

.nav-links {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: var(--radius-sm);
}
body.theme-neobrutalism .nav-links {
  background: #ffffff !important;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: 4px 4px 0 0 #000;
}
.nav-link {
  color: var(--text-1);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
}
body.theme-neobrutalism .nav-link {
  border-radius: 0;
  color: #000000 !important;
}
body.theme-neobrutalism .nav-link:hover {
  background: #00e5ff !important;
  color: #000000 !important;
}
.nav-link:hover {
  background: color-mix(in srgb, var(--text-1) 10%, transparent);
}
.nav-link.active {
  background: var(--accent-1);
  color: var(--text-1);
  opacity: 1;
}
body.theme-clean .nav-link.active {
  background: var(--accent-1);
  color: #fff;
}
body.theme-neobrutalism .nav-link.active {
  background: #ff66c4 !important;
  color: #000 !important;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 0 #000;
}

/* ── Training Overlay (Flashcard) Styles ────────────────────────── */
.flashcard-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg-deep) 100%, transparent);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  }
body.theme-clean .flashcard-overlay {
  background: rgba(248, 250, 252, 1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.theme-neobrutalism .flashcard-overlay {
  background: rgba(255, 255, 255, 1);
  border: 4px solid #000000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.flashcard-overlay.peek-mode {
  background: color-mix(in srgb, var(--bg-deep) 10%, transparent) !important;
  }
body.theme-clean .flashcard-overlay.peek-mode {
  background: rgba(248, 250, 252, 0.1) !important;
}
body.theme-neobrutalism .flashcard-overlay.peek-mode {
  background: rgba(255, 255, 255, 0.1) !important;
}

.flashcard-timer {
  background: color-mix(in srgb, var(--accent-3) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-3) 50%, transparent);
  padding: 8px 16px;
  border-radius: 20px;
  color: var(--accent-3);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
body.theme-clean .flashcard-timer {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}
body.theme-neobrutalism .flashcard-timer {
  background: #ff5757;
  border: 2px solid #000;
  border-radius: 0;
  color: #ffffff;
  box-shadow: 2px 2px 0 0 #000;
}

.flashcard-label {
  font-size: 12px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.flashcard-target {
  font-size: 140px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-1);
  background: none;
  filter: none;
  line-height: 1;
}
body.theme-clean .flashcard-target {
  background: transparent;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: var(--text-1);
  filter: none;
}
body.theme-neobrutalism .flashcard-target {
  background: transparent;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: var(--text-1);
  filter: none;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
}

.flashcard-pred-wrap {
  font-size: 16px;
  color: var(--text-2);
}
.flashcard-current {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 24px;
  margin-left: 6px;
}
body.theme-clean .flashcard-current {
  color: var(--accent-1);
}
body.theme-neobrutalism .flashcard-current {
  color: #5271ff !important;
}

.flashcard-status {
  font-size: 20px;
  font-weight: 600;
  min-height: 32px;
  color: var(--success);
}
body.theme-neobrutalism .flashcard-status {
  font-weight: 800;
  text-transform: uppercase;
}

.flashcard-stats-row {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-2);
  align-items: center;
}
.flashcard-stats-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.flashcard-stats-row strong {
  color: var(--text-1);
}
.flashcard-stats-row #flashStreak {
  color: var(--warning);
}
.flashcard-stats-row .material-symbols-outlined {
  font-size: 18px;
  vertical-align: middle;
  line-height: 1;
}

.flashcard-btn-skip {
  padding: 12px 28px !important;
  background: color-mix(in srgb, var(--accent-1) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-1) 40%, transparent);
  color: color-mix(in srgb, var(--accent-1) 80%, white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
body.theme-clean .flashcard-btn-skip {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}
body.theme-neobrutalism .flashcard-btn-skip {
  background: #00e5ff !important;
  color: #000000 !important;
  border: 2px solid #000 !important;
  border-radius: 0 !important;
  box-shadow: 2px 2px 0 0 #000 !important;
}

.flashcard-btn-stop {
  padding: 12px 28px !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
body.theme-neobrutalism .flashcard-btn-stop {
  background: #ff5757 !important;
  color: #ffffff !important;
  border: 2px solid #000 !important;
  border-radius: 0 !important;
  box-shadow: 2px 2px 0 0 #000 !important;
}

/* ── ASL Reference Guide Styles ────────────────────────────────── */
.guide-card {
  transition: var(--transition);
}
body.theme-neobrutalism .guide-card {
  background: #ffde59 !important; }
.guide-image-container {
  width: 90%;
  margin: 0 auto;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
body.theme-neobrutalism .guide-image-container {
  background: #ffffff !important;
  border: 2px solid #000000 !important;
  border-radius: 0 !important;
  box-shadow: 4px 4px 0px #000000 !important;
}
body.theme-clean .guide-image-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
body:not(.theme-clean):not(.theme-neobrutalism) .guide-image-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .prediction-overlay {
    bottom: 10px !important;
  }
  .overlay-letter {
    font-size: 32px !important;
  }
  .overlay-confidence {
    padding: 4px 8px !important;
    gap: 6px !important;
  }
  .confidence-label {
    font-size: 0.55rem !important;
    margin-bottom: 2px !important;
  }
  .confidence-track {
    height: 10px !important;
  }
  .confidence-value {
    font-size: 8px !important;
    right: 4px !important;
  }

  .nav-links,
  .theme-switcher {
    position: static !important;
    display: flex !important;
    margin: 8px auto !important;
    width: fit-content !important;
    max-width: 100% !important;
    box-shadow: none !important;
    flex-wrap: wrap;
    justify-content: center;
  }
  body.theme-neobrutalism .nav-links,
  body.theme-neobrutalism .theme-switcher {
    box-shadow: 2px 2px 0 0 #000 !important;
  }
  .app-wrapper {
    padding-top: 12px !important;
  }
  header {
    margin-top: 8px !important;
  }
  .flashcard-target {
    font-size: 80px !important;
  }
  .flashcard-timer {
    font-size: 16px !important;
    padding: 6px 12px !important;
  }
  .big-letter-display {
    width: 100px !important;
    height: 100px !important;
  }
  #mainPrediction {
    font-size: 60px !important;
  }
}

/* ── Confidence Bar (Task 2) ───────────────────────────────────── */
.confidence-bar-container {
  width: 100%;
}
.confidence-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  display: block;
  margin-bottom: 4px;
}
.confidence-track {
  position: relative;
  height: 14px;
  background: color-mix(in srgb, var(--text-1) 15%, transparent);
  border-radius: 7px;
  overflow: hidden;
}
.confidence-fill {
  height: 100%;
  background: var(--success);
  border-radius: 7px;
    transition: width 0.15s linear;
  width: 0%;
}
.confidence-value {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 800;
  color: var(--text-1);
  text-shadow: 0 1px 2px color-mix(in srgb, var(--bg-deep) 50%, transparent);
  line-height: 1;
}

/* ── Camera Placeholder (Task 3) ───────────────────────────────── */
.camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  gap: 10px;
  color: color-mix(in srgb, var(--text-1) 25%, transparent);
  pointer-events: none;
  z-index: 2;
}
.camera-placeholder p {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--text-1) 40%, transparent);
}
.camera-placeholder span {
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--text-1) 20%, transparent);
}

/* ── Hand Placement Guide (Task 2) ─────────────────────────────── */
.hand-guide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
  opacity: 1;
    transition: opacity 0.2s ease;
}
.hand-guide-box {
  width: 38%;
  aspect-ratio: 2/3;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
}
.guide-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: color-mix(in srgb, var(--text-1) 30%, transparent);
  border-style: solid;
}
.guide-corner.tl {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
  border-radius: 3px 0 0 0;
}
.guide-corner.tr {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
  border-radius: 0 3px 0 0;
}
.guide-corner.bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 3px;
}
.guide-corner.br {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 3px 0;
}
.guide-text {
  font-size: 0.66rem;
  color: color-mix(in srgb, var(--text-1) 30%, transparent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}
body.theme-neobrutalism .guide-corner {
  border-color: rgba(0, 0, 0, 0.25);
}
body.theme-neobrutalism .guide-text {
  color: rgba(0, 0, 0, 0.3);
}

/* ── Status Badge (Task 1) ─────────────────────────────────────── */
.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: var(--transition);
}
body.theme-neobrutalism .status-badge {
  border: 2px solid var(--border);
  border-radius: 0;
  box-shadow: 2px 2px 0 0 #000;
}
.status-badge.connecting {
  background: var(--warning);
  color: #1a1a1a;
  animation: pulse-opacity 1.2s ease-in-out infinite;
}
.status-badge.connected {
  background: var(--accent-muted);
  color: var(--text-1);
  animation: none;
}
.status-badge.error {
  background: var(--accent-3);
  color: var(--text-1);
  animation: none;
}

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

.log-scroll {
  height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  line-height: 1.4;
  padding: 2px 0;
  border-bottom: 1px solid var(--border);
}
.log-time {
  font-family: var(--font-mono);
  color: var(--text-3);
  flex-shrink: 0;
  font-size: 10px;
  padding-top: 1px;
}
.log-msg {
  color: var(--text-2);
}
.log-msg.success {
  color: var(--success);
}
.log-msg.error {
  color: var(--accent-3);
}
.log-msg.warn {
  color: var(--warning);
}
.log-msg.info {
  color: var(--text-2);
}

body.theme-neobrutalism .log-entry {
  border-bottom-color: #000;
}
body.theme-neobrutalism .log-time {
  color: #555;
}
body.theme-neobrutalism .log-msg {
  color: #000;
}
body.theme-neobrutalism .log-msg.success {
  color: #16a34a;
}
body.theme-neobrutalism .log-msg.error {
  color: #dc2626;
}
body.theme-neobrutalism .log-msg.warn {
  color: #d97706;
}

.btn.btn-danger {
  background: color-mix(in srgb, var(--accent-3) 10%, transparent);
  color: var(--accent-3);
  border-color: color-mix(in srgb, var(--accent-3) 30%, transparent);
}
.btn.btn-danger:hover {
  background: color-mix(in srgb, var(--accent-3) 20%, transparent);
}
body.theme-clean .btn.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}
body.theme-neobrutalism .btn.btn-danger {
  background: #ff5757 !important;
  color: #fff !important;
}

.btn.btn-tts {
  background: color-mix(in srgb, var(--accent-1) 15%, transparent);
  color: var(--accent-1);
  border-color: color-mix(in srgb, var(--accent-1) 35%, transparent);
}
.btn.btn-tts:hover {
  background: color-mix(in srgb, var(--accent-1) 25%, transparent);
}
.btn.btn-tts.speaking {
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
  animation: pulse-opacity 0.8s ease-in-out infinite;
}
body.theme-clean .btn.btn-tts {
  background: #eff6ff;
  color: var(--accent-1);
  border-color: #bfdbfe;
}
body.theme-neobrutalism .btn.btn-tts {
  background: #5271ff !important;
  color: #fff !important;
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent-2);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink-cursor 1s step-end infinite;
}
@keyframes blink-cursor {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
body.theme-clean .cursor-blink {
  background: var(--accent-1);
}
body.theme-neobrutalism .cursor-blink {
  background: #000;
}

/* ── Task 1: Letter History ────────────────────────────────────── */
.letter-history {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  min-height: 28px;
  padding: 5px 8px;
  background: color-mix(in srgb, var(--bg-deep) 20%, transparent);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  align-items: center;
}
body.theme-clean .letter-history {
  background: #f1f5f9;
  border: 1px solid var(--border);
}
body.theme-neobrutalism .letter-history {
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
}
.letter-chip {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--text-1) 10%, transparent);
  color: var(--text-1);
  line-height: 1.5;
  transition: none; }
.letter-chip:last-child {
  background: color-mix(in srgb, var(--accent-1) 30%, transparent);
  color: var(--accent-1);
}
.letter-chip.is-space {
  font-style: italic;
  opacity: 0.4;
  font-size: 0.6rem;
}
body.theme-clean .letter-chip {
  background: #e2e8f0;
  color: #0f172a;
}
body.theme-clean .letter-chip:last-child {
  background: #dbeafe;
  color: var(--accent-1);
}
body.theme-neobrutalism .letter-chip {
  background: #eee;
  color: #000;
  border: 1px solid #000;
  border-radius: 0;
}
body.theme-neobrutalism .letter-chip:last-child {
  background: #ff66c4;
  border-color: #000;
}

/* ── Task 2: Confusion Matrix Empty State ──────────────────────── */
#matrixCaptureArea {
  position: relative; }
.matrix-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  pointer-events: none;
  z-index: 1;
  padding: 20px;
}
.matrix-empty-icon {
  font-size: 2.2rem;
  opacity: 0.25;
  line-height: 1;
}
.matrix-empty-title {
  font-weight: 800;
  font-size: 0.9rem;
  opacity: 0.4;
  margin: 0;
}
.matrix-empty-desc {
  font-size: 0.75rem;
  opacity: 0.3;
  margin: 0;
  line-height: 1.6;
}
.matrix-empty.has-data {
  display: none;
}
body.theme-neobrutalism .matrix-empty-title,
body.theme-neobrutalism .matrix-empty-desc {
  color: #000;
}

body.theme-clean .confidence-value,
body.theme-neobrutalism .confidence-value {
  color: #000;
  text-shadow: none;
}

body.theme-neobrutalism #kontrolKoleksiCard {
  background: #00bfff !important; }

/* ── Word Challenge Styles ─────────────────────────────────────── */
.word-challenge-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0;
}
.challenge-letter {
  font-size: 56px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-3);
  opacity: 0.4;
  border-bottom: 4px solid var(--text-3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.challenge-letter.active {
  color: var(--accent-2);
  opacity: 1;
  border-bottom-color: var(--accent-2);
  transform: scale(1.1);
}
.challenge-letter.done {
  color: var(--success);
  opacity: 1;
  border-bottom-color: var(--success);
  transform: scale(1);
  text-shadow: none;
}
body.theme-clean .challenge-letter {
  color: var(--text-3);
  border-bottom-color: var(--text-3);
  opacity: 0.3;
}
body.theme-clean .challenge-letter.active {
  color: var(--accent-1);
  border-bottom-color: var(--accent-1);
  opacity: 1;
}
body.theme-clean .challenge-letter.done {
  color: var(--success);
  border-bottom-color: var(--success);
  opacity: 1;
  text-shadow: none;
}
body.theme-neobrutalism .challenge-letter {
  color: #ccc;
  border-bottom: 4px solid #ccc;
  opacity: 0.5;
}
body.theme-neobrutalism .challenge-letter.active {
  color: #00e5ff;
  border-bottom-color: #000;
  opacity: 1;
  -webkit-text-stroke: 2px #000;
}
body.theme-neobrutalism .challenge-letter.done {
  color: #00ff66;
  border-bottom-color: #000;
  opacity: 1;
  -webkit-text-stroke: 2px #000;
}

/* ── Gamification (Achievements) Styles ────────────────────────── */
.badge-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all 0.3s;
}
.badge-item.badge-locked {
  background: var(--bg-deep);
  opacity: 0.6;
  filter: grayscale(100%);
  border-color: var(--border);
}
.badge-item.badge-unlocked {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--achievement-unlocked) 10%, transparent),
    color-mix(in srgb, var(--achievement-unlocked) 5%, transparent)
  );
  border-color: var(--achievement-unlocked);
  opacity: 1;
  filter: none;
  box-shadow: none;
}
.badge-icon {
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--achievement-unlocked);
  border: 2px solid var(--achievement-unlocked);
}
.badge-locked .badge-icon {
  color: var(--text-3);
  border-color: var(--text-3);
  background: var(--bg-surface);
}
.badge-icon span {
  font-size: 32px;
}
.badge-info {
  flex: 1;
}
.badge-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--text-1);
}
.badge-unlocked .badge-title {
  color: var(--achievement-unlocked);
  text-shadow: none;
}
.badge-desc {
  font-size: 0.85rem;
  color: var(--text-2);
}

body.theme-neobrutalism .badge-item.badge-unlocked {
  background: #fff9c4;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
}
body.theme-neobrutalism .badge-icon {
  border: 3px solid #000;
  background: #ffd700;
  color: #000;
}
body.theme-neobrutalism .badge-locked .badge-icon {
  background: #ccc;
  border-color: #000;
  color: #555;
}

.toast-notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 2px solid var(--achievement-unlocked);
  border-radius: 50px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--achievement-unlocked) 20%, transparent);
  z-index: 9999;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast-notification.show {
  bottom: 40px;
  opacity: 1;
}
.toast-icon {
  font-size: 28px;
}
.toast-content {
  display: flex;
  flex-direction: column;
}
.toast-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--achievement-unlocked);
}
.toast-desc {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-1);
}

body.theme-neobrutalism .toast-notification {
  background: #ffd700;
  border: 4px solid #000;
  border-radius: 0;
  box-shadow: 6px 6px 0 #000;
}
body.theme-neobrutalism .toast-title {
  color: #000;
  text-transform: uppercase;
}
body.theme-neobrutalism .toast-desc {
  color: #000;
  font-family: var(--font-display);
}

/* ── Panel Penyusun Kata Controls ────────────────────────── */
.word-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.word-controls .btn {
  flex: 1 1 30%;
  padding: 10px 8px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.word-controls .btn .material-symbols-outlined {
  font-size: 1.1rem;
}
