:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #181818;
    --bg-elevated: #272727;
    --bg-elevated-hover: #3f3f3f;
    --text-main: #f1f1f1;
    --text-muted: #aaaaaa;
    --accent-green: #26cd08;
    --accent-red: #ff0033;
    --border-subtle: #303030;
    --radius-lg: 12px;
    --radius-md: 8px;
}

* {
    box-sizing: border-box;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, Verdana, sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-primary);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, p {
    margin: 0;
}

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

/* Шапка YouTube-style */
.yt-navbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(15, 15, 15, 0.96);
    backdrop-filter: blur(10px);
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.yt-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.yt-logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.yt-search {
    flex: 1;
    max-width: 540px;
    display: flex;
}

.yt-search input {
    width: 100%;
    background: #121212;
    border: 1px solid var(--border-subtle);
    border-right: none;
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px 0 0 20px;
    font-size: 15px;
    outline: none;
}

.yt-search input:focus {
    border-color: #3ea6ff;
}

.yt-search button {
    background: #222222;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 0 18px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
}

.yt-search button:hover {
    background: var(--bg-elevated);
}

.yt-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yt-btn {
    padding: 8px 14px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.yt-btn-ghost {
    background: var(--bg-elevated);
    color: var(--text-main);
}

.yt-btn-ghost:hover {
    background: var(--bg-elevated-hover);
}

.yt-btn-accent {
    background: var(--accent-green);
    color: #000;
    font-weight: 700;
}

.yt-btn-accent:hover {
    filter: brightness(1.1);
}

/* Админ-панель */
.adm-panel {
    background: linear-gradient(90deg, #3b1d6e, #5a2e98);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.adm-btn {
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 12px;
    border-radius: 6px;
    margin-left: 6px;
    font-size: 14px;
}

.adm-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.adm-btn-exit {
    background: #d32f2f;
    font-weight: 700;
}

/* Основной контейнер */
#main {
    flex: 1;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 20px;
}

/* Сетка видео на главной */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px 16px;
}

.video-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    transition: transform 0.15s ease;
}

.video-card:hover {
    transform: translateY(-2px);
}

/* Контейнер превью с вашим фирменным размытым фоном (blur-thumb) */
.thumb-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-color: #000;
    margin-bottom: 10px;
}

.thumb-img .blur-thumb {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px) brightness(0.45);
    -webkit-filter: blur(8px) brightness(0.45);
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: 1;
}

.thumb-img img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.video-card:hover .thumb-img img {
    transform: scale(1.03);
}

.card-body {
    display: flex;
    gap: 12px;
    padding: 0 4px;
}

.card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #26cd08, #0088ff);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-meta {
    flex: 1;
    overflow: hidden;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.card-sub {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
}

.pagination_count {
    padding: 8px 14px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
}

.pagination_count:hover {
    background-color: var(--bg-elevated-hover);
}

.act_pag {
    background: var(--accent-green);
    color: #000;
    font-weight: 700;
    border-color: var(--accent-green);
}

/* SEO блок на главной */
.site_desc {
    margin-top: 24px;
}

.site_desc .in_text {
    padding: 20px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.site_desc .in_text h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.site_desc .in_text h2 {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

/* СТРАНИЦА ПРОСМОТРА ВИДЕО (video.php) в стиле YouTube */
.watch-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 24px;
    align-items: start;
}

.div_video {
    width: 100%;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
}

.video-js {
    width: 100%;
    height: 68vh;
    max-height: 760px;
    min-height: 320px;
}

.title_video {
    font-size: 22px;
    font-weight: 700;
    margin: 16px 0 12px;
    line-height: 1.3;
}

.private-badge {
    display: inline-block;
    background: rgba(219, 93, 53, 0.2);
    color: #ff7750;
    border: 1px solid #db5d35;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-right: 8px;
    vertical-align: middle;
}

.watch-SubBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.watch-desc-card {
    margin-top: 14px;
    background: var(--bg-elevated);
    padding: 14px 16px;
    border-radius: var(--radius-lg);
}

.datetime_video {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    display: block;
    margin-bottom: 8px;
}

.desc_video_title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.desc_video {
    font-weight: 400;
    font-size: 15px;
    color: #e0e0e0;
    white-space: pre-line;
    line-height: 1.5;
}

/* Похожие видео (справа на ПК, снизу на мобильных) */
.feels_videos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-feel-link {
    display: block;
    text-decoration: none;
}

.feel_sugg {
    padding: 8px;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    transition: background 0.2s;
}

.feel_sugg:hover {
    background: var(--bg-elevated);
}

.feel_video {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 12px;
    align-items: start;
}

.feel_video .thumb-img {
    margin-bottom: 0;
    height: 94px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
}

.feel_meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.feel_title span {
    color: var(--text-main);
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.feel_views, .feel_date {
    color: var(--text-muted);
    font-size: 12px;
}

/* Оверлей перемотки/ускорения Video.js */
.videojs-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    pointer-events: none;
    z-index: 20;
    transition: opacity 0.4s ease;
}

/* Модальное окно Anti-AdBlock с котиком */
.huj {
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background-color: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}

.huj-in {
    background: #1e1e1e;
    color: #fff;
    max-width: 560px;
    width: 100%;
    border-radius: 20px;
    border: 1px solid #444;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    padding: 24px;
    text-align: center;
}

p.hug-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.cat-huj {
    display: block;
    margin: 14px auto;
    max-width: 100%;
    height: 36vh;
    object-fit: contain;
    border-radius: 12px;
}

.btns-huj {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.btn-hug {
    background: #a90000;
    display: inline-block;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    color: white;
}

.btn-goodboy {
    background: linear-gradient(-90deg, #EE7752, #E73C7E, #23A6D5, #23D5AB, #EE7752);
    background-size: 300% 100%;
    animation: grad 2s infinite linear;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

@keyframes grad {
    100% { background-position: 150% 50%; }
}

/* Подвал */
.yt-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 40px;
}

.foo-a {
    color: var(--text-main);
    margin: 0 10px;
    font-weight: 500;
}

.foo-a:hover {
    color: var(--accent-green);
}

@media screen and (max-width: 1024px) {
    .watch-grid {
        grid-template-columns: 1fr;
    }
    .video-js {
        height: 52vh;
    }
}

@media screen and (max-width: 650px) {
    .yt-navbar {
        padding: 0 10px;
    }
    .yt-logo span {
        display: none;
    }
    .yt-btn-ghost {
        display: none;
    }
    .video-js {
        height: 38vh;
    }
    .cat-huj {
        height: 40vw !important;
    }
}