* , *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    background: #0f0f0f;
    color: #f1f1f1;
    font-family: "Roboto", Arial, Helvetica, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 20px;
    background: #0f0f0f;
    border-bottom: 1px solid #272727;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
}
.site-branding .logo-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff5f6d, #ffc371);
    display: inline-block;
}
.site-search {
    flex: 1;
    max-width: 600px;
    display: flex;
}
.site-search input[type="text"] {
    flex: 1;
    background: #121212;
    border: 1px solid #303030;
    border-radius: 20px 0 0 20px;
    padding: 8px 16px;
    color: #f1f1f1;
    font-size: 14px;
}
.site-search button {
    background: #222222;
    border: 1px solid #303030;
    border-left: none;
    border-radius: 0 20px 20px 0;
    padding: 8px 16px;
    color: #f1f1f1;
    cursor: pointer;
}
.header-actions { display: flex; align-items: center; gap: 14px; }
.btn-upload {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #e91e63;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}
.btn-upload:hover { background: #d81558; }
.header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 14px;
}

/* ---------- Layout ---------- */
.site-main { max-width: 1500px; margin: 0 auto; padding: 24px 20px 60px; }
.section-title { font-size: 18px; font-weight: 600; margin: 0 0 16px; }

/* ---------- Video grid ---------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px 16px;
}
.video-card { display: block; }
.video-card > a { display: block; }
.video-info > a { display: block; }
.video-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
}
.video-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.video-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}
.video-meta { display: flex; gap: 10px; margin-top: 10px; }
.video-meta .channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2a2a2a;
    flex-shrink: 0;
    object-fit: cover;
}
.video-info .video-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 4px;
}
.video-info .video-channel { font-size: 13px; color: #aaaaaa; margin: 0 0 2px; }
.video-info .video-stats { font-size: 13px; color: #aaaaaa; margin: 0; }

/* ---------- Single video page ---------- */
.single-video-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}
.video-player video, .video-player iframe { width: 100%; height: 100%; border: none; }
.single-video-title { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.single-video-subrow {
    color: #aaaaaa;
    font-size: 14px;
    border-bottom: 1px solid #272727;
    padding-bottom: 16px;
    margin-bottom: 16px;
}
.single-video-channel { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.single-video-description {
    background: #181818;
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #d9d9d9;
    white-space: pre-line;
}

/* ---------- Forms (login / register / upload) ---------- */
.form-wrap {
    max-width: 480px;
    margin: 60px auto;
    background: #181818;
    padding: 32px;
    border-radius: 12px;
}
.form-wrap h1 { margin-top: 0; font-size: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #ccc; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid #303030;
    border-radius: 8px;
    padding: 10px 12px;
    color: #f1f1f1;
    font-size: 14px;
}
.form-group textarea { resize: vertical; min-height: 90px; font-family: inherit; }
.form-hint { font-size: 12px; color: #888; margin-top: 4px; }
.btn-primary {
    background: #e91e63;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary:hover { background: #d81558; }
.form-error {
    background: #3a1a1a;
    color: #ff8a8a;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.form-success {
    background: #143a1f;
    color: #8affab;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.form-footer-link { margin-top: 16px; font-size: 14px; color: #aaa; }
.form-footer-link a { color: #66b3ff; }

/* ---------- Footer ---------- */
.site-footer {
    padding: 24px 20px;
    text-align: center;
    color: #777;
    font-size: 13px;
    border-top: 1px solid #272727;
}

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 8px 14px;
    background: #181818;
    border-radius: 8px;
    font-size: 14px;
    color: #ccc;
}
.pagination .current { background: #e91e63; color: #fff; }

@media (max-width: 700px) {
    .site-branding span.site-name-text { display: none; }
    .header-actions .btn-upload span.upload-text { display: none; }
}
