/* ==========================================================================
   LexiDrop - Option 1: Artisan Goblin Workshop Bouncy Cartoon 3D UI
   ========================================================================== */

/* 1. Offline Greek & Latin Cartoon Fonts (M PLUS Rounded 1c) */
@font-face {
  font-family: "GameDisplay";
  src: url("assets/fonts/mplus-700-greek.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "GameDisplay";
  src: url("assets/fonts/mplus-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "GameDisplay";
  src: url("assets/fonts/mplus-800-greek.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "GameDisplay";
  src: url("assets/fonts/mplus-800-latin.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "GameDisplay";
  src: url("assets/fonts/mplus-900-greek.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "GameDisplay";
  src: url("assets/fonts/mplus-900-latin.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}

:root {
  --bg-deep: #120904;
  --bg-panel: #341c0e;
  --wood-top: #a76636;
  --wood-mid: #7d4720;
  --wood-dark: #4f290e;
  --wood-border: #261209;
  --border-gold: #f5b841;
  --gold: #fde047;
  --gold-glow: #eab308;
  --text-main: #fffdf5;
  --text-muted: #e7cfb5;
  --font-ui: "GameDisplay", "Segoe UI", system-ui, -apple-system, sans-serif;
  --stroke-text:
    -1.5px -1.5px 0 #261209,
     1.5px -1.5px 0 #261209,
    -1.5px  1.5px 0 #261209,
     1.5px  1.5px 0 #261209,
     0      2.5px 0 #261209;
  --stroke-text-sm:
    -1px -1px 0 #261209,
     1px -1px 0 #261209,
    -1px  1px 0 #261209,
     1px  1px 0 #261209,
     0    1.5px 0 #261209;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button, input, select {
  font-family: inherit;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 50% 15%, rgba(167, 102, 54, 0.35) 0%, transparent 70%),
    radial-gradient(circle at 50% 85%, rgba(38, 18, 9, 0.9) 0%, #0a0402 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: none;
}

#appContainer {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  max-height: 920px;
  display: flex;
  flex-direction: column;
  padding: 0 0 4px;
  position: relative;
  background: #170d06;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

/* ==========================================================================
   Header Bar
   ========================================================================== */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(6px, env(safe-area-inset-top)) 12px 6px;
  background: linear-gradient(180deg, #3d2010 0%, #261209 100%);
  border-bottom: 2.5px solid #261209;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55);
  z-index: 12;
}

.brand-title h1 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fffdf5;
  text-shadow: var(--stroke-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 2.5px solid #261209;
  background: linear-gradient(180deg, #b8733d 0%, #834a1e 56%, #592e0f 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow:
    inset 0 2px 0 rgba(255, 228, 152, 0.56),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    0 3px 0 #1f0d04,
    0 5px 8px rgba(0, 0, 0, 0.52);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.header-icon-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1f0d04;
}

.ui-ico-btn {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 1.5px 2px rgba(0, 0, 0, 0.65));
}

/* ==========================================================================
   Mode Switcher Tabs
   ========================================================================== */
.mode-bar {
  display: flex;
  gap: 6px;
  padding: 5px 10px;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
}

.mode-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid #261209;
  background: linear-gradient(180deg, #592e0f 0%, #381b07 100%);
  color: #e7cfb5;
  font-size: 11px;
  font-weight: 900;
  text-shadow: var(--stroke-text-sm);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 2.5px 0 #1a0b04,
    0 4px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.08s ease, background 0.15s ease;
  white-space: nowrap;
}

.mode-btn.active {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 55%, #b45309 100%);
  color: #ffffff;
  border-color: #261209;
  box-shadow:
    inset 0 2px 0 #fffbeb,
    0 3px 0 #451a03,
    0 5px 8px rgba(0, 0, 0, 0.55);
}

.mode-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1a0b04;
}

.ui-ico-sm {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
}

/* ==========================================================================
   Blitz & Daily Banners
   ========================================================================== */
.blitz-timer-bar {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  border: 2px solid #261209;
  border-radius: 10px;
  padding: 4px 12px;
  margin: 3px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 12px;
  color: #ffffff;
  text-shadow: var(--stroke-text-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 3px 6px rgba(0,0,0,0.5);
  animation: pulseBlitz 1s infinite alternate;
}
.blitz-timer-bar.hidden {
  display: none;
}
@keyframes pulseBlitz {
  from { opacity: 0.88; }
  to { opacity: 1; }
}

.daily-banner {
  background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
  border: 2px solid #261209;
  border-radius: 10px;
  padding: 4px 12px;
  margin: 3px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 12px;
  color: #fef08a;
  text-shadow: var(--stroke-text-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 3px 6px rgba(0,0,0,0.5);
}
.daily-banner.hidden {
  display: none;
}

/* ==========================================================================
   Resource Capsules (Top HUD)
   ========================================================================== */
.header-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 10px 4px 18px;
  width: 100%;
}

.res-capsule {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 2px 10px 2px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #985a2b 0%, #6d3b15 56%, #492309 100%);
  border: 2.5px solid #261209;
  box-shadow:
    inset 0 2px 0 rgba(255, 224, 130, 0.52),
    inset 0 -2px 0 rgba(0, 0, 0, 0.42),
    0 3px 0 #1c0b03,
    0 5px 10px rgba(0, 0, 0, 0.52);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-shadow: var(--stroke-text);
  white-space: nowrap;
}

.res-emblem {
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ui-ico {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.72));
}

.res-vals {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.res-lbl {
  font-size: 8px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: var(--stroke-text-sm);
  letter-spacing: 0.5px;
}

.res-val {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: var(--stroke-text);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Parchment Quiz Card
   ========================================================================== */
.quiz-card {
  margin: 4px 10px;
  padding: 7px 12px;
  border-radius: 14px;
  border: 2.5px solid #261209;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 40%, #fde68a 85%, #d97706 100%);
  box-shadow:
    inset 0 2px 0 #ffffff,
    inset 0 -2px 0 rgba(0, 0, 0, 0.2),
    0 4px 0 #451a03,
    0 8px 16px rgba(0, 0, 0, 0.45);
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.quiz-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 900;
  color: #78350f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
}

.quiz-bounty {
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  border: 1.5px solid #261209;
  border-radius: 999px;
  padding: 1px 8px;
  text-shadow: var(--stroke-text-sm);
  box-shadow: 0 2px 0 #451a03;
}

.quiz-clue {
  font-size: 12px;
  font-weight: 800;
  color: #382417;
  line-height: 1.25;
  text-align: center;
}

.ui-ico-xs {
  width: 15px;
  height: 15px;
  object-fit: contain;
  vertical-align: middle;
}

/* ==========================================================================
   Current Word Selection Bar (3D Pillow Bar)
   ========================================================================== */
.word-preview-bar {
  margin: 4px 10px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-radius: 14px;
  border: 2.5px solid #261209;
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 55%, #b45309 100%);
  box-shadow:
    inset 0 2px 0 #fffbeb,
    inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 4px 0 #451a03,
    0 8px 16px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.08s ease;
}

.word-preview-bar:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #451a03;
}

.preview-word {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: var(--stroke-text);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.preview-pts {
  font-size: 12px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: var(--stroke-text-sm);
}

/* ==========================================================================
   Board & Canvas Frame
   ========================================================================== */
.board-wrapper {
  flex: 1;
  width: 100%;
  position: relative;
  background: rgba(0, 0, 0, 0.5);
  border-top: 2.5px solid #261209;
  border-bottom: 2.5px solid #261209;
  overflow: hidden;
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.7);
}

#boardCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
}

/* ==========================================================================
   Bottom Action Toolbar & 3D Pillow Buttons
   ========================================================================== */
.toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 16px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #3d2010 0%, #221107 100%);
  border-top: 3px solid #261209;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.6);
}

.btn-pillow-3d {
  position: relative;
  width: 74px;
  height: 58px;
  border-radius: 16px;
  border: 2.5px solid #261209;
  background: linear-gradient(180deg, #b8733d 0%, #834a1e 56%, #592e0f 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow:
    inset 0 2px 0 rgba(255, 228, 152, 0.56),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    0 5px 0 #1f0d04,
    0 8px 14px rgba(0, 0, 0, 0.55);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-pillow-3d::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 8px;
  right: 8px;
  height: 32%;
  border-radius: 12px 12px 6px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.btn-pillow-3d:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 152, 0.4),
    0 2px 0 #1f0d04,
    0 3px 6px rgba(0, 0, 0, 0.4);
}

.booster-ico {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.65));
  pointer-events: none;
}

.booster-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5959 0%, #dc2626 100%);
  border: 2px solid #261209;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: var(--stroke-text-sm);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Modals & Dialogs (Carved Wood & 3D Buttons)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 2, 0.82);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  border: 3px solid #261209;
  background: linear-gradient(180deg, #3d2314 0%, #26140a 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 224, 130, 0.4),
    0 8px 0 #120703,
    0 16px 36px rgba(0, 0, 0, 0.85);
  padding: 22px 18px 18px;
  color: #fffdf5;
  text-align: center;
}

/* Settings Modal with sticky top-right red X close button */
.modal-box.modal-box-settings {
  position: relative;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-box.modal-box-settings .modal-scroll-body {
  padding: 22px 18px 20px;
  overflow-y: auto;
  max-height: 88vh;
  box-sizing: border-box;
  text-align: center;
  width: 100%;
}

.modal-close-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #571010;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 3px 0 #571010,
    0 4px 10px rgba(0, 0, 0, 0.55);
  z-index: 50;
  transition: transform 0.08s ease, filter 0.08s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-close-x:hover {
  filter: brightness(1.1);
}

.modal-close-x:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 1px 0 #571010,
    0 2px 4px rgba(0, 0, 0, 0.5);
}

.modal-header-ico {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
  color: #fffdf5;
  text-shadow: var(--stroke-text);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 13px;
  font-weight: 700;
  color: #e7cfb5;
  line-height: 1.45;
  margin-bottom: 14px;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 2.5px solid #261209;
  font-size: 14px;
  font-weight: 900;
  text-shadow: var(--stroke-text);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  margin-bottom: 8px;
  text-decoration: none;
}

.modal-btn.primary {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 55%, #b45309 100%);
  color: #ffffff;
  box-shadow:
    inset 0 2px 0 #fffbeb,
    0 4px 0 #451a03,
    0 6px 12px rgba(0, 0, 0, 0.5);
}

.modal-btn.secondary {
  background: linear-gradient(180deg, #854d0e 0%, #592e0f 100%);
  color: #fef08a;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    0 4px 0 #1f0d04,
    0 6px 12px rgba(0, 0, 0, 0.5);
}

.modal-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1f0d04;
}

/* Settings Sections */
.settings-section {
  text-align: left;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1.5px solid #261209;
}

.settings-section-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fde047;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-shadow: var(--stroke-text-sm);
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}
.setting-row:last-child {
  margin-bottom: 0;
}

.volume-slider {
  width: 120px;
  accent-color: #f59e0b;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #4b5563;
  transition: 0.25s;
  border-radius: 24px;
  border: 1.5px solid #261209;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}
.toggle-switch input:checked + .switch-slider {
  background-color: #22c55e;
}
.toggle-switch input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* Theme Selector Grid */
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.theme-card-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-main);
}
.theme-card-btn .theme-preview-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-bottom: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.theme-card-btn .theme-name {
  font-size: 10px;
  font-weight: 800;
}
.theme-card-btn.active {
  border-color: #fde047;
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.04);
}

