/* Shared visual language for all 4 tutorial/help systems: the first-time
   walkthrough (tutorial.js), game mode cards (mode-cards.js), feature
   tooltips (help-tooltips.js), and the battle pass tutorial
   (battlepass-tutorial.js). Every color is a var(--x) token from main.css so
   these adapt across the dark/midnight/light theme system - never hardcode
   a hex value here. */

/* ---- first-time tutorial: spotlight overlay ------------------------------ */

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: all;
}

.tutorial-spotlight {
  position: absolute;
  border-radius: 12px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.82),
    0 0 0 3px var(--accent),
    0 0 20px var(--glow-teal, rgba(0, 200, 150, 0.5));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  display: none;
}

.tutorial-card {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 16px;
  padding: 24px;
  width: 320px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px var(--glow-teal, rgba(0, 200, 150, 0.1));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

.tutorial-step-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tutorial-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.3;
}

.tutorial-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 20px;
  white-space: pre-line;
}

.tutorial-tip {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 20px;
}

.tutorial-tip::before {
  content: '💡 ';
}

.tutorial-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tutorial-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tutorial-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong, var(--border));
  transition: all 0.2s;
}

.tutorial-dot.active {
  width: 20px;
  border-radius: 3px;
  background: var(--accent);
}

.tutorial-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-tutorial-skip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}
.btn-tutorial-skip:hover { color: var(--text); border-color: var(--border-strong, var(--border)); }

.btn-tutorial-next {
  background: linear-gradient(135deg, var(--accent), var(--accent-teal-dark, var(--accent)));
  border: none;
  color: var(--btn-primary-text, #000);
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}

.tutorial-logo-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  transform: scale(0.7);
  transform-origin: center;
}

/* ---- game mode cards ------------------------------------------------------ */

.mode-card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mode-card-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mode-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--border-subtle, var(--border));
  flex-shrink: 0;
}

.mode-card-icon { font-size: 40px; flex-shrink: 0; }
.mode-card-name { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.mode-card-tagline { font-size: 13px; color: var(--text-secondary); margin: 0; }

.mode-card-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  flex-shrink: 0;
}

.mode-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle, var(--border));
  flex-shrink: 0;
}
.mode-stat { padding: 14px 16px; background: var(--surface); }
.mode-stat-label { font-size: 10px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.mode-stat-value { font-size: 13px; font-weight: 600; color: var(--text); font-family: var(--mono); }

.mode-card-content { padding: 24px; overflow-y: auto; flex: 1; }
.mode-section { margin-bottom: 20px; }
.mode-section-title { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 8px; }
.mode-section-body { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; white-space: pre-line; }

.mode-tips { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-subtle, var(--border)); }
.mode-tip-item { display: flex; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--text-secondary); align-items: flex-start; }
.mode-tip-bullet { flex-shrink: 0; margin-top: 1px; }

.mode-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle, var(--border));
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.btn-mode-learn-more {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
}
.btn-mode-play {
  border: none;
  color: var(--btn-primary-text, #000);
  font-weight: 700;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
}

@media (max-width: 600px) {
  .mode-card-overlay { padding: 0; }
  .mode-card-modal { max-width: 100%; max-height: 100%; height: 100%; border-radius: 0; }
  .mode-stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---- feature tooltips ("?" buttons) --------------------------------------- */

.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--overlay-medium, rgba(255, 255, 255, 0.1));
  border: 1px solid var(--border-strong, var(--border));
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  font-family: var(--font);
  line-height: 1;
}
.help-btn:hover {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
}

.help-tooltip {
  position: fixed;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 10px;
  padding: 14px 16px;
  max-width: 280px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: 9997;
}
.help-tooltip-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.help-tooltip-body { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* ---- battle pass tutorial -------------------------------------------------- */

.bp-tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.bp-tutorial-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 28px;
  text-align: center;
}
.bp-tutorial-icon { font-size: 40px; margin-bottom: 12px; }
.bp-tutorial-step-label { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 10px; }
.bp-tutorial-title { font-size: 20px; font-weight: 800; margin: 0 0 12px; }
.bp-tutorial-body { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 20px; text-align: left; }
.bp-tutorial-visual {
  background: var(--surface-2, var(--bg));
  border: 1px solid var(--border-subtle, var(--border));
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.bp-tutorial-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 20px; }
.bp-tutorial-footer { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---- shared skip confirm modal --------------------------------------------- */

.tutorial-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tutorial-confirm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  max-width: 360px;
  text-align: center;
}
.tutorial-confirm-box p { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin: 8px 0 18px; }
.tutorial-confirm-actions { display: flex; gap: 10px; justify-content: center; }
