@import url('site-footer.css');

/* Dark theme (default) */
:root,
[data-theme="dark"] {
  --bg: #0e0e13;
  --bg2: #16161f;
  --bg3: #1e1e2a;
  --card: #1a1a26;
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.15);
  --text: #e8e6f0;
  --text2: #9b99b0;
  --text3: #6b6980;
  --accent: #7c6af7;
  --accent2: #a89bff;
  --accent3: #5c4de8;
  --teal: #4ecdc4;
  --coral: #ff6b6b;
  --amber: #ffd166;
  --green: #06d6a0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  --orb1: rgba(124, 106, 247, 0.12);
  --orb2: rgba(78, 205, 196, 0.08);
  --noise-opacity: 0.4;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f5f4fa;
  --bg2: #ffffff;
  --bg3: #ebe9f3;
  --card: #ffffff;
  --border: rgba(20, 18, 40, 0.08);
  --border2: rgba(20, 18, 40, 0.14);
  --text: #1a1830;
  --text2: #5c5970;
  --text3: #8a879c;
  --accent: #6b58e8;
  --accent2: #5546c9;
  --accent3: #4a3db8;
  --teal: #2ba89f;
  --shadow: 0 12px 40px rgba(80, 70, 140, 0.12);
  --orb1: rgba(124, 106, 247, 0.1);
  --orb2: rgba(78, 205, 196, 0.12);
  --noise-opacity: 0.25;
}

[data-theme="light"] .noise {
  opacity: var(--noise-opacity);
}

[data-theme="light"] .test-card.featured {
  background: linear-gradient(160deg, rgba(124, 106, 247, 0.08) 0%, var(--card) 50%);
}

/* Settings toolbar */
.mbti-settings-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mbti-settings-bar select,
.mbti-settings-bar button {
  font-family: inherit;
  font-size: 13px;
  border-radius: 100px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text2);
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.mbti-settings-bar select:hover,
.mbti-settings-bar button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.mbti-settings-bar .mbti-theme-toggle {
  min-width: 42px;
  font-size: 16px;
  line-height: 1;
  padding: 8px 12px;
}

header.mbti-header-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand settings"
    "sub sub";
  align-items: center;
  gap: 12px 16px;
  padding: 20px 0 16px;
  width: 100%;
}

header.mbti-header-row > .logo,
header.mbti-header-row .site-brand {
  grid-area: brand;
  justify-self: start;
  align-self: start;
  text-decoration: none;
}

header.mbti-header-row #mbtiSettings {
  grid-area: settings;
  justify-self: end;
  align-self: start;
}

header.mbti-header-row .header-sub,
header.mbti-header-row .header-left {
  grid-area: sub;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

header.mbti-header-row .header-sub--hidden {
  display: none;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text3);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg2);
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.page-back:hover {
  color: var(--text);
  border-color: rgba(124, 106, 247, 0.4);
}

/* Share bar */
.home-share-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 40px;
}
.page-bottom-share {
  width: 100%;
  max-width: 880px;
  margin: 48px auto 32px;
  padding: 32px 20px 0;
  border-top: 1px solid var(--border);
}
.page-bottom-share .mbti-share-block {
  max-width: 640px;
  margin: 0 auto;
}
.famous-intro {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.6;
  margin: 0 0 8px;
  max-width: 640px;
}
.famous-lang-hint {
  font-size: 12px;
  color: var(--accent2);
  margin: 0 0 20px;
  padding: 10px 14px;
  background: rgba(124, 106, 247, 0.1);
  border-radius: 8px;
  line-height: 1.55;
  max-width: 640px;
}
.famous-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--teal);
  margin: 20px 0 12px;
}
.famous-subtitle:first-of-type {
  margin-top: 8px;
}
.traits-section {
  margin: 40px 0;
}
.famous-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.result-type-nickname {
  text-align: center;
  font-size: 14px;
  color: var(--accent2);
  margin: 8px auto 16px;
  max-width: 560px;
  padding: 8px 14px;
  background: rgba(124, 106, 247, 0.1);
  border-radius: 8px;
  line-height: 1.5;
}
.mbti-share-block {
  text-align: center;
  padding: 20px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mbti-share-label {
  font-size: 13px;
  color: var(--text3);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.mbti-share-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.mbti-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 100px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text2);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.mbti-share-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(124, 106, 247, 0.12);
}
.mbti-share-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  background: rgba(124, 106, 247, 0.2);
  color: var(--accent2);
}
.mbti-share-btn--facebook .mbti-share-btn-icon { background: rgba(24, 119, 242, 0.2); color: #4a9eff; }
.mbti-share-btn--x .mbti-share-btn-icon { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.mbti-share-btn--email .mbti-share-btn-icon { background: rgba(78, 205, 196, 0.15); color: var(--teal); }
.mbti-share-btn--wechat .mbti-share-btn-icon { background: rgba(7, 193, 96, 0.15); color: #2ecc71; }
.mbti-share-extra {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.mbti-share-action {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid rgba(124, 106, 247, 0.35);
  background: rgba(124, 106, 247, 0.15);
  color: var(--accent2);
  cursor: pointer;
  transition: background 0.2s;
}
.mbti-share-action:hover {
  background: rgba(124, 106, 247, 0.28);
}

/* Toast (home + shared) */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: 12px 24px;
  font-size: 14px;
  color: var(--text2);
  transition: transform 0.4s ease;
  z-index: 10000;
  pointer-events: none;
  max-width: min(92vw, 420px);
  text-align: center;
  line-height: 1.5;
  box-shadow: var(--shadow);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
