/* ================================================
   Interactive Wordsearch — style.css
   ================================================ */

/* ── Design tokens (dark mode defaults) ── */
:root {
  /* Timing */
  --ticker-duration: 20s;

  /* Typography */
  --ws-cell-font-size:   22px;
  --ws-label-font-size:  18px;
  --ws-ticker-font-size: 17px;

  /* Highlight (found-word accent) — overridden by color-picker */
  --ws-highlight:      #00ba7c;
  --ws-highlight-bg:   #00ba7c;

  /* Page / surface colors — overridden by light mode */
  --ws-bg-page:      #15202b;
  --ws-text:         #ffffff;
  --ws-bg-surface:   #1e2d3d;
  --ws-bg-input:     #0f1620;
  --ws-border:       #2a3d52;
  --ws-bg-alt:       #243344;
  --ws-text-dim:     #4a5a6a;
  --ws-text-accent:  #7ab8d4;
  --ws-shuffle-hi:   #2a3f55;
}

/* ── Light mode token overrides ── */
body.ws-light {
  --ws-bg-page:      #f8f4ed;
  --ws-text:         #2d2020;
  --ws-bg-surface:   #e2dbd3;
  --ws-bg-input:     #ede8e1;
  --ws-border:       #bfb7af;
  --ws-bg-alt:       #d6d0c8;
  --ws-text-dim:     #8a7a6a;
  --ws-text-accent:  #5a7888;
  --ws-shuffle-hi:   #c8c2ba;
}

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

body {
  font-family: 'Nunito', sans-serif;
  background: var(--ws-bg-page);
  color: var(--ws-text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 60px 12px 32px;
  transition: background 0.3s, color 0.3s;
}

.container {
  width: 100%;
  max-width: 700px;
}

/* ── Header ── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  position: relative;
}
.title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.title {
  font-size: 30px;
  font-weight: bold;
  color: var(--ws-text);
  letter-spacing: 0;
}
.interactive-logo {
  width: 28px;
  height: 28px;
  margin-left: 8px;
}
.menu-button {
  background: none;
  border: none;
  color: var(--ws-text);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  position: absolute;
  right: 0;
  line-height: 1;
}
.menu-button:hover { color: var(--ws-text); }

/* ── Input + last guess row ── */
.input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  height: 46px;
  margin-bottom: 10px;
}
.input-container { flex: 1; min-width: 0; }
.word-input {
  width: 100%;
  height: 100%;
  padding: 10px 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  background: var(--ws-bg-input);
  border: none;
  border-radius: 0;
  color: var(--ws-text);
  outline: none;
  transition: background 0.3s, color 0.3s;
}
.word-input::placeholder { color: var(--ws-text-dim); }
.word-input:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Last guess bar ── */
.last-guess {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  border-radius: 0;
  min-height: 46px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  background: var(--ws-bg-surface);
  color: var(--ws-text);
  transition: background 0.3s, color 0.3s;
}
.last-guess.show { display: flex; }
.lg-word    { font-weight: 900; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-attrib  { display: flex; align-items: stretch; gap: 6px; flex-shrink: 0; align-self: stretch; }
.lg-avatar  { width: 46px; height: 46px; flex-shrink: 0; object-fit: cover; border-radius: 0; display: block; }
.lg-name    { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 24ch; align-self: center; }

/* ── Status messages ── */
.status-msg {
  text-align: center;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ws-text);
}
.error-msg {
  text-align: center;
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #e74c3c;
  background: #3a0f0f;
  border-radius: 8px;
  margin-bottom: 10px;
  display: none;
}
body.ws-light .error-msg { background: #fde8e8; }

.win-banner {
  display: none;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--ws-text);
  padding: 14px;
  background: var(--ws-highlight-bg);
  border-radius: 10px;
  margin-bottom: 12px;
  border: 2px solid var(--ws-highlight);
}
.win-banner.show { display: block; }

