/* TileForge Studio — Welcome Screen */

.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  backdrop-filter: blur(6px);
}

.welcome-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 40px;
  width: 520px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.welcome-header {
  text-align: center;
  margin-bottom: 20px;
}

.welcome-logo {
  height: 72px;
  width: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(212, 160, 74, 0.4));
}

.welcome-title {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 700;
  color: #d4a04a;
  margin: 0;
  letter-spacing: 0.5px;
}

.welcome-subtitle {
  font-size: 13px;
  color: #9a9aab;
  margin: 6px 0 0;
}

/* Feature highlights */
.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg-dark);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.welcome-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
}

.welcome-feature-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: -1px;
}

.welcome-feature strong {
  color: #f2e9dd;
}

.welcome-feature span {
  color: #9a9aab;
  font-size: 11px;
}

/* Quick actions */
.welcome-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.welcome-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  color: var(--text);
  font-family: var(--font);
}

.welcome-action:hover {
  border-color: #d4a04a;
  background: rgba(212, 160, 74, 0.08);
}

.welcome-action:active {
  transform: scale(0.98);
}

.welcome-action-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

.welcome-action-desc {
  font-size: 10px;
  color: #9a9aab;
  line-height: 1.4;
}

/* Account pitch section */
.welcome-account {
  padding: 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.08), rgba(59, 168, 255, 0.06));
  border: 1px solid rgba(212, 160, 74, 0.2);
  border-radius: 8px;
  text-align: center;
}

.welcome-account-header {
  font-size: 14px;
  color: #f2e9dd;
  margin-bottom: 10px;
}

.welcome-account-header strong {
  color: #d4a04a;
}

.welcome-account-perks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.welcome-perk {
  font-size: 12px;
  color: #9a9aab;
  text-align: left;
  padding-left: 4px;
}

.welcome-account-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}

.welcome-back {
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.08), rgba(59, 168, 255, 0.06));
  border-color: rgba(63, 185, 80, 0.2);
}

.welcome-back .welcome-account-header strong {
  color: var(--success);
}

/* Buttons */
.btn-gold {
  padding: 8px 24px;
  background: linear-gradient(135deg, #d4a04a, #b8862e);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #e8c47a, #d4a04a);
  box-shadow: 0 2px 12px rgba(212, 160, 74, 0.3);
}

.btn-outline {
  padding: 8px 24px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}

.btn-outline:hover {
  border-color: var(--text-dim);
  background: var(--bg-panel-alt);
}

.btn-text {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: #9a9aab;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font);
  transition: color 0.15s;
  display: block;
  margin: 4px auto 0;
}

.btn-text:hover {
  color: var(--text);
}

/* Keyboard hints */
.welcome-hints {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.welcome-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}

.welcome-hint kbd {
  display: inline-block;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  margin: 0 1px;
}

/* Footer */
.welcome-footer {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.welcome-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.welcome-footer a:hover {
  color: #d4a04a;
}

/* Context menu */
.context-menu {
  position: fixed;
  z-index: 2000;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 0;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
}

/* Resize map anchor grid */
.anchor-grid {
  display: grid;
  grid-template-columns: repeat(3, 24px);
  gap: 3px;
  margin-top: 4px;
}

.anchor-btn {
  width: 24px;
  height: 24px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
}

.anchor-btn:hover {
  border-color: var(--accent);
}

.anchor-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---- Tutorial Walkthrough ---- */

.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 8999;
  backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}

.tutorial-tooltip {
  position: fixed;
  z-index: 9002;
  background: var(--bg-panel);
  border: 1px solid rgba(212, 160, 74, 0.4);
  border-radius: 12px;
  padding: 24px 28px 20px;
  width: 380px;
  max-width: 90vw;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 160, 74, 0.1);
  opacity: 0;
  transition: opacity 0.25s ease, top 0.3s ease, left 0.3s ease;
  pointer-events: auto;
}

.tutorial-tooltip.visible {
  opacity: 1;
}

.tutorial-step-counter {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #d4a04a;
  margin-bottom: 8px;
}

.tutorial-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  color: #f2e9dd;
  margin-bottom: 8px;
}

.tutorial-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #9a9aab;
  margin-bottom: 20px;
}

.tutorial-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.tutorial-btn-back {
  padding: 7px 18px;
  font-size: 12px;
}

.tutorial-btn-next {
  padding: 7px 22px;
  font-size: 12px;
  flex: 1;
}

.tutorial-btn-skip {
  text-align: center;
  font-size: 11px;
  padding: 4px 0;
  display: block;
  width: 100%;
}

/* Arrow pointers */
.tutorial-arrow {
  position: absolute;
  width: 0;
  height: 0;
}

.tutorial-arrow-top {
  top: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(212, 160, 74, 0.4);
}

.tutorial-arrow-bottom {
  bottom: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(212, 160, 74, 0.4);
}

.tutorial-arrow-left {
  left: -8px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid rgba(212, 160, 74, 0.4);
}

.tutorial-arrow-right {
  right: -8px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid rgba(212, 160, 74, 0.4);
}
