:root {
    --bg: #0d0e12;
    --bg-alt: #16181f;
    --card: #1b1e27;
    --border: #2a2d38;
    --text: #e8e9ed;
    --text-dim: #8b8d98;
    --accent: #7c5cff;
    --accent-hover: #9278ff;
    --star: #ffb800;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

header.site-header {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

header.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span { color: var(--accent); }

nav a {
    color: var(--text-dim);
    margin-left: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: color .15s;
}

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

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    padding: 36px 0 60px;
}

.video-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .18s, border-color .18s;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-wrap .no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-dim);
    font-size: 13px;
}

.card-body { padding: 14px 16px 16px; }

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-date {
    font-size: 12px;
    color: var(--text-dim);
    margin: 0 0 8px;
}

.rating-line {
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-line .stars-mini { color: var(--star); }

/* Video page */
.video-page {
    padding: 32px 0 60px;
}

.player-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.player-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-title {
    font-size: 26px;
    font-weight: 700;
    margin: 22px 0 4px;
}

.video-date {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 10px;
}

.rating-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.stars {
    display: flex;
    gap: 4px;
    font-size: 28px;
    cursor: pointer;
}

.stars .star {
    color: #3a3d4a;
    transition: color .1s, transform .1s;
}

.stars .star:hover { transform: scale(1.15); }
.stars .star.filled { color: var(--star); }

.rating-summary {
    color: var(--text-dim);
    font-size: 14px;
}

.rating-summary b { color: var(--text); }

.voted-msg {
    color: var(--accent-hover);
    font-size: 13px;
    display: none;
}

/* Komentáře */
.comments-section {
    margin-top: 36px;
}

.comments-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.comment-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 22px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-hover);
}

.comment-date {
    font-size: 12px;
    color: var(--text-dim);
}

.comment-content {
    font-size: 14px;
    color: var(--text);
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Admin */
.admin-wrap {
    max-width: 560px;
    margin: 60px auto;
    padding: 0 20px;
}

.admin-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
}

.admin-card h1 {
    font-size: 20px;
    margin: 0 0 22px;
}

.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.btn:hover { background: var(--accent-hover); }

.error-msg {
    background: #3a1a1a;
    border: 1px solid #6b2a2a;
    color: #ff9a9a;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.success-msg {
    background: #16311f;
    border: 1px solid #2a6b3a;
    color: #9affb0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.admin-list {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.admin-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
}

.admin-row img {
    width: 90px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    background: #000;
}

.admin-row .info { flex: 1; }
.admin-row .info .t { font-weight: 600; font-size: 14px; }
.admin-row .info .u { color: var(--text-dim); font-size: 12px; }

.top-bar-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 30px auto 0;
    padding: 0 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