/* ── Wordsearch grid ── */
.ws-grid-wrapper { margin: 10px 0; }
.ws-grid {
  display: grid;
  grid-template-columns: 1.6em repeat(var(--ws-grid-size, 15), 1fr);
  gap: 2px;
  width: 100%;
}
.ws-coord {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ws-label-font-size);
  font-weight: 700;
  color: var(--ws-text-accent);
  background: transparent;
  user-select: none;
  opacity: 0.75;
  letter-spacing: 0.02em;
}
.ws-corner,
.ws-col-label {
  aspect-ratio: unset;
  height: 30px;
  margin-top: 5px;
}
.ws-row-label { aspect-ratio: unset; align-self: stretch; }
.ws-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ws-cell-font-size);
  font-weight: 800;
  background: var(--ws-bg-surface);
  color: var(--ws-text);
  border-radius: 0;
  user-select: none;
  position: relative;
  overflow: hidden;
  transition: background 0.35s, color 0.35s, transform 0.15s;
}
.ws-cell.ws-preceding {
  background: var(--ws-bg-surface);
  color: var(--ws-text);
}
.ws-cell.ws-found {
  background: var(--ws-highlight-bg);
  color: var(--ws-text);
}
.ws-cell.ws-avatar-cell {
  background: var(--ws-highlight);
  padding: 0;
}
.ws-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}
@keyframes cellPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.2); background: var(--ws-highlight); }
  100% { transform: scale(1); }
}
.ws-cell.popping { animation: cellPop 0.35s ease forwards; }

/* ── Shuffle effect ── */
@keyframes cellShufflePulse {
  0%, 100% { background: var(--ws-bg-surface); }
  50%       { background: var(--ws-shuffle-hi); }
}
.ws-cell.ws-shuffling {
  animation: cellShufflePulse 0.16s linear infinite;
  color: var(--ws-text-accent);
}

