* { box-sizing: border-box; }
body { font-family: -apple-system, Segoe UI, Arial, sans-serif; background: #0a0a0a; color: #fff; margin: 0; }
.topnav { display: flex; justify-content: space-between; align-items: center; padding: 16px 32px; background: linear-gradient(#000, transparent); position: sticky; top: 0; z-index: 50; }
.logo { font-size: 22px; font-weight: bold; color: #e50914; }
.logo span { color: #fff; }
.nav-filters { display: flex; gap: 10px; align-items: center; }
.nav-filters select, .nav-filters input { background: #1a1a1a; border: 1px solid #333; color: #fff; padding: 6px 10px; border-radius: 4px; }
.btn-ghost { background: transparent; border: 1px solid #555; color: #ccc; padding: 6px 12px; border-radius: 4px; cursor: pointer; }

main { padding: 20px 32px; }
.row { margin-bottom: 32px; }
.row h2 { font-size: 18px; margin-bottom: 10px; }
.row-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; }
.card { position: relative; flex: 0 0 160px; cursor: pointer; transition: transform 0.2s; }
.card:hover { transform: scale(1.08); z-index: 5; }
.card img { width: 160px; height: 240px; object-fit: cover; border-radius: 4px; background: #222; }
.card-title { font-size: 12px; margin-top: 4px; color: #ccc; }
.ep-count { color: #777; }
.card-progress { position: absolute; bottom: 34px; left: 0; right: 0; height: 4px; background: #444; }
.card-progress div { background: #e50914; height: 100%; }
.watched-badge { position: absolute; top: 6px; right: 6px; background: #16a34a; padding: 2px 6px; border-radius: 4px; font-size: 11px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal.hidden { display: none; }
.modal-content { background: #141414; padding: 28px; border-radius: 8px; max-width: 800px; width: 90vw; max-height: 85vh; overflow-y: auto; position: relative; }
.close-btn { position: absolute; top: 12px; right: 12px; background: #333; border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; z-index: 10; }

.detail-layout { display: flex; gap: 24px; }
.detail-poster { width: 220px; border-radius: 6px; }
.meta { color: #999; font-size: 13px; }
.genre-tag { background: #333; padding: 3px 8px; border-radius: 10px; font-size: 11px; margin-right: 6px; }
.synopsis { line-height: 1.5; color: #ddd; margin: 14px 0; }
.detail-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.detail-actions button { background: #333; border: none; color: #fff; padding: 8px 14px; border-radius: 4px; cursor: pointer; }
.detail-actions .btn-play { background: #e50914; font-weight: bold; }
.detail-actions button.active { background: #e50914; }
.edit-panel { margin-top: 10px; color: #aaa; font-size: 13px; }
.edit-panel form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.edit-panel input, .edit-panel textarea { background: #1a1a1a; border: 1px solid #333; color: #fff; padding: 8px; border-radius: 4px; }

.episode-list { display: flex; flex-direction: column; gap: 6px; }
.episode-row { display: flex; gap: 16px; padding: 10px; background: #1a1a1a; border-radius: 4px; cursor: pointer; }
.episode-row:hover { background: #262626; }

.player-view { position: fixed; inset: 0; background: #000; z-index: 200; display: flex; align-items: center; justify-content: center; }
.player-view.hidden { display: none; }
#main-player { width: 100%; height: 100%; }

.inline-form { display: flex; gap: 8px; margin-top: 14px; }
.inline-form input { flex: 1; background: #1a1a1a; border: 1px solid #333; color: #fff; padding: 8px; border-radius: 4px; }
.inline-form button { background: #e50914; border: none; color: #fff; padding: 8px 14px; border-radius: 4px; cursor: pointer; }
.row-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #262626; font-size: 13px; }
.btn-small { background: #333; border: none; color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; margin-left: 6px; }
.hint { color: #777; font-size: 12px; margin-top: 10px; }
code { background: #1a1a1a; padding: 2px 6px; border-radius: 4px; }
