/* =========================================================
   SeelenMatch – Theme (auf Bootstrap 5.3, Dark Mode)
   ========================================================= */
:root, [data-bs-theme=dark] {
  --sm-bg: #0e0822;
  --sm-bg-2: #1a0f3d;
  --sm-pink: #f472b6;
  --sm-violet: #8b5cf6;
  --sm-grad: linear-gradient(135deg, #f472b6 0%, #c084fc 50%, #8b5cf6 100%);
  --sm-glass: rgba(255, 255, 255, .055);
  --sm-glass-2: rgba(255, 255, 255, .09);
  --sm-border: rgba(255, 255, 255, .11);
  --sm-radius: 1.4rem;
  --bs-body-bg: var(--sm-bg);
  --bs-body-color: #f3effc;
  --bs-secondary-color: rgba(233, 225, 255, .62);
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-border-color: var(--sm-border);
  --bs-link-color-rgb: 249, 168, 212;
  --bs-link-hover-color-rgb: 255, 200, 230;
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 700px at 10% -10%, #2a1460 0%, transparent 60%),
              radial-gradient(900px 600px at 110% 10%, #4a1145 0%, transparent 55%),
              var(--sm-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
.min-w-0 { min-width: 0; }
.ls-wide { letter-spacing: .12em; }
.text-pink { color: var(--sm-pink); }
.bg-pink { background: var(--sm-pink) !important; }

/* Hintergrund-Blobs */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blobs span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; animation: float 22s ease-in-out infinite alternate; }
.bg-blobs span:nth-child(1) { width: 420px; height: 420px; background: #8b5cf6; top: 55%; left: -120px; }
.bg-blobs span:nth-child(2) { width: 360px; height: 360px; background: #f472b6; top: -80px; right: 10%; animation-delay: -6s; opacity: .22; }
.bg-blobs span:nth-child(3) { width: 300px; height: 300px; background: #22d3ee; bottom: -120px; right: -60px; animation-delay: -12s; opacity: .14; }
@keyframes float { to { transform: translate(60px, -40px) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .bg-blobs span { animation: none; } }

/* Navbar */
.brand-text { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.4rem; letter-spacing: -.01em; }

/* Glas-Karten */
.glass {
  background: var(--sm-glass);
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 20px 60px -30px rgba(0, 0, 0, .7);
}
.glass-alert { background: rgba(244, 114, 182, .12); border: 1px solid rgba(244, 114, 182, .35); color: #fff; border-radius: 1rem; }
.text-bg-glass { background: var(--sm-glass-2); border: 1px solid var(--sm-border); font-weight: 500; padding: .55em 1em; }

/* Typo */
.display-title { font-family: 'Fraunces', serif; font-weight: 700; font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -.02em; margin-bottom: 1rem; }
.text-gradient { background: var(--sm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1, h2, h3, .h1, .h2, .h3 { letter-spacing: -.01em; }

/* Buttons */
.btn { border-radius: 999px; font-weight: 600; }
.btn-gradient { background: var(--sm-grad); border: 0; color: #fff; box-shadow: 0 10px 30px -10px rgba(244, 114, 182, .7); transition: transform .15s, box-shadow .15s, filter .15s; }
.btn-gradient:hover, .btn-gradient:focus { color: #fff; transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 34px -10px rgba(244, 114, 182, .85); }
.btn-gradient:disabled { background: rgba(255, 255, 255, .12); box-shadow: none; color: rgba(255, 255, 255, .5); }
.btn-glass { background: var(--sm-glass-2); border: 1px solid var(--sm-border); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.btn-whatsapp { background: #25d366; color: #06301a; border: 0; }
.btn-whatsapp:hover { background: #3be27a; color: #06301a; }
.btn-outline-light { --bs-btn-border-color: var(--sm-border); }

.form-control, .form-select { background: rgba(255, 255, 255, .06); border-color: var(--sm-border); border-radius: 1rem; color: #fff; }
.form-control:focus { background: rgba(255, 255, 255, .09); border-color: var(--sm-pink); box-shadow: 0 0 0 .25rem rgba(244, 114, 182, .2); color: #fff; }
.form-control::placeholder { color: rgba(255, 255, 255, .35); }
.form-check-input:checked { background-color: var(--sm-pink); border-color: var(--sm-pink); }
.form-range::-webkit-slider-thumb { background: var(--sm-pink); }
.form-range::-moz-range-thumb { background: var(--sm-pink); }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 700; text-align: center; }

/* Startseite */
.action-card { color: inherit; transition: transform .2s, border-color .2s; }
a.action-card:hover { transform: translateY(-4px); border-color: rgba(244, 114, 182, .5); color: inherit; }
.action-icon, .mode-icon { width: 54px; height: 54px; border-radius: 1rem; display: grid; place-items: center; font-size: 1.5rem; color: #fff; }
.action-icon.bg-pink { background: linear-gradient(135deg, #f472b6, #db2777); }
.action-icon.bg-violet { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.mode-icon { background: linear-gradient(135deg, #f472b6, #db2777); flex-shrink: 0; }
.mode-icon.alt { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.feature-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.feature-list li { position: relative; padding: .45rem 0 .45rem 1.9rem; color: rgba(255, 255, 255, .85); }
.feature-list i { position: absolute; left: 0; top: .5rem; color: var(--sm-pink); }
.step-num { width: 44px; height: 44px; margin: 0 auto .75rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--sm-grad); }
.recent-room { color: inherit; border-radius: 999px !important; }
.recent-room:hover { border-color: var(--sm-pink); color: inherit; }

.cat-chip { --c: #a78bfa; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 70%, #fff); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.cat-chip.small { font-size: .75rem; padding: .25rem .6rem; }

/* Formular "Raum erstellen" */
.step-dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sm-grad); font-size: .8rem; margin-right: .6rem; }
.choice-card { display: block; padding: 1.25rem; border-radius: 1.1rem; border: 1.5px solid var(--sm-border); background: rgba(255, 255, 255, .03); cursor: pointer; transition: .15s; }
.choice-card:hover { border-color: rgba(244, 114, 182, .5); }
.btn-check:checked + .choice-card { border-color: var(--sm-pink); background: rgba(244, 114, 182, .1); box-shadow: 0 0 0 4px rgba(244, 114, 182, .12); }
.cat-card { --c: #a78bfa; display: flex; flex-direction: column; gap: .2rem; padding: .85rem 1rem; border-radius: 1rem; cursor: pointer; border: 1.5px solid var(--sm-border); background: rgba(255, 255, 255, .03); transition: .15s; height: 100%; }
.cat-card i { font-size: 1.3rem; color: var(--c); }
.cat-card .cat-name { font-weight: 600; font-size: .92rem; line-height: 1.2; }
.cat-card .cat-count { color: var(--bs-secondary-color); font-size: .75rem; }
.btn-check:checked + .cat-card { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.btn-check:not(:checked) + .cat-card { opacity: .55; }
.adult-box { background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .35); }
.btn-group > .btn { border-radius: 999px; }
.btn-group > .btn:not(:first-child) { margin-left: .25rem; }
.btn-check:checked + .btn-outline-light { background: rgba(244, 114, 182, .2); border-color: var(--sm-pink); color: #fff; }

/* Spielraum: Player-Bar */
.avatar { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; background: linear-gradient(135deg, #f472b6, #db2777); box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }
.avatar.alt { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.avatar-lg { width: 76px; height: 76px; font-size: 2rem; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: #6b7280; border: 2px solid var(--sm-bg); }
.online-dot.on { background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.vs-heart { color: var(--sm-pink); font-size: 1.4rem; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
.progress-thin { height: 7px; background: rgba(255, 255, 255, .08); border-radius: 99px; }
.progress-thin .progress-bar { background: var(--sm-grad); border-radius: 99px; transition: width .6s ease; }
.progress-thin .progress-bar.alt { background: linear-gradient(90deg, #a78bfa, #6d28d9); }

/* Spielraum: Fragen */
.fade-up { animation: fadeUp .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.question-text { font-family: 'Fraunces', serif; font-weight: 600; font-size: clamp(1.45rem, 3.6vw, 2.15rem); line-height: 1.2; }
.depth { display: inline-flex; gap: 3px; vertical-align: middle; }
.depth-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.depth-dot.on { background: var(--sm-pink); }
.section-label { font-size: .9rem; font-weight: 600; margin-bottom: .6rem; color: rgba(255, 255, 255, .85); }

.opts { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.opts-scale { grid-template-columns: 1fr; }
.opt { display: flex; align-items: center; gap: .85rem; text-align: left; padding: .95rem 1.1rem; border-radius: 1rem; color: #fff; font-weight: 500;
  background: rgba(255, 255, 255, .045); border: 1.5px solid var(--sm-border); transition: .15s; }
.opt:hover { border-color: rgba(244, 114, 182, .55); background: rgba(255, 255, 255, .07); }
.opt-mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); flex-shrink: 0; transition: .15s; }
.opt.active { border-color: var(--sm-pink); background: rgba(244, 114, 182, .14); }
.opt.active .opt-mark { border-color: var(--sm-pink); background: var(--sm-pink); box-shadow: inset 0 0 0 3px #2a1330; }

.imp-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.imp-btn { border: 1.5px solid var(--sm-border); color: rgba(255, 255, 255, .8); padding: .4rem .9rem; font-size: .88rem; }
.btn-check:checked + .imp-btn { color: #fff; }
.btn-check:checked + .imp-0 { background: #4b5563; border-color: #6b7280; }
.btn-check:checked + .imp-1 { background: #3b3a7a; border-color: #818cf8; }
.btn-check:checked + .imp-2 { background: #6d28d9; border-color: #a78bfa; }
.btn-check:checked + .imp-3 { background: #be185d; border-color: #f472b6; }
.btn-check:checked + .imp-4 { background: #b91c1c; border-color: #f87171; }
.imp-tag { display: inline-block; font-size: .72rem; padding: .12rem .55rem; border-radius: 99px; margin-top: .4rem; background: rgba(255, 255, 255, .08); }
.imp-tag.imp-3 { background: rgba(244, 114, 182, .25); }
.imp-tag.imp-4 { background: rgba(239, 68, 68, .35); }

.guess-block { padding: 1rem; border-radius: 1rem; border: 1.5px dashed rgba(167, 139, 250, .4); transition: .25s; }
.guess-block.highlight { border-color: var(--sm-pink); background: rgba(244, 114, 182, .07); }
.chip-btn { padding: .45rem .95rem; border-radius: 999px; font-size: .88rem; color: #fff; background: rgba(255, 255, 255, .05); border: 1.5px solid var(--sm-border); transition: .15s; }
.chip-btn:hover { border-color: #a78bfa; }
.chip-btn.active { background: rgba(167, 139, 250, .3); border-color: #a78bfa; }

.answer-area { font-size: 1.08rem; line-height: 1.55; border-radius: 1.1rem; padding: 1rem 1.1rem; resize: vertical; min-height: 140px; }

.answer-bubble { padding: 1rem 1.15rem; border-radius: 1.1rem; background: rgba(244, 114, 182, .1); border: 1px solid rgba(244, 114, 182, .28); word-wrap: break-word; }
.answer-bubble > small:first-child { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--bs-secondary-color); margin-bottom: .3rem; font-weight: 700; }
.answer-bubble.them { background: rgba(139, 92, 246, .12); border-color: rgba(167, 139, 250, .3); }
.answer-bubble.sm { padding: .6rem .8rem; }
.flip-in { animation: flipIn .6s cubic-bezier(.2, .8, .2, 1); transform-origin: left center; }
@keyframes flipIn { from { opacity: 0; transform: perspective(600px) rotateY(-35deg); } to { opacity: 1; transform: none; } }

.reveal-verdict { font-size: 1.35rem; font-weight: 800; text-align: center; padding: .9rem; border-radius: 1rem; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.reveal-verdict.match { background: rgba(34, 197, 94, .14); color: #86efac; }
.reveal-verdict.near { background: rgba(250, 204, 21, .12); color: #fde68a; }
.reveal-verdict.diff { background: rgba(167, 139, 250, .14); color: #d8b4fe; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.guess-res { padding: .45rem .9rem; border-radius: 99px; font-size: .88rem; font-weight: 600; }
.guess-res.ok { background: rgba(34, 197, 94, .15); color: #86efac; }
.guess-res.no { background: rgba(255, 255, 255, .06); color: var(--bs-secondary-color); }
.alert-danger-soft { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35); color: #fecaca; border-radius: 1rem; }

.rate-btn { padding: .6rem 1.1rem; border-radius: 999px; color: #fff; font-weight: 600; background: rgba(255, 255, 255, .05); border: 1.5px solid var(--sm-border); transition: .15s; }
.rate-btn:hover { border-color: var(--sm-pink); }
.rate-btn.active { background: rgba(244, 114, 182, .22); border-color: var(--sm-pink); transform: scale(1.04); }
.react-btn { width: 46px; height: 46px; border-radius: 50%; font-size: 1.35rem; background: rgba(255, 255, 255, .05); border: 1.5px solid transparent; transition: .15s; }
.react-btn:hover { transform: scale(1.15); }
.react-btn.active { border-color: var(--sm-pink); background: rgba(244, 114, 182, .2); transform: scale(1.15); }
.reaction-pop { display: inline-block; font-size: 1.3rem; animation: pop .5s; }

.typing { display: inline-flex; gap: 6px; }
.typing span { width: 9px; height: 9px; border-radius: 50%; background: var(--sm-pink); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-5px); } }
.online-pill { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #6b7280; margin-right: .45rem; vertical-align: middle; }
.online-pill.on { background: #22c55e; box-shadow: 0 0 8px #22c55e; }

/* Lobby */
.room-code { display: inline-flex; gap: .4rem; cursor: pointer; }
.room-code span { width: 48px; height: 60px; display: grid; place-items: center; font-size: 1.9rem; font-weight: 800; border-radius: .8rem; background: rgba(255, 255, 255, .08); border: 1px solid var(--sm-border); }
@media (max-width: 420px) { .room-code span { width: 40px; height: 52px; font-size: 1.5rem; } }
.qr-box { background: #fff; padding: 12px; border-radius: 1rem; width: 192px; height: 192px; }
.qr-box img, .qr-box canvas { display: block; }
.pulse-ring { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; background: var(--sm-grad); position: relative; }
.pulse-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sm-pink); animation: ring 1.8s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.8); opacity: 0; } }

/* Chat */
.chat-canvas { background: rgba(20, 11, 48, .96); backdrop-filter: blur(16px); border-left: 1px solid var(--sm-border) !important; }
.chat-list { overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; }
.chat-msg { max-width: 85%; display: flex; flex-direction: column; }
.chat-msg .bubble { padding: .55rem .9rem; border-radius: 1.1rem; background: rgba(255, 255, 255, .08); word-wrap: break-word; }
.chat-msg small { font-size: .68rem; color: var(--bs-secondary-color); margin: .15rem .5rem 0; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.mine .bubble { background: var(--sm-grad); border-bottom-right-radius: .35rem; }
.chat-msg.theirs .bubble { border-bottom-left-radius: .35rem; }
.glass-toast { background: rgba(30, 18, 66, .95); color: #fff; border-radius: 1rem; backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }

/* Ergebnisse */
.ring-val { animation: ringIn 1.6s cubic-bezier(.2, .8, .2, 1); }
@keyframes ringIn { from { stroke-dashoffset: var(--from); } }
.ring-num { fill: #fff; font-family: 'Fraunces', serif; font-weight: 700; font-size: 46px; }
.ring-sub { fill: rgba(255, 255, 255, .55); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; }
.display-label { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 700; line-height: 1.1; margin-bottom: .4rem; }
.stat-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 99px; font-size: .85rem; font-weight: 600; background: rgba(255, 255, 255, .07); border: 1px solid var(--sm-border); }
.stat-pill.danger { background: rgba(239, 68, 68, .15); border-color: rgba(239, 68, 68, .4); color: #fecaca; }
.sat-box { padding: .9rem 1rem; border-radius: 1rem; background: rgba(255, 255, 255, .04); border: 1px solid var(--sm-border); }
.verdict-box { background: linear-gradient(135deg, rgba(244, 114, 182, .12), rgba(139, 92, 246, .12)); border-color: rgba(244, 114, 182, .3); }
.verdict-btn { padding: 1rem 1.3rem; border-radius: 1.2rem; border: 1.5px solid var(--sm-border); color: #fff; background: rgba(255, 255, 255, .05); min-width: 210px; transition: .15s; }
.verdict-btn:hover { transform: translateY(-3px); color: #fff; }
.verdict-yes:hover { border-color: #f472b6; background: rgba(244, 114, 182, .18); }
.verdict-maybe:hover { border-color: #facc15; background: rgba(250, 204, 21, .12); }
.verdict-no:hover { border-color: #a78bfa; background: rgba(167, 139, 250, .14); }
.border-danger-glow { border-color: rgba(239, 68, 68, .45); box-shadow: 0 0 40px -15px rgba(239, 68, 68, .6); }
.diff-item, .common-item { padding: .8rem 0; border-bottom: 1px solid var(--sm-border); }
.diff-item:last-child, .common-item:last-child { border-bottom: 0; }
.common-item { display: flex; gap: .8rem; align-items: flex-start; }
.common-item > i { font-size: 1.2rem; margin-top: .1rem; }
.ans-chip { padding: .3rem .75rem; border-radius: 99px; background: rgba(244, 114, 182, .14); }
.ans-chip.them { background: rgba(139, 92, 246, .18); }
.transcript-item { padding: 1rem 0; border-bottom: 1px solid var(--sm-border); }
.transcript-item:last-child { border-bottom: 0; }
.sim-line { height: 4px; border-radius: 99px; margin-top: .6rem; background: rgba(255, 255, 255, .06); position: relative; overflow: hidden; }
.sim-line::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 99px; }
.sim-line.match::after { background: #22c55e; }
.sim-line.near::after { background: #facc15; }
.sim-line.diff::after { background: #a78bfa; }

@media (max-width: 576px) {
  .glass.p-4 { padding: 1.15rem !important; }
  .opt { padding: .85rem .95rem; }
  .verdict-btn { min-width: 0; width: 100%; }
}

@media print {
  body { background: #fff !important; color: #000; }
  .bg-blobs, nav, footer, .btn, .verdict-box button { display: none !important; }
  .glass { background: #fff !important; border: 1px solid #ddd; box-shadow: none; backdrop-filter: none; }
  .collapse { display: block !important; }
  .text-secondary, .ring-sub { color: #555 !important; fill: #555 !important; }
  .ring-num { fill: #000; }
}