.dot-obsidian {
  background: linear-gradient(135deg, #0284c7 0%, #0f172a 100%);
  border: 1px solid #38bdf8;
}
.dot-artisan {
  background: linear-gradient(135deg, #e6b85c 0%, #382417 100%);
  border: 1px solid #ffea9f;
}
.dot-clay {
  background: linear-gradient(135deg, #f43f5e 0%, #8b5cf6 100%);
  border: 1px solid #fbbf24;
}

/* Language Selector */
.lang-selector-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.lang-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid #261209;
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 0 #1f0d04;
}
.lang-btn.active {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 55%, #b45309 100%);
  color: #ffffff;
  border-color: #261209;
  text-shadow: var(--stroke-text-sm);
}

.update-status {
  font-size: 11px;
  font-weight: 800;
  margin-top: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  text-align: center;
}
.update-status.checking { color: #facc15; }
.update-status.latest { color: #4ade80; }
.update-status.available { color: #38bdf8; font-weight: 900; }
.update-status.error { color: #f87171; }

/* Portfolio App List */
.portfolio-app-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 12px;
}

.portfolio-app-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid #261209;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 2px 0 #1f0d04;
  transition: transform 0.15s ease;
}
.portfolio-app-item:active {
  transform: scale(0.97);
}
.portfolio-app-icon {
  font-size: 24px;
  width: 32px;
  text-align: center;
}
.portfolio-app-info {
  flex: 1;
}
.portfolio-app-name {
  font-size: 13px;
  font-weight: 900;
  color: #fde047;
  text-shadow: var(--stroke-text-sm);
}
.portfolio-app-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.portfolio-badge {
  font-size: 10px;
  background: rgba(245, 158, 11, 0.25);
  color: #fde047;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 900;
  border: 1px solid #78350f;
}

/* Achievements Modal List */
.achievements-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 14px;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid #261209;
  box-shadow: 0 2px 0 #1f0d04;
}
.achievement-item.unlocked {
  background: rgba(234, 179, 8, 0.2);
  border-color: #f59e0b;
}
.achievement-item.locked {
  opacity: 0.55;
}
.achievement-item .ach-icon {
  font-size: 24px;
}
.achievement-item .ach-info {
  flex: 1;
}
.achievement-item .ach-title {
  font-size: 13px;
  font-weight: 900;
  color: #fffdf5;
  text-shadow: var(--stroke-text-sm);
}
.achievement-item.unlocked .ach-title {
  color: #fde047;
}
.achievement-item .ach-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Floating Toast Notification */
.achievement-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
  border: 2.5px solid #fde047;
  border-radius: 24px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}
.achievement-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.achievement-toast.hidden {
  display: none;
}
.achievement-toast .toast-title {
  font-size: 13px;
  font-weight: 900;
  color: #fde047;
  text-shadow: var(--stroke-text-sm);
}
