:root {
  --bg: #0f1115;
  --panel: #171a21;
  --line: #262a33;
  --text: #e8e9ec;
  --muted: #9097a3;
  --accent: #ff4d4f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; border-bottom: 1px solid var(--line);
}
.logo { font-weight: 700; font-size: 20px; text-decoration: none; }
.logo span { color: var(--accent); }
nav a { margin-left: 24px; text-decoration: none; color: var(--muted); }
nav a:hover, nav a.active { color: var(--text); }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 48px 32px; }
footer { padding: 20px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }

.hero h1 { font-size: 44px; margin: 0 0 16px; line-height: 1.15; }
.hero p { color: var(--muted); font-size: 18px; max-width: 600px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px; border: 0;
  background: var(--accent); color: #fff; text-decoration: none; font-size: 16px; cursor: pointer;
}
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.actions { display: flex; gap: 12px; margin-top: 28px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 56px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.toolbar h1 { margin: 0; }
input[type="search"], input[type="text"], input[type="email"], input[type="password"] {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  padding: 10px 14px; border-radius: 8px; font-size: 15px; width: 100%;
}
.toolbar input { width: 260px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.video { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.thumb {
  aspect-ratio: 16 / 9; position: relative; display: grid; place-items: center;
  background: linear-gradient(135deg, #2a2f3a, #1b1e25);
}
.thumb::after {
  content: ""; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; opacity: .8;
}
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.7); padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.meta { padding: 14px; }
.meta h3 { margin: 0 0 6px; font-size: 16px; }
.meta small { color: var(--muted); }
.tag { display: inline-block; margin-top: 8px; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #2a1d1e; color: #ff8a8b; }

.auth { max-width: 380px; margin: 0 auto; }
.auth h1 { margin-top: 0; }
.auth label { display: block; margin: 16px 0 6px; color: var(--muted); font-size: 14px; }
.auth .btn { width: 100%; margin-top: 24px; }
.notice { background: #1f2a1f; border: 1px solid #2f4a2f; color: #9fd69f; padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }

.error { text-align: center; padding-top: 40px; }
.error .code { font-size: 120px; font-weight: 800; color: var(--accent); line-height: 1; }
.error p { color: var(--muted); }
