/* Faktakoll-skärm. Designad för att läsas på avstånd / via skärmdelning. */

:root {
  --bg: #0e1116;
  --fg: #e8eef7;
  --muted: #8a94a6;
  --card: #1a1f2a;
  --border: #2a3140;
  --green: #2ecc71;
  --yellow: #f1c40f;
  --orange: #e67e22;
  --red: #e74c3c;
  --bomb: #ff3b3b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 20px;
  line-height: 1.5;
}

header {
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: 0.5px;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
  vertical-align: middle;
  margin-left: 8px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#status {
  color: var(--muted);
  font-size: 16px;
}

main {
  padding: 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 6px solid var(--muted);
  border-radius: 12px;
  padding: 20px 24px;
  animation: slideIn 0.4s ease-out;
}

.card.green  { border-left-color: var(--green); }
.card.yellow { border-left-color: var(--yellow); }
.card.orange { border-left-color: var(--orange); }
.card.red    { border-left-color: var(--red); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.speaker {
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.claim {
  font-size: 26px;
  font-weight: 600;
  margin: 6px 0 12px 0;
}

.rating {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 12px 0;
}

.stars {
  font-size: 28px;
  letter-spacing: 4px;
}

.bomb {
  font-size: 32px;
  animation: shake 0.5s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-5deg); }
  75% { transform: translateX(4px) rotate(5deg); }
}

.verdict {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.explanation {
  color: var(--fg);
  margin: 8px 0;
}

.sources {
  margin-top: 8px;
  font-size: 14px;
}

.sources a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 12px;
}

.sources a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* --- Diskret meny uppe till höger --- */
.menu { position: relative; }

#menu-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
#menu-btn:hover { color: var(--fg); border-color: var(--muted); }

#menu-list {
  position: absolute;
  right: 0;
  top: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 10;
  display: flex;
  flex-direction: column;
}
#menu-list button {
  background: transparent;
  color: var(--fg);
  border: none;
  text-align: left;
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
}
#menu-list button:hover { background: var(--border); }

.hidden { display: none !important; }

/* --- Modal för djupare analys --- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
  z-index: 100;
}
.modal-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px 40px;
  position: relative;
}
#modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}
#modal-close:hover { color: var(--fg); }

#modal-body h1, #modal-body h2, #modal-body h3 {
  color: var(--fg);
  margin-top: 1.2em;
}
#modal-body h1 { font-size: 24px; }
#modal-body h2 { font-size: 20px; }
#modal-body h3 { font-size: 17px; }
#modal-body p, #modal-body li { line-height: 1.6; }
#modal-body code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
#modal-body .loading {
  color: var(--muted);
  font-style: italic;
}