/* ── Word list panel ── */
.word-list-section { margin-bottom: 10px; }
.word-list-header {
  position: relative;
  height: 28px;
  margin-bottom: 6px;
}
.wl-slot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--ws-text);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.wl-slot.active { opacity: 1; }
.word-list-track {
  overflow: hidden;
  width: 100%;
  position: relative;
}
.word-list-track::before,
.word-list-track::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 32px;
  z-index: 2;
  pointer-events: none;
}
.word-list-track::before {
  left: 0;
  background: linear-gradient(to right, var(--ws-bg-page), transparent);
}
.word-list-track::after {
  right: 0;
  background: linear-gradient(to left, var(--ws-bg-page), transparent);
}
.word-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  animation: tickerScroll var(--ticker-duration) linear infinite;
}
.word-list:hover { animation-play-state: paused; }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.word-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  height: 53px;
  background: var(--ws-bg-surface);
  border: 1px solid var(--ws-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ws-text);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
  white-space: nowrap;
}
.word-item.found {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--ws-highlight-bg);
  border-color: var(--ws-highlight);
  color: var(--ws-text);
  padding: 5px 10px;
}
.word-item .wi-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.word-item:not(.found) .wi-text {
  font-size: var(--ws-ticker-font-size);
  font-weight: 800;
}
.word-item.ws-blurred .wi-text {
  filter: blur(6px);
  user-select: none;
}
.word-item.found .wi-text {
  text-decoration: line-through;
  text-decoration-color: var(--ws-highlight);
  text-decoration-thickness: 3px;
}
.wi-user {
  display: flex;
  align-items: center;
  gap: 5px;
}
.wi-avatar {
  width: 18px;
  height: 18px;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
}
.wi-username {
  font-size: 11px;
  font-weight: 700;
  color: var(--ws-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* ================================================
   Winning Overlay
   ================================================ */
.winning-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.winning-overlay.show {
  opacity: 1;
  visibility: visible;
}
.winning-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--ws-bg-surface);
  border: 1px solid var(--ws-border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  max-width: 420px;
  width: 92%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.winning-modal * { font-family: 'Nunito', sans-serif; }
.winning-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--ws-text);
  margin-bottom: 14px;
}
.single-winner { display: flex; justify-content: center; margin-bottom: 12px; }
.winner-photo  { width: 150px; height: 150px; border-radius: 0; object-fit: cover; border: 3px solid var(--ws-highlight); }
.multiple-winners { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.multi-winner { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.multi-winner-photo { width: 66px; height: 66px; border-radius: 0; object-fit: cover; border: 2px solid var(--ws-highlight); }
.winning-site {
  font-size: 20px;
  font-weight: 600;
  color: #f7be57;
  background-color: #6b6562;
  opacity: 0.9;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 5px;
  margin: 12px auto 6px auto;
}

/* ================================================
   Instruction Popup
   ================================================ */
.instruction-popup {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 350px;
  z-index: 999;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
}
.instruction-popup.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.instruction-popup-content {
  background: var(--ws-bg-surface);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  border: 2px solid var(--ws-highlight);
  border-top-width: 4px;
}
.instruction-popup-text {
  color: var(--ws-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 15px;
}
.instruction-popup-gif {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
}

/* ================================================
   Settings Panel  (intentionally stays dark)
   ================================================ */
.settings-panel {
  position: fixed;
  font-family: 'Nunito', sans-serif;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background-color: #1c1c1c;
  box-shadow: -2px 0 10px rgba(0,0,0,0.3);
  z-index: 800;
  overflow-y: auto;
  transition: right 0.3s ease;
}
.settings-panel.open { right: 0; }

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #3a3a3c;
  position: sticky;
  top: 0;
  background: #1c1c1c;
  z-index: 1;
}
.settings-header h2 { color: #ffffff; font-size: 20px; margin: 0; }

.close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.close-btn:hover { background-color: #3a3a3c; }

.settings-section { border-bottom: 1px solid #3a3a3c; }

.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.settings-section-header:hover { background-color: #2a2a2c; }
.settings-section-header h3 { margin: 0; color: #ffffff; font-size: 16px; }

.arrow { color: #ffffff; transition: transform 0.2s ease; }
.settings-section-header.collapsed .arrow { transform: rotate(0deg); }
.settings-section-header:not(.collapsed) .arrow { transform: rotate(180deg); }

.settings-section-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.settings-section-header:not(.collapsed) + .settings-section-content {
  padding: 15px 20px;
  max-height: none;
}

.settings-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background-color: #1c1c1c;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 700;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: background-color 0.2s, transform 0.2s;
}
.settings-toggle:hover { background-color: #2a2a2c; transform: scale(1.1); }
.settings-toggle svg { width: 22px; height: 22px; }

.setting-item {
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.setting-item label { color: #ffffff; font-size: 14px; flex: 1; }

.setting-select {
  background-color: #2a2a2c;
  color: #ffffff;
  border: 1px solid #3a3a3c;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.setting-select:focus { outline: none; border-color: #27ae60; }

.number-input-container {
  display: flex;
  align-items: center;
  background-color: #2a2a2c;
  border: 1px solid #3a3a3c;
  border-radius: 4px;
  overflow: hidden;
}
.number-input-btn {
  background-color: #3a3a3c;
  color: #ffffff;
  border: none;
  width: 30px; height: 30px;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.number-input-btn:hover { background-color: #4a4a4c; }

.setting-input {
  background-color: #2a2a2c;
  color: #ffffff;
  border: none;
  width: 50px; height: 30px;
  text-align: center;
  font-size: 13px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.setting-input::-webkit-outer-spin-button,
.setting-input::-webkit-inner-spin-button { appearance: none; -webkit-appearance: none; margin: 0; }

.setting-input-wide {
  background-color: #2a2a2c;
  color: #ffffff;
  border: 1px solid #3a3a3c;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Nunito', sans-serif;
}
.setting-input-wide:focus { outline: none; border-color: #27ae60; }
.setting-input-wide::placeholder { color: #5a6a7a; }

.setting-checkbox {
  width: 18px; height: 18px;
  accent-color: #27ae60;
  cursor: pointer;
}

.setting-textarea {
  background-color: #2a2a2c;
  color: #ffffff;
  border: 1px solid #3a3a3c;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Nunito', sans-serif;
  resize: vertical;
}

.setting-hint {
  font-size: 11px;
  color: #7a9aaa;
  margin-top: 2px;
  width: 100%;
}

.answers-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.answer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #2a2a2c;
  border: 1px solid #3a3a3c;
  border-radius: 4px;
  padding: 6px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}
.answer-item.found {
  border-color: var(--ws-highlight);
}
.answer-word {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.answer-coord {
  flex-shrink: 0;
  color: #7a9aaa;
  font-weight: 900;
}
.answers-empty {
  color: #7a9aaa;
  font-size: 12px;
  font-weight: 700;
}

.test-btn {
  background-color: #27ae60;
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
}
.test-btn:hover { background-color: #219a52; }
.test-btn.danger { background-color: #c0392b; }
.test-btn.danger:hover { background-color: #a93226; }

/* Pill-toggle group (word count, language, etc.) */
.pill-group { display: flex; gap: 4px; flex-wrap: wrap; }
.pill-btn {
  background: #2a3a4a;
  color: #ffffff;
  border: 1px solid #3a4d5c;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: background 0.2s, border-color 0.2s;
}
.pill-btn.active {
  background: #27ae60;
  border-color: #27ae60;
}
.pill-btn:hover:not(.active) { background: #3a4d5c; }

/* Highlight color pills — show a small color dot before the label */
.ws-highlight-pill::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pill-accent, #27ae60);
  margin-right: 5px;
  vertical-align: middle;
}

/* Alternating (gradient) highlight pill */
.ws-highlight-pill[data-id="alternating"] {
  background: linear-gradient(90deg, #00ba7c 0%, #f91880 50%, #ef7d31 100%);
  border-color: transparent;
  color: #fff;
}
.ws-highlight-pill[data-id="alternating"].active {
  background: linear-gradient(90deg, #00ba7c 0%, #f91880 50%, #ef7d31 100%);
  outline: 2px solid #fff;
  outline-offset: 1px;
}
.ws-highlight-pill[data-id="alternating"]::before {
  background: linear-gradient(90deg, #00ba7c, #f91880, #ef7d31);
}

/* Slider (grid size, text sizes) */
.setting-slider {
  width: 100%;
  accent-color: #27ae60;
  cursor: pointer;
}
.slider-label {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  min-width: 40px;
  text-align: right;
}

/* Simulate input row */
.simulate-row {
  display: flex;
  gap: 6px;
  width: 100%;
}
.simulate-row input {
  flex: 1;
  background: #2a2a2c;
  color: #fff;
  border: 1px solid #3a3a3c;
  padding: 7px 10px;
  border-radius: 4px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
}
.simulate-row input:focus { outline: none; border-color: #27ae60; }

/* ================================================
   Floating Leaderboard
   ================================================ */
.floating-leaderboard {
  position: fixed;
  top: 20px; left: 20px;
  width: 280px;
  background: var(--ws-bg-surface);
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 600;
  user-select: none;
  transition: background 0.3s, border-color 0.3s;
}
.floating-leaderboard.opacity-50 { opacity: 0.7; }

.floating-leaderboard-header {
  background: var(--ws-bg-alt);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid var(--ws-border);
  color: var(--ws-text);
  cursor: move;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.3s, color 0.3s;
}

.leaderboard-controls { display: flex; align-items: center; gap: 4px; }

.leaderboard-nav-btn,
.floating-leaderboard-toggle {
  background: none;
  border: none;
  color: var(--ws-text);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
}
.leaderboard-nav-btn:hover,
.floating-leaderboard-toggle:hover { background: var(--ws-border); }
.leaderboard-nav-btn:disabled { opacity: 0.3; cursor: default; }

.leaderboard-page-info { font-size: 15px; color: var(--ws-text-accent); min-width: 28px; text-align: center; }

.floating-leaderboard-body {
  padding: 8px;
  max-height: 290px;
  overflow-y: auto;
  display: block;
}
.floating-leaderboard-body.collapsed { display: none; }

.leaderboard-height-toggle {
  position: sticky;
  bottom: 0;
  width: 100%;
  background: var(--ws-bg-surface);
  border: none;
  cursor: pointer;
  color: var(--ws-text-accent);
  font-size: 12px;
  padding: 4px;
  text-align: center;
}

.leaderboard-list { display: flex; flex-direction: column; gap: 2px; }

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ws-bg-alt);
  border-radius: 4px;
  padding: 5px 8px;
  height: 34px;
  transition: background 0.3s;
}
.leaderboard-user { display: flex; align-items: center; gap: 6px; min-width: 0; }
.leaderboard-rank { font-size: 0.8rem; color: var(--ws-text-accent); font-weight: 600; min-width: 18px; text-align: right; flex-shrink: 0; }
.leaderboard-img  { width: 30px; height: 30px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.leaderboard-username { font-size: 16px; color: var(--ws-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.leaderboard-points { font-size: 16px; font-weight: 600; color: var(--ws-text); flex-shrink: 0; }
.leaderboard-empty { color: var(--ws-text-dim); font-size: 0.8rem; text-align: center; padding: 20px; font-style: italic; }

/* =============================== */
/* Tutorial                         */
/* =============================== */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 9000;
  pointer-events: none;
}

.tutorial-spotlight {
  position: absolute;
  border: 3px solid #4CAF50;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.85);
  z-index: 9001;
  pointer-events: none;
  animation: tutorialSpotlightPulse 2s infinite;
}

@keyframes tutorialSpotlightPulse {
  0%, 100% {
    border-color: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.85);
  }
  50% {
    border-color: #66BB6A;
    box-shadow: 0 0 30px rgba(102, 187, 106, 1);
  }
}

.tutorial-header-modal,
.tutorial-tooltip {
  background: #ffffff;
  color: #423232;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 9002;
  pointer-events: auto;
  font-family: 'Nunito', sans-serif;
}

.tutorial-header-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  animation: tutorialSlideIn 0.3s ease-out;
}

@keyframes tutorialSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.tutorial-tooltip {
  position: absolute;
  border-radius: 8px;
  min-width: 260px;
  max-width: 420px;
  animation: tutorialFadeIn 0.3s ease-out;
}

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

.tutorial-header-content,
.tutorial-tooltip-content {
  padding: 30px 30px 54px;
  position: relative;
}

.tutorial-tooltip-content {
  padding: 20px 20px 48px;
}

.tutorial-header-content h2 {
  color: #423232;
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 15px;
  text-align: center;
}

.tutorial-header-content p,
.tutorial-tooltip-content p {
  color: #666;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 25px;
  text-align: center;
}

.tutorial-tooltip-content p {
  color: #423232;
  font-size: 15px;
  margin-bottom: 20px;
  text-align: left;
}

.tutorial-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.tutorial-btn {
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 24px;
  transition: all 0.2s ease;
}

.tutorial-btn-primary {
  background: #4CAF50;
  color: #ffffff;
}

.tutorial-btn-primary:hover {
  background: #45a049;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
  transform: translateY(-1px);
}

.tutorial-btn-secondary {
  background: #e0e0e0;
  color: #423232;
}

.tutorial-btn-secondary:hover {
  background: #d0d0d0;
  transform: translateY(-1px);
}

.tutorial-language-toggle {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  position: absolute;
  bottom: 14px;
  right: 16px;
}

.tutorial-lang-btn {
  background: #f1f1f1;
  border: 1px solid #d4d4d4;
  border-radius: 999px;
  color: #423232;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 6px 8px;
}

.tutorial-lang-btn.active {
  background: #4CAF50;
  border-color: #4CAF50;
  color: #ffffff;
}
