:root {
    --bg: #0e0e12;
    --surface: #17171d;
    --border: #26262f;
    --text: #f2f2f5;
    --muted: #8a8a95;
    --accent: #5b8cff;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    margin: 0;
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

nav a:hover { color: var(--text); }

nav .brand {
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
    margin-right: 16px;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px;
}

h1 { font-size: 26px; margin-bottom: 8px; }
h2 { font-size: 18px; margin-top: 32px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

.muted { color: var(--muted); font-size: 14px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 28px; font-weight: 700; }
.stat-value small { font-size: 14px; color: var(--muted); margin-left: 2px; }

.episode-list { list-style: none; padding: 0; }
.episode-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.show-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.show-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.show-card img { width: 100%; border-radius: 6px; aspect-ratio: 2/3; object-fit: cover; }
.show-card-placeholder {
    width: 100%; aspect-ratio: 2/3; border-radius: 6px;
    background: var(--border); display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: var(--muted);
}

.episode-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.episode-table th, .episode-table td {
    text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.episode-table th { color: var(--muted); font-weight: 600; }

.back-link { color: var(--accent); text-decoration: none; font-size: 14px; }

.import-form { display: flex; gap: 12px; margin: 24px 0; align-items: center; }
.import-form button {
    background: var(--accent); color: white; border: none; padding: 10px 20px;
    border-radius: 8px; cursor: pointer; font-weight: 600;
}

.info-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 20px; margin-top: 24px;
}
.info-box pre {
    background: var(--bg); padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 13px;
}

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash-info { background: #1c2b4a; color: #a8c4ff; }
.flash-error { background: #3a1c1c; color: #ff9d9d; }

footer {
    text-align: center; color: var(--muted); font-size: 13px; padding: 24px; border-top: 1px solid var(--border);
}
footer a { color: var(--muted); }
