*, *::before, *::after { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #e8e8e8; background: #0f0f0f; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
a:hover .title, nav a:hover, .notfound a { text-decoration: underline; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; border-bottom: 1px solid #222; position: sticky; top: 0; background: #0f0f0f; z-index: 1; }
.brand { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.logo { display: inline-block; width: 30px; height: 22px; margin-right: 8px; border-radius: 6px; background: #d9342b; color: #fff; font-size: 12px; line-height: 22px; text-align: center; vertical-align: 2px; }
nav a { color: #aaa; font-size: 14px; }

main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px; }
.section { font-size: 20px; margin: 0 0 16px; }
.empty { color: #aaa; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 16px; }
.card .title { display: block; margin-top: 10px; font-weight: 500; line-height: 1.35; }
.meta { display: block; margin-top: 4px; color: #aaa; font-size: 13px; }

.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #222; border-radius: 10px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.small { width: 168px; flex: none; border-radius: 8px; }
.len { position: absolute; right: 6px; bottom: 6px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.8); font-size: 12px; font-weight: 500; }

.watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
.player { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; display: block; }
.video-title { font-size: 20px; margin: 14px 0 4px; }
.description { background: #1f1f1f; border-radius: 10px; padding: 12px; line-height: 1.5; white-space: pre-line; }
.related h2 { font-size: 16px; margin: 0 0 12px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { margin-bottom: 10px; }
.related a { display: flex; gap: 8px; }
.related .title { font-size: 14px; font-weight: 500; line-height: 1.35; }

.notfound { text-align: center; padding: 80px 0; }
.notfound h1 { font-size: 72px; margin: 0; color: #555; }
.notfound p { color: #aaa; }

.bottom { border-top: 1px solid #222; padding: 16px 24px; color: #777; font-size: 12px; text-align: center; }

@media (max-width: 900px) {
  .watch { grid-template-columns: 1fr; }
  main { padding: 16px; }
}
