/* ============================================================
   SPOIL PARTY — style.css
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --bg:           #090912;
  --card-bg:      #12121e;
  --card-border:  #252540;
  --text:         #e8e8f2;
  --text-muted:   #7777aa;
  --accent:       #a855f7;
  --accent-dark:  #7c3aed;
  --success:      #22c55e;
  --error:        #ef4444;
  --gold:         #fbbf24;
  --radius:       18px;
  --shadow:       0 8px 40px rgba(0,0,0,.6);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(124,58,237,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(236,72,153,.06) 0%, transparent 50%);
}

/* ══════════════════════════════════════════════════════════════
   ÉCRAN DE DÉMARRAGE
══════════════════════════════════════════════════════════════ */
#start-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.start-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 44px 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
  animation: cardIn .4s ease;
}

.start-emoji {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 10px;
}

.start-title {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.start-sub {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 30px;
}

/* Blocs de réglages */
.setting-block {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  text-align: left;
}

.setting-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 12px;
}

.setting-sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Boutons de difficulté (toggle multi-sélection) */
.diff-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.dpick {
  flex: 1;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 9px 4px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  font-family: inherit;
  white-space: nowrap;
}

.dpick.active {
  background: rgba(168,85,247,.15);
  border-color: var(--accent);
  color: var(--text);
}

.dpick:hover:not(.active) {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Genre picker (multi-sélection, wrappable) */
.genre-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.gpick {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit;
  white-space: nowrap;
}

.gpick.active {
  background: rgba(168,85,247,.15);
  border-color: var(--accent);
  color: var(--text);
}

.gpick:hover:not(.active) {
  border-color: var(--text-muted);
  color: var(--text);
}

.diff-legend-row {
  display: flex;
  justify-content: space-between;
  font-size: .68rem;
  color: var(--text-muted);
  padding: 0 2px;
}

/* Select (protection & modal) */
.spoil-select {
  width: 100%;
  background: #0d0d1c;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 38px 10px 14px;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.spoil-select:focus { border-color: var(--accent); }

/* Compteur de films disponibles */
.avail-block {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  padding: 12px 16px;
  background: rgba(168,85,247,.06);
  border: 1px solid rgba(168,85,247,.18);
  border-radius: 10px;
  line-height: 1.5;
}

#avail-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
}

.avail-sep { color: var(--text-muted); margin: 0 6px; }

.avail-warning {
  color: var(--error);
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 14px;
  padding: 8px 14px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 8px;
}

.start-btn {
  width: 100%;
  padding: 15px;
  font-size: 1.05rem;
  margin-bottom: 12px;
  border-radius: 12px;
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .85rem;
  cursor: pointer;
  font-family: inherit;
  padding: 6px;
  transition: color .2s;
}
.btn-ghost:hover { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════
   HEADER (jeu)
══════════════════════════════════════════════════════════════ */
.header {
  width: 100%;
  max-width: 720px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-back {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
}
.btn-back:hover { border-color: var(--accent); color: var(--text); }

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right { display: flex; align-items: center; gap: 10px; }

.score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 6px 18px;
  min-width: 64px;
}

.score-label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

.score-value { font-size: 1.4rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.score-value.best { color: var(--gold); }

/* ── Barre de progression ────────────────────────────────────────────────────── */
.progress-wrapper {
  width: 100%;
  max-width: 720px;
  padding: 0 24px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #ec4899);
  border-radius: 3px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  width: 0%;
}

.progress-label { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════
   CARTE DE JEU
══════════════════════════════════════════════════════════════ */
#game-screen {
  width: 100%;
  max-width: 720px;
  padding: 0 24px 60px;
  flex: 1;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* Lueur décorative */
.card::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(168,85,247,.07) 0%, transparent 70%);
  pointer-events: none;
}

/* En-tête de la question */
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}

.question-number {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.header-badges { display: flex; align-items: center; gap: 8px; }

/* Badge de difficulté */
.diff-badge {
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.diff-badge.badge-easy {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  color: var(--success);
}

.diff-badge.badge-medium {
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.3);
  color: var(--gold);
}

.diff-badge.badge-hard {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--error);
}

/* Bouton icône (copier) */
.btn-icon {
  background: none;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  transition: all .2s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-icon:hover { border-color: var(--accent); color: var(--text); }

/* Texte spoil */
.spoil-text {
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 22px;
  min-height: 76px;
  text-align: center;
  padding: 16px 18px;
  background: rgba(168,85,247,.05);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-style: italic;
}

/* Zone d'indices */
.hints-area {
  min-height: 30px;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hint-chip {
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.3);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold);
  animation: chipIn .28s ease;
}

/* Feedback */
.feedback {
  min-height: 38px;
  margin-bottom: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  border-radius: 10px;
  padding: 7px 14px;
  transition: all .2s;
}

.feedback.correct {
  color: var(--success);
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.25);
}

