/* ============================================================
   FANZONE-WHOAMI.CSS — "Who Am I?" progressive-clue guessing game
   Visual identity: Purple accent (#a855f7), mystery/card aesthetic
   Dark theme matching Fan Zone simulator style
   ============================================================ */

/* ─── SETUP SCREEN ─── */
.fz-wai-setup {
  max-width: 640px;
  margin: 0 auto;
}

.fz-wai-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm, 0.75rem);
  margin: var(--space-md, 1rem) 0 var(--space-lg, 1.5rem);
}

@media (max-width: 640px) {
  .fz-wai-mode-grid {
    grid-template-columns: 1fr;
  }
}

.fz-wai-mode-btn {
  background: var(--ink-2, #121a30);
  border: 2px solid var(--ink-line, #2a3a5c);
  border-radius: 12px;
  padding: var(--space-md, 1rem);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: inherit;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.fz-wai-mode-btn:hover {
  border-color: var(--page-accent, #a855f7);
  background: var(--ink-3, #1a2540);
  transform: translateY(-1px);
}

.fz-wai-mode-btn.selected {
  border-color: var(--page-accent, #a855f7);
  background: var(--page-accent-soft, rgba(168, 85, 247, 0.15));
  box-shadow: 0 0 0 1px var(--page-accent, #a855f7);
}

.fz-wai-mode-btn:active {
  transform: scale(0.96);
}

.fz-wai-mode-btn .fz-wai-mode-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-text, #eef1fb);
}

.fz-wai-mode-btn.selected .fz-wai-mode-name {
  color: var(--page-accent, #a855f7);
}

.fz-wai-mode-btn .fz-wai-mode-desc {
  display: block;
  font-size: 11px;
  color: var(--ink-muted, #8a9bb8);
  font-weight: 400;
}

/* ─── GAME SCREEN ─── */
.fz-wai-game {
  max-width: 640px;
  margin: 0 auto;
}

.fz-wai-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md, 1rem);
  font-size: 0.85rem;
}

.fz-wai-progress-text {
  color: var(--ink-muted, #8a9bb8);
  font-weight: 600;
}

.fz-wai-progress-dots {
  display: flex;
  gap: 4px;
}

.fz-wai-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-line, #2a3a5c);
  transition: background 0.2s;
}

.fz-wai-progress-dot.active {
  background: var(--page-accent, #a855f7);
}

.fz-wai-progress-dot.correct {
  background: #22c55e;
}

.fz-wai-progress-dot.wrong {
  background: #ef4444;
}

/* ─── MYSTERY CARD ─── */
.fz-wai-mystery-card {
  background: linear-gradient(
    135deg,
    var(--ink-2, #121a30) 0%,
    var(--ink-3, #1a2540) 100%
  );
  border: 2px solid var(--ink-line, #2a3a5c);
  border-radius: 16px;
  padding: var(--space-lg, 1.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md, 1rem);
  transition:
    border-color 0.4s,
    box-shadow 0.4s;
}

.fz-wai-mystery-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--page-accent, #a855f7),
    transparent
  );
  opacity: 0.6;
}

.fz-wai-mystery-card.revealed {
  border-color: var(--page-accent, #a855f7);
  box-shadow: 0 0 24px var(--page-accent-soft, rgba(168, 85, 247, 0.2));
}

.fz-wai-mystery-silhouette {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--ink-3, #1a2540),
    var(--ink-line, #2a3a5c)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink-line, #2a3a5c);
  transition: border-color 0.4s;
}

.fz-wai-mystery-card.revealed .fz-wai-mystery-silhouette {
  border-color: var(--page-accent, #a855f7);
}

.fz-wai-mystery-silhouette img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: blur(8px) grayscale(100%);
  opacity: 0.6;
  transition:
    filter 0.6s,
    opacity 0.6s;
}

.fz-wai-mystery-silhouette.revealed img {
  filter: none;
  opacity: 1;
  animation: revealImage 0.6s ease-out;
}

@keyframes revealImage {
  0% {
    filter: blur(8px) grayscale(100%);
    opacity: 0.6;
  }
  100% {
    filter: none;
    opacity: 1;
  }
}

.fz-wai-mystery-silhouette .fz-wai-placeholder {
  font-size: 2.5rem;
  color: var(--ink-muted, #8a9bb8);
  opacity: 0.5;
  font-weight: 300;
}

.fz-wai-mystery-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink-text, #eef1fb);
}

.fz-wai-mystery-name.hidden {
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  color: var(--ink-muted, #8a9bb8);
}

/* ─── CLUES LIST ─── */
.fz-wai-clues {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs, 0.5rem);
  margin: var(--space-md, 1rem) 0;
}

.fz-wai-clue {
  background: var(--ink-2, #121a30);
  border-left: 3px solid var(--page-accent, #a855f7);
  border-radius: 0 8px 8px 0;
  padding: var(--space-sm, 0.75rem) var(--space-md, 1rem);
  font-size: 0.95rem;
  color: var(--ink-text, #eef1fb);
  opacity: 0;
  transform: translateX(-10px);
  animation: clueReveal 0.4s ease-out forwards;
}

@keyframes clueReveal {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fz-wai-clue-number {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background: var(--page-accent, #a855f7);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
}

.fz-wai-clue-text {
  display: inline;
}

.fz-wai-clue.hidden {
  border-left-color: var(--ink-line, #2a3a5c);
  color: var(--ink-muted, #8a9bb8);
}

.fz-wai-clue.hidden .fz-wai-clue-text {
  color: var(--ink-muted, #8a9bb8);
}

/* ─── ANSWER INPUT ─── */
.fz-wai-guess-area {
  margin: var(--space-lg, 1.5rem) 0;
}

.fz-wai-guess-input {
  width: 100%;
  padding: var(--space-sm, 0.75rem) var(--space-md, 1rem);
  border: 2px solid var(--ink-line, #2a3a5c);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--ink-2, #121a30);
  color: var(--ink-text, #eef1fb);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.fz-wai-guess-input::placeholder {
  color: var(--ink-muted, #8a9bb8);
  opacity: 0.6;
}

.fz-wai-guess-input:focus {
  outline: none;
  border-color: var(--page-accent, #a855f7);
  box-shadow: 0 0 0 3px var(--page-accent-soft, rgba(168, 85, 247, 0.15));
}

.fz-wai-guess-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--ink, #0a0f1e);
}

.fz-wai-guess-btns {
  display: flex;
  gap: var(--space-sm, 0.75rem);
  margin-top: var(--space-sm, 0.75rem);
}

.fz-wai-next-clue-btn {
  flex: 1;
  padding: var(--space-sm, 0.75rem) var(--space-md, 1rem);
  background: var(--ink-2, #121a30);
  border: 2px solid var(--ink-line, #2a3a5c);
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-text, #eef1fb);
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.fz-wai-next-clue-btn:hover:not(:disabled) {
  border-color: var(--page-accent, #a855f7);
  background: var(--page-accent-soft, rgba(168, 85, 247, 0.1));
}

.fz-wai-next-clue-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.fz-wai-next-clue-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.fz-wai-submit-btn {
  flex: 1;
  padding: var(--space-sm, 0.75rem) var(--space-md, 1rem);
  background: var(--page-accent, #a855f7);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.fz-wai-submit-btn:hover:not(:disabled) {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.fz-wai-submit-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.fz-wai-submit-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ─── FEEDBACK ─── */
.fz-wai-feedback {
  margin: var(--space-md, 1rem) 0;
  padding: var(--space-md, 1rem);
  border-radius: 12px;
  text-align: center;
  display: none;
}

.fz-wai-feedback.correct {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: block;
}

.fz-wai-feedback.wrong {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: block;
}

.fz-wai-feedback-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-xs, 0.5rem);
}

.fz-wai-feedback.correct .fz-wai-feedback-title {
  color: #22c55e;
}

.fz-wai-feedback.wrong .fz-wai-feedback-title {
  color: #ef4444;
}

.fz-wai-feedback-detail {
  font-size: 0.9rem;
  color: var(--ink-muted, #8a9bb8);
}

.fz-wai-feedback-points {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: var(--space-xs, 0.5rem);
  color: var(--page-accent, #a855f7);
}

/* ─── RESULTS SCREEN ─── */
.fz-wai-results {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.fz-wai-results-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--page-accent, #a855f7);
  margin: var(--space-md, 1rem) 0;
}

.fz-wai-results-breakdown {
  background: var(--ink-2, #121a30);
  border: 1px solid var(--ink-line, #2a3a5c);
  border-radius: 12px;
  padding: var(--space-md, 1rem);
  margin: var(--space-md, 1rem) 0;
  text-align: left;
}

.fz-wai-results-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--ink-text, #eef1fb);
  border-bottom: 1px solid var(--ink-line, #2a3a5c);
}

.fz-wai-results-row:last-child {
  border-bottom: none;
  font-weight: 700;
  color: var(--page-accent, #a855f7);
}

.fz-wai-results-actions {
  display: flex;
  gap: var(--space-sm, 0.75rem);
  justify-content: center;
  margin-top: var(--space-lg, 1.5rem);
}

/* ─── DAILY LOCKED ─── */
.fz-wai-daily-locked {
  text-align: center;
  padding: var(--space-xl, 2rem);
}

.fz-wai-daily-locked-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md, 1rem);
}

.fz-wai-daily-locked-text {
  color: var(--ink-muted, #8a9bb8);
  font-size: 0.95rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .fz-wai-mystery-card {
    min-height: 220px;
    padding: var(--space-md, 1rem);
  }

  .fz-wai-mystery-silhouette {
    width: 85px;
    height: 85px;
  }

  .fz-wai-guess-btns {
    flex-direction: column;
  }

  .fz-wai-results-score {
    font-size: 2.5rem;
  }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  .fz-wai-clue,
  .fz-wai-mystery-silhouette.revealed img {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─── SETUP LABELS & INFO BOX (matching simulator style) ─── */
.fz-setup-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted, #8a9bb8);
  margin-bottom: var(--space-sm, 0.75rem);
  font-weight: 600;
}

.fz-info-box {
  background: var(--ink-2, #121a30);
  border: 1px solid var(--ink-line, #2a3a5c);
  border-radius: 10px;
  padding: var(--space-md, 1rem);
  margin-bottom: var(--space-lg, 1.5rem);
  font-size: 0.9rem;
  color: var(--ink-muted, #8a9bb8);
  line-height: 1.6;
}

.fz-info-box p {
  margin: 0 0 var(--space-xs, 0.5rem);
}

.fz-info-box p:last-child {
  margin-bottom: 0;
}

/* ─── START BUTTON (matching simulator style) ─── */
.fz-sim-start-btn {
  width: 100%;
  min-height: 52px;
  background: var(--page-accent, #a855f7);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  margin-top: var(--space-md, 1rem);
  font-family: inherit;
}

.fz-sim-start-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.fz-sim-start-btn:active {
  transform: scale(0.97);
}

/* ─── AUTOCOMPLETE DROPDOWN ─── */
.fz-wai-autocomplete {
  position: relative;
}

.fz-wai-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--ink-3, #1a2540);
  border: 1px solid var(--ink-line, #2a3a5c);
  border-top: none;
  border-radius: 0 0 10px 10px;
  z-index: 100;
  display: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.fz-wai-autocomplete-list.active {
  display: block;
}

.fz-wai-autocomplete-item {
  padding: 8px 12px;
  font-size: 0.9rem;
  color: var(--ink-text, #eef1fb);
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid rgba(233, 238, 255, 0.04);
}

.fz-wai-autocomplete-item:last-child {
  border-bottom: none;
}

.fz-wai-autocomplete-item:hover,
.fz-wai-autocomplete-item.selected {
  background: var(--page-accent-soft, rgba(168, 85, 247, 0.15));
  color: var(--page-accent, #a855f7);
}

.fz-wai-autocomplete-item-flag {
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.fz-wai-autocomplete-item-flag img {
  width: 18px;
  height: 12px;
  border-radius: 1px;
}

/* ─── REVEAL LINKS (Player page + Wikipedia) ─── */
.fz-wai-reveal-links {
  display: flex;
  gap: var(--space-sm, 0.75rem);
  justify-content: center;
  margin-top: var(--space-md, 1rem);
  flex-wrap: wrap;
}

.fz-wai-reveal-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.fz-wai-reveal-link--player {
  background: var(--page-accent, #a855f7);
  color: #fff;
}

.fz-wai-reveal-link--player:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.fz-wai-reveal-link--wiki {
  background: var(--ink-3, #1a2540);
  border: 1px solid var(--ink-line, #2a3a5c);
  color: var(--ink-text, #eef1fb);
}

.fz-wai-reveal-link--wiki:hover {
  border-color: var(--page-accent, #a855f7);
  color: var(--page-accent, #a855f7);
}
