/* WatchWithFriends – gemeinsame Optik der Webseiten (siehe docs/DESIGN.md) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0E1014;
  --surface: #171A21;
  --surface2: #20242D;
  --line: #2A2F3A;
  --text: #ECEEF2;
  --muted: #A3A9B5;
  --accent: #8B9CFF;
  --ok: #9DB4FF;
  --warn: #F5A55B;
  --danger: #FF7A7A;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
a { color: var(--ok); }
a:hover { color: #C3D1FF; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; }
.logo svg { flex: none; }
.top nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 28px 24px 60px; }
.narrow { max-width: 420px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } .wrap { padding: 20px 16px 48px; } .top { padding: 12px 16px; } }
@media (max-width: 480px) { .top nav { gap: 12px; } #me-name { display: none; } .top:has(nav) .logo-text { display: none; } }

label { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type=text], input[type=password] {
  width: 100%; height: 44px; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 12px; font: inherit;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: #3A4150; color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }
.btn.primary:hover { background: #A1AFFF; }
.btn.block { width: 100%; margin-top: 16px; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--ok); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

.msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.msg.err { background: #3A1E1E; color: #FFB3B3; }
.msg.ok { background: #1E2640; color: var(--ok); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.off { color: var(--muted); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); }
.badge.netflix { background: #3A1C1E; color: #FF8A8F; }
.badge.crunchyroll { background: #3A2A1C; color: var(--warn); }

/* Lobby */
.members { list-style: none; margin: 0; padding: 0; }
.member { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.member:first-child { border-top: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; background: #2B3350; color: #C3D1FF; border: 2px solid transparent; flex: none; }
.avatar.host { border-color: #F5C55B; }
.avatar.bad { border: 2px dashed var(--warn); }
.member .status { white-space: nowrap; }
.row .who { flex: 1; min-width: 0; }
.member .who { flex: 1; min-width: 0; }
.member .name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.crown { color: #F5C55B; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; }
.title-line { font-size: 20px; font-weight: 700; margin: 6px 0 2px; }
.chat { display: flex; flex-direction: column; height: 360px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.chat-line .from { font-weight: 600; margin-right: 6px; }
.chat-line.sys { color: var(--muted); font-size: 13px; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }

/* Admin */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; border-top: 0; }
td .btn { margin-right: 6px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1; min-width: 160px; }

/* Anleitung */
ol.steps { padding-left: 22px; }
ol.steps li { margin-bottom: 14px; }
.shot { display: block; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
kbd { background: var(--surface2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.mt { margin-top: 16px; }
.narrow-wide { max-width: 720px; }