.feedback.wrong {
  color: var(--error);
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
}

/* Champ de saisie + Valider */
.input-row { display: flex; gap: 10px; margin-bottom: 12px; }

.answer-input {
  flex: 1;
  background: rgba(9,9,18,.8);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.answer-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168,85,247,.18);
}

.answer-input:disabled { opacity: .45; cursor: not-allowed; }

/* ── Boutons ─────────────────────────────────────────────────────────────────── */
.btn {
  border: none;
  border-radius: 12px;
  padding: 13px 22px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }

/* Valider */
.btn-validate {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  box-shadow: 0 4px 16px rgba(124,58,237,.45);
}
.btn-validate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(124,58,237,.55);
}
.btn-validate:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* Ligne Passer / Indice */
.btn-row { display: flex; gap: 10px; }

.btn-pass {
  flex: 1;
  background: #1a1a2e;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}
.btn-pass:hover:not(:disabled) { background: #22223a; color: var(--text); }
.btn-pass:disabled { opacity: .4; cursor: not-allowed; }

.btn-hint {
  flex: 1;
  background: rgba(251,191,36,.08);
  color: var(--gold);
  border: 1px solid rgba(251,191,36,.25);
}
.btn-hint:hover:not(:disabled) {
  background: rgba(251,191,36,.15);
  border-color: rgba(251,191,36,.5);
}
.btn-hint:disabled { opacity: .4; cursor: not-allowed; }

/* ── Animations ──────────────────────────────────────────────────────────────── */
@keyframes cardIn    { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
@keyframes chipIn    { from{opacity:0;transform:scale(.85)} to{opacity:1;transform:scale(1)} }
@keyframes fadeIn    { from{opacity:0;transform:scale(.92)} to{opacity:1;transform:scale(1)} }
@keyframes fadeOut   { to{opacity:0;transform:translateX(-50%) translateY(10px)} }

@keyframes shake {
  0%,100%{transform:translateX(0)}
  15%    {transform:translateX(-9px)}
  30%    {transform:translateX(9px)}
  45%    {transform:translateX(-6px)}
  60%    {transform:translateX(6px)}
  75%    {transform:translateX(-3px)}
  90%    {transform:translateX(3px)}
}

@keyframes bounceCard {
  0%  {transform:scale(.97)}
  55% {transform:scale(1.022)}
  100%{transform:scale(1)}
}

@keyframes confettiDrop {
  from{transform:translateY(-30px) rotate(0deg);  opacity:1}
  to  {transform:translateY(110px) rotate(760deg);opacity:0}
}

.shake      { animation: shake      .46s ease; }
.bounceCard { animation: bounceCard .36s ease; }

/* Confettis */
.confetti-piece {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  animation: confettiDrop .9s ease forwards;
}

/* ══════════════════════════════════════════════════════════════
   ÉCRAN DE FIN
══════════════════════════════════════════════════════════════ */
.screen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.end-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 50px 44px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
  animation: cardIn .45s ease;
}

.end-emoji  { font-size: 3.8rem; display: block; margin-bottom: 12px; }

.end-card h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 20px; }

.end-score {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.end-slash { font-size: 2.6rem; font-weight: 400; color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); }

.end-message { color: var(--text-muted); font-size: 1rem; line-height: 1.5; margin-bottom: 28px; }

.end-buttons { display: flex; flex-direction: column; gap: 10px; }

/* ══════════════════════════════════════════════════════════════
   MODAL AJOUTER UNE QUESTION
══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 34px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow);
  animation: cardIn .3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 20px; }

.modal-box label {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  margin: 16px 0 6px;
}

.modal-box label small { font-size: .68rem; text-transform: none; letter-spacing: 0; font-weight: 400; }

.spoil-field-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0;
  background: rgba(9,9,18,.8);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  transition: border-color .2s;
}
.spoil-field-wrap:focus-within { border-color: var(--accent); }
.spoil-field-prefix {
  padding: 11px 12px;
  font-size: .93rem;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  background: rgba(168,85,247,.08);
  border-right: 1px solid var(--card-border);
  user-select: none;
  flex-shrink: 0;
}
.spoil-field-wrap textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  margin-bottom: 0;
  border-radius: 0;
}

.modal-box input,
.modal-box textarea {
  width: 100%;
  background: rgba(9,9,18,.8);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 11px 15px;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.modal-box textarea { min-height: 85px; resize: vertical; line-height: 1.5; }

.modal-box input:focus,
.modal-box textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168,85,247,.16);
}

.modal-actions { display: flex; gap: 10px; margin-top: 22px; }

/* ── Bouton flottant (FAB) ───────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 26px; right: 26px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 22px rgba(124,58,237,.55);
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.fab:hover { transform: scale(1.12) rotate(10deg); }

/* ── Toast ───────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 88px; left: 50%;
  transform: translateX(-50%);
  background: #22223a;
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 22px;
  font-size: .9rem;
  font-weight: 600;
  z-index: 400;
  white-space: nowrap;
  pointer-events: none;
  animation: fadeIn .25s ease, fadeOut .3s ease 1.6s forwards;
}

/* ── Utilitaires ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .start-card   { padding: 32px 20px; }
  .start-title  { font-size: 1.8rem; }
  .diff-picker  { gap: 6px; }
  .dpick        { font-size: .72rem; padding: 8px 2px; }

  .header       { padding: 14px 16px 10px; }
  .logo         { font-size: 1.2rem; }
  .progress-wrapper { padding: 0 16px 12px; }

  #game-screen  { padding: 0 16px 60px; }
  .card         { padding: 22px 16px; }
  .spoil-text   { font-size: 1.05rem; padding: 14px 12px; }
  .input-row    { flex-direction: column; }
  .btn-validate { width: 100%; }

  .end-card     { padding: 34px 20px; }
  .end-score    { font-size: 3.2rem; }
  .end-slash    { font-size: 2rem; }

  .modal-box    { padding: 24px 16px; }
  .modal-actions { flex-direction: column; }

  .score-block  { padding: 5px 12px; min-width: 52px; }
  .score-value  { font-size: 1.2rem; }
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 14px 20px;
  font-size: .78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--card-border);
  margin-top: auto;
}
.site-footer strong {
  color: var(--text);
  font-weight: 600;
}
.footer-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.footer-link:hover { text-decoration: underline; }
.footer-sep { margin: 0 6px; color: var(--text-muted); }
.footer-mod-link { opacity: .55; font-size: .75rem; }
.footer-mod-link:hover { opacity: 1; }

/* ── Panel modérateur ────────────────────────────────────────────────────────── */
.mod-box {
  width: min(680px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
}
.mod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.mod-header h3 { font-size: 1.15rem; }
.mod-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.mod-tab {
  background: var(--card-border);
  color: var(--text-muted);
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: .85rem;
  transition: background .15s, color .15s;
}
.mod-tab.active, .mod-tab:hover { background: var(--accent); color: #fff; }
.mod-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: .75rem;
  margin-left: 4px;
  font-weight: 700;
}
.mod-filter-input { margin-bottom: 10px; font-size: .88rem; }
.mod-content {
  max-height: 42vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
}
.mod-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mod-card-title  { font-weight: 700; font-size: .92rem; }
.mod-card-spoil  { font-style: italic; color: var(--text-muted); font-size: .85rem; }
.mod-card-meta   { font-size: .8rem; color: var(--text-muted); }
.mod-card-actions { display: flex; gap: 8px; margin-top: 6px; }
.mod-year { color: var(--text-muted); font-weight: 400; font-size: .82rem; }
.mod-btn-sm { padding: 5px 12px !important; font-size: .82rem !important; }
.mod-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
  font-style: italic;
  font-size: .9rem;
}
.mod-error { color: var(--error); font-size: .85rem; margin-top: 8px; }
.mod-base-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 14px;
  transition: opacity .2s;
}
.mod-base-row.mod-disabled { opacity: .38; }
.mod-base-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.mod-base-title {
  font-weight: 600;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mod-base-spoil {
  font-size: .78rem;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mod-existing-section {
  margin-top: 10px;
  border-top: 1px solid var(--card-border);
  padding-top: 8px;
}
.mod-existing-header {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.mod-existing-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.mod-existing-row:last-child { border-bottom: none; }
.mod-existing-row.mod-disabled .mod-existing-spoil {
  opacity: .35;
  text-decoration: line-through;
}
.mod-existing-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.mod-existing-spoil {
  font-size: .83rem;
  font-style: italic;
  color: var(--text-muted);
}
.mod-existing-meta {
  font-size: .73rem;
  color: var(--text-muted);
  opacity: .7;
}

.mod-note {
  font-size: .82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: rgba(168,85,247,.08);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.mod-pw-section {
  margin-top: 18px;
  border-top: 1px solid var(--card-border);
  padding-top: 14px;
}
.mod-pw-section summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: .85rem;
  list-style: none;
}
.mod-pw-section summary:hover { color: var(--text); }
.mod-pw-form { display: flex; gap: 8px; margin-top: 10px; }
.mod-pw-form .answer-input { flex: 1; }
