:root {
    --site-width: 1760px;

    --bg: #161015;
    --bg-soft: #1b1419;
    --bg-soft-2: #1d171c;
    --surface: #242526;
    --surface-2: #2b2c2d;
    --border: #2d272c;
    --border-soft: #353038;
    --text: #ffffff;
    --text-soft: rgba(242, 242, 242, 0.5);
    --text-muted: #8e7d89;
    --text-muted-2: #8f808b;
    --accent: #F261B8;
    --accent-contrast: #161015;
    --shadow: rgba(0, 0, 0, 0.18);
    --footer-bg: #242526;
    --footer-text: #b0b3b8;
    --footer-copy: #808080;
    --overlay-dark: rgba(0, 0, 0, 0.55);
    --overlay-dark-2: rgba(0, 0, 0, 0.7);
    --pagination-bg: #3a3b3c;
    --pagination-hover-bg: #F261B8;
    --pagination-hover-text: #000000;
}

html[data-theme="light"] {
    --bg: #ffffff;
    --bg-soft: #f7f4f6;
    --bg-soft-2: #ffffff;
    --surface: #f3eef1;
    --surface-2: #ece5ea;
    --border: #e3d8df;
    --border-soft: #d8cbd4;
    --text: #1c1419;
    --text-soft: rgba(28, 20, 25, 0.62);
    --text-muted: #7a6773;
    --text-muted-2: #8a7681;
    --accent: #d94ca4;
    --accent-contrast: #ffffff;
    --shadow: rgba(20, 15, 18, 0.08);
    --footer-bg: #f5f1f3;
    --footer-text: #5e4f59;
    --footer-copy: #8e7f88;
    --overlay-dark: rgba(28, 20, 25, 0.72);
    --overlay-dark-2: rgba(28, 20, 25, 0.82);
    --pagination-bg: #efe7ec;
    --pagination-hover-bg: #d94ca4;
    --pagination-hover-text: #ffffff;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Condensed', sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}

header {
    background: var(--bg);
    width: 100%;
    position: relative;
    z-index: 1000;
}

/* =========================
   HEADER / SEARCH / NAV
========================= */

.header-content {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    max-width: var(--site-width);
    margin: 0 auto;
    width: 100%;
    gap: 24px;
    padding: 12px 20px;
}

.mobile-left-controls {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.logo img {
    height: 72px;
    display: block;
}

.search-login {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    width: 100%;
}

.search-form {
    margin: 0;
    width: 100%;
    max-width: 900px;
    position: relative;
}

.theme-toggle {
    border: 1px solid var(--border);
    background: var(--bg-soft-2);
    color: var(--text);
    border-radius: 999px;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
    flex: 0 0 auto;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle .material-symbols-outlined {
    font-size: 22px;
}

.theme-icon-light {
    display: none;
}

html[data-theme="light"] .theme-icon-dark {
    display: block;
}

html[data-theme="light"] .theme-icon-light {
    display: none;
}

html[data-theme="dark"] .theme-icon-dark {
    display: none;
}

html[data-theme="dark"] .theme-icon-light {
    display: block;
}

.tag-input-container {
    position: relative;
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 54px 0 48px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    width: 100%;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.tag-input-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
    background: var(--bg-soft-2);
}

.search-button {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    width: 24px;
    height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.25s ease;
    z-index: 2;
    margin-right: 0;
    font-size: 18px;
}

.search-button:hover {
    color: var(--accent);
}

.search-button .material-symbols-outlined {
    font-size: 22px;
    line-height: 1;
}

#search-input {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Roboto Condensed', sans-serif;
    color: var(--text);
    font-size: 15px;
    width: 100%;
    min-width: 0;
    padding: 0;
    flex: 1;
}

#search-input::placeholder {
    color: var(--text-muted-2);
    opacity: 1;
}

#tag-list {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    flex-wrap: nowrap;
    min-width: 0;
    flex: 0 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    white-space: nowrap;
}

#tag-list::-webkit-scrollbar {
    display: none;
}

.tags-empty {
    color: var(--text-soft);
    font-size: 16px;
    text-align: center;
    padding: 30px 0;
    width: 100%;
}

.search-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: var(--accent-contrast);
    padding: 4px 8px 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    flex: 0 0 auto;
    overflow: visible;
    max-width: none;
}

.search-tag-label {
    display: inline-block;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
}

.tag-remove {
    margin-left: 0;
    cursor: pointer;
    color: inherit;
    font-weight: 700;
    border: none;
    background: transparent;
    padding: 0;
    line-height: 1;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
}

.search-hint {
    display: none;
}

.tag-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--bg-soft-2);
    border: 1px solid var(--border-soft);
    z-index: 2000;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.tag-suggestions.show {
    display: block;
}

.suggestion {
    padding: 12px 16px;
    cursor: pointer;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.suggestion:last-child {
    border-bottom: none;
}

.suggestion:hover {
    background-color: var(--surface);
    color: var(--accent);
}

.search-toggle-icon,
.search-back-icon {
    display: none;
}

.search-back-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    width: 28px;
    height: 28px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
}

.search-back-icon .material-symbols-outlined {
    font-size: 22px;
    line-height: 1;
}

.mobile-icon-button {
    border: none;
    background: transparent;
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
}

.mobile-icon-button:hover {
    background: var(--surface);
    color: var(--accent);
}

.mobile-icon-button .material-symbols-outlined {
    font-size: 24px;
    line-height: 1;
}

.nav {
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 20px;
}

nav {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    padding-top: 10px;
    margin: 0 auto;
    position: relative;
    border-bottom: 2px solid var(--border);
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1px;
    margin: 0;
    justify-content: flex-start;
}

nav ul li {
    display: flex;
    position: relative;
}

nav ul li a {
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 0 18px;
    height: 39px;
    text-transform: uppercase;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    transition: color 0.25s ease;
    position: relative;
    white-space: nowrap;
}

nav ul li a:hover {
    color: var(--accent);
}

nav ul li a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: width 0.3s ease;
    z-index: 2;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.active {
    color: var(--accent);
}

nav ul li a.active::after {
    width: 100%;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 0;
}

.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-flag {
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.3px;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 46px;
    background: var(--card-bg, #111);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    display: none;
    z-index: 9999;
}

.lang-menu.show {
    display: block;
}

.lang-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.lang-menu-item:hover {
    background: rgba(255,255,255,0.06);
}

.lang-menu-item.active {
    background: rgba(255,255,255,0.10);
}

.lang-menu-flag {
    font-size: 25px;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}

.lang-menu-label {
    font-size: 14px;
    white-space: nowrap;
}

.mobile-right-controls {
    display: none;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    position: relative;
}

.mobile-theme-toggle,
.mobile-lang-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mobile-theme-toggle:hover,
.mobile-lang-toggle:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.mobile-lang-switcher {
    position: relative;
}

.mobile-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 54px;
    padding: 6px;
    border-radius: 999px;
    background: var(--card-bg, #111);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    z-index: 1000;
}

.mobile-lang-menu.show {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-lang-menu .lang-menu-item {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
}

.mobile-lang-menu .lang-menu-item:hover,
.mobile-lang-menu .lang-menu-item.active {
    background: rgba(255,255,255,0.08);
}

.mobile-right-controls {
    display: none;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    position: relative;
}

.mobile-theme-toggle,
.mobile-lang-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-theme-toggle:hover,
.mobile-lang-toggle:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.mobile-lang-switcher {
    position: relative;
}

.mobile-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 54px;
    padding: 6px;
    border-radius: 999px;
    background: var(--card-bg, #111);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    z-index: 1000;
}

.mobile-lang-menu.show {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-lang-menu .lang-menu-item {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
}

.mobile-lang-menu .lang-menu-item:hover,
.mobile-lang-menu .lang-menu-item.active {
    background: rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
    .header-tools {
        display: none;
    }

    .mobile-right-controls {
        display: flex;
    }

    .header-content {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 10px;
    }

    .logo {
        justify-self: center;
    }
}

/* =========================
   CONTENT HEADERS / FILTERS
========================= */

.featured-videos h2,
.latest-videos h2 {
    width: 90%;
    max-width: 1300px;
    margin: 20px auto;
    padding-left: 10px;
    color: var(--text);
}

.all-videos {
    max-width: var(--site-width);
    margin: auto;
    width: 100%;
}

.all-videos h2,
.all-videos h2 {
    width: 100%;
    max-width: var(--site-width);
    margin: 20px auto;
    padding-left: 10px;
    color: var(--text);
}

.videos-header {
    max-width: var(--site-width);
    margin: auto;
    display: flex;
    padding: 20px 0 5px 0;
    justify-content: space-between;
    align-items: flex-end;
}

.filters {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.filters form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    background: var(--bg-soft-2);
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px var(--shadow);
    border-radius: 14px;
}

.filters label {
    display: flex;
    align-items: center;
    margin: 0;
}

.filters select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 140px;
    padding: 10px 40px 10px 14px;
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-soft);
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-muted-2) 50%),
        linear-gradient(135deg, var(--text-muted-2) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.filters select:hover {
    background-color: var(--surface-2);
    border-color: var(--border-soft);
    color: var(--text);
}

.filters select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* =========================
   PAGINATION
========================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto;
    padding: 10px;
    gap: 5px;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    color: var(--text);
    background: var(--pagination-bg);
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
    background: var(--pagination-hover-bg);
    color: var(--pagination-hover-text);
}

.pagination a.active {
    background: var(--pagination-hover-bg);
    color: var(--pagination-hover-text);
    pointer-events: none;
}

/* =========================
   VIDEO GRID
========================= */

.latest-videos {

    display: flex;

    justify-content: space-between;

    width: 90%;

    margin: auto;

    font-size: 18px;

    font-weight: bold;

    color: var(--text);

}

.video-grid {

    width: 100%;

    max-width: var(--site-width);

    margin: auto;

    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 36px 18px;

    padding-left: 16px;

    padding-right: 16px;

}

.video-card {

    width: 100%;

    min-width: 0;

    max-width: 100%;

    background: transparent;

    display: flex;

    flex-direction: column;

    align-items: stretch;

    text-align: left;

}

.video-card a {

    display: block;

    width: 100%;

    max-width: 100%;

    text-decoration: none;

    color: var(--text);

}

.thumbnail {

    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 400 / 711;

    overflow: hidden;

    border-radius: 18px;

    background: var(--surface);

    box-shadow: 0 18px 38px rgba(0,0,0,0.32);

    transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;

}

.thumbnail::after {

    content: "";

    position: absolute;

    inset: 0;

    background:

        linear-gradient(to top, rgba(0,0,0,0.62), rgba(0,0,0,0.05) 42%, transparent 70%);

    opacity: 0.85;

    pointer-events: none;

    transition: opacity 0.28s ease;

}

.thumbnail::before {

    content: "▶";

    position: absolute;

    left: 50%;

    top: 50%;

    z-index: 3;

    transform: translate(-50%, -50%) scale(0.92);

    width: 58px;

    height: 58px;

    border-radius: 999px;

    background: rgba(0,0,0,0.52);

    color: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 24px;

    padding-left: 4px;

    opacity: 0;

    backdrop-filter: blur(8px);

    transition: opacity 0.28s ease, transform 0.28s ease, background 0.28s ease;

}

.thumbnail img {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: transform 0.35s ease, filter 0.35s ease;

}

.video-card a:hover .thumbnail {

    transform: translateY(-4px);

    box-shadow: 0 24px 48px rgba(0,0,0,0.42);

}

.video-card a:hover .thumbnail img {

    transform: scale(1.045);

    filter: brightness(1.06) contrast(1.04);

}

.video-card a:hover .thumbnail::before {

    opacity: 1;

    transform: translate(-50%, -50%) scale(1);

}

.video-card a:hover .thumbnail::after {

    opacity: 1;

}

.video-duration {

    position: absolute;

    bottom: 10px;

    right: 10px;

    z-index: 4;

    background: rgba(0,0,0,0.72);

    color: #fff;

    font-size: 12px;

    font-weight: 800;

    padding: 5px 8px;

    border-radius: 7px;

    line-height: 1;

    backdrop-filter: blur(6px);

}

.video-card h3 {

    font-size: 16px;

    font-weight: 800;

    margin: 12px 4px 7px 4px;

    text-align: left;

    text-transform: capitalize;

    color: var(--text);

    line-height: 1.3;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    white-space: normal;

    overflow: hidden;

    text-overflow: ellipsis;

    min-height: 42px;

}

.video-details {

    margin: 0 4px;

    padding: 0;

    font-weight: 500;

    color: var(--text-soft);

    border: 0;

    display: flex;

    justify-content: flex-start;

    align-items: center;

    gap: 9px;

    font-size: 13px;

    text-align: left;

    flex-wrap: wrap;

}

.video-meta-item {

    display: inline-flex;

    align-items: center;

    gap: 4px;

}

.icon-views {

    font-size: 16px;

    font-variation-settings:

        'FILL' 1,

        'wght' 300,

        'GRAD' 200,

        'opsz' 20;

}

/* AD CARD */

.video-card-ad .ad-thumbnail {

    aspect-ratio: 400 / 711;

    border-radius: 18px;

    background: #050505;

}

.video-card-ad .ad-media-frame {

    width: 100%;

    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background: #000;

}

.video-card-ad .ad-media-frame iframe {

    width: 300px;

    height: 250px;

    border: 0;

    transform: scale(1.05);

    transform-origin: center center;

}

/* =========================
   WATCH PAGE
========================= */

.watch-page {
    color: var(--text);
    padding: 40px 0;
}

.watch-container {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 20px;
}

.related-videos {
    flex: 1;
    width: 100%;
}

.related-videos h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text);
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.content-center {
    width: 980px;
    text-align: center;
    margin: 0 auto;
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-width: 1356px;
    height: auto;
    overflow: hidden;
    border-radius: 12px;
}

iframe {
    width: 100%;
    height: 100%;
}

h1 {
    font-size: 24px;
    margin-top: 20px;
    color: var(--text);
}

.tags {
    margin: 0 10px;
    padding: 10px;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: var(--border);
}

.tag {
    display: inline-block;
    background-color: var(--surface);
    padding: 10px 17px;
    margin: 2px;
    border-radius: 5px;
    color: var(--text);
    text-decoration: none;
}

.tag:hover {
    background-color: var(--surface-2);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    max-width: var(--site-width);
    margin: auto;
}

.tag-list-tag {
    display: inline-block;
    background-color: var(--surface);
    padding: 10px 15px;
    border-radius: 5px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

.tag-list-tag:hover {
    background-color: var(--surface-2);
}

.description {
    margin: 0 10px;
    padding: 14px;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: var(--border);
    font-size: 14px;
    color: var(--text-soft);
}

.ad-div {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: var(--site-width);
    max-height: 80px;
    margin: 2px auto 5px auto;
    width: 100%;
    height: 80px;
    overflow: hidden;
}

.watch-container {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 20px;
}

.watch-top {
    display: grid;
    grid-template-columns: minmax(0, 1080px) 300px;
    gap: 24px;
    align-items: start;
    justify-content: center;
}

.watch-player-column {
    width: 100%;
    max-width: 1080px;
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.watch-sidebar-ads {
}

.watch-side-ad {
    min-height: 250px;
    max-height: 250px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 12px;
}

.watch-side-ad iframe {
    width: 300px;
    height: 250px;
    border: 0;
}

.watch-ad-horizontal {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 28px 0;
}

.watch-ad-slot {
    min-width: 0;
    overflow: hidden;
}

.ad-728 {
    flex: 1 1 728px;
    max-width: 728px;
    width: 100%;
    max-height: 90px;
    overflow: hidden;
    border-radius: 12px;
}

.ad-320 {
    flex: 0 1 320px;
    max-width: 320px;
    width: 100%;
    max-height: 50px;
    overflow: hidden;
    border-radius: 12px;
}

.ad-728 iframe,
.ad-728 img,
.ad-728 ins,
.ad-728 object,
.ad-728 embed,
.ad-728 > div,
.ad-320 iframe,
.ad-320 img,
.ad-320 ins,
.ad-320 object,
.ad-320 embed,
.ad-320 > div {
    max-width: 100%;
}

.watch-title-row,
.watch-meta,
.watch-description-box {
    width: 100%;
}

.watch-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
}

.watch-title {
    margin: 0;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text);
    text-transform: capitalize;
}

.watch-share-button {
    border: 1px solid var(--border-soft);
    background: var(--bg-soft-2);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

.watch-share-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.watch-meta {
    margin: 12px 0 0 0;
    padding: 0;
    color: var(--text-soft);
    border: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    flex-wrap: wrap;
}

.watch-description-box {
    margin: 24px 0 0 0;
}

.watch-description {
    margin: 0 0 24px 0;
    padding: 0;
    border: 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.7;
}

.watch-description p {
    margin: 0;
}

.watch-tags-block {
    margin-top: 0;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.watch-tags-title {
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
}

.watch-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.watch-tag-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.watch-tag-link:hover {
    color: var(--accent);
}

.related-videos {
    width: 100%;
    margin-top: 40px;
}

.related-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 24px 0;
}

.related-grid-main {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: var(--site-width);
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
}

/* =========================
   FOOTER
========================= */

footer {
    background-color: var(--footer-bg);
    padding: 20px 0;
    width: 100%;
    color: var(--footer-text);
    font-size: 13px;
}

.footer-wrapper {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--footer-copy);
    font-size: 12px;
}

.videos-header-centered {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px 0 20px 0;
}

.videos-header-centered h2 {
    width: 100%;
    text-align: center;
    margin: 0;
    color: var(--text);
}

/* =========================
   SEARCH PAGE LAYOUT
========================= */

.search-layout {
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: start;
}

.search-sidebar {
    width: 100%;
}

.search-sidebar-title {
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: left;
}

.search-sidebar-desktop {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-sidebar-mobile {
    display: none;
}

.search-sidebar-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    padding: 4px 0;
}

.search-sidebar-tag-name {
    color: var(--text);
    font-size: 18px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.search-sidebar-tag-count {
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.search-sidebar-tag:hover .search-sidebar-tag-name {
    color: var(--accent);
}

.search-sidebar-tag.active .search-sidebar-tag-name,
.search-sidebar-tag.active .search-sidebar-tag-count {
    color: var(--accent);
}

.search-empty {
    color: var(--text-soft);
    font-size: 16px;
    text-align: center;
    padding: 30px 0;
}

.search-main {
    min-width: 0;
}

.search-main .videos-header {
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: 16px;
}

.search-main .video-grid {
    max-width: 100%;
    margin: 0;
}

.search-grid {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 12px;
}

.footer-description {
    max-width: 900px;
    margin: 0 auto 18px auto;
    text-align: center;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.7;
}

.footer-description p {
    margin: 0;
}

.page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 50px 20px;
}

.page-content {
    width: 100%;
}

.page-title {
    font-size: 34px;
    line-height: 1.2;
    margin: 0 0 24px 0;
    color: var(--text);
}

.page-body {
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.8;
}

.page-body h2,
.page-body h3 {
    color: var(--text);
    margin-top: 28px;
}

.page-body p {
    margin: 0 0 16px 0;
}

.page-body a {
    color: var(--accent);
}

.page-body ul,
.page-body ol {
    padding-left: 22px;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.load-more-button {
    border: 1px solid var(--border-soft);
    background: var(--bg-soft-2);
    color: var(--text);
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.load-more-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

#related-scroll-sentinel {
    width: 100%;
    height: 1px;
    margin-top: 10px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1700px) {
    .watch-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 1500px) {

    .video-grid,

    .related-grid-main {

        grid-template-columns: repeat(4, minmax(0, 1fr));

    }

    .search-grid {

        grid-template-columns: repeat(4, minmax(0, 1fr));

    }

}

@media (max-width: 1200px) {

    .video-grid,

    .related-grid-main {

        grid-template-columns: repeat(3, minmax(0, 1fr));

        gap: 30px 14px;

    }

    .search-grid {

        grid-template-columns: repeat(3, minmax(0, 1fr));

    }

    .watch-title {

        font-size: 30px;

    }

}

@media (max-width: 950px) {

    .video-grid,

    .related-grid-main {

        grid-template-columns: repeat(3, minmax(0, 1fr));

        gap: 24px 12px;

        padding-left: 12px;

        padding-right: 12px;

    }

    .thumbnail {

        border-radius: 15px;

    }

    .video-card h3 {

        font-size: 15px;

        min-height: 40px;

    }

    .video-details {

        font-size: 12px;

    }

}

@media (max-width: 700px) {

    .video-grid,

    .related-grid-main,

    .search-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 22px 10px;

        padding-left: 10px;

        padding-right: 10px;

    }

    .thumbnail {

        border-radius: 14px;

    }

    .thumbnail::before {

        width: 48px;

        height: 48px;

        font-size: 20px;

    }

    .video-card h3 {

        font-size: 14px;

        min-height: 36px;

        margin-top: 10px;

    }

    .video-details {

        font-size: 11px;

        gap: 7px;

    }

    .video-duration {

        font-size: 11px;

        bottom: 8px;

        right: 8px;

    }

}

@media (max-width: 430px) {

    .video-grid,

    .related-grid-main,

    .search-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 18px 9px;

        padding-left: 8px;

        padding-right: 8px;

    }

    .thumbnail {

        border-radius: 12px;

        box-shadow: 0 12px 26px rgba(0,0,0,0.28);

    }

    .video-card h3 {

        font-size: 13px;

        line-height: 1.25;

        min-height: 34px;

        margin: 9px 2px 5px 2px;

    }

    .video-details {

        margin: 0 2px;

        font-size: 10.5px;

    }

}

@media (max-width: 1100px) {
    .filters {
        justify-content: center;
    }

    .filters form {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        padding: 10px;
    }

    .filters select {
        min-width: 160px;
    }

    .search-layout {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0 14px;
    }

    .search-sidebar-title {
        margin-bottom: 12px;
        font-size: 20px;
    }

    .search-sidebar-desktop {
        display: none;
    }

    .search-sidebar-mobile {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 10px;
        align-items: flex-start;
    }

    .search-sidebar-mobile .search-sidebar-tag {
        display: inline-flex;
        width: auto;
        justify-content: center;
        padding: 10px 14px;
        background: var(--surface);
        border-radius: 999px;
        flex: 0 0 auto;
    }

    .search-sidebar-mobile .search-sidebar-tag-name {
        font-size: 15px;
        line-height: 1;
    }

    .search-sidebar-mobile .search-sidebar-tag-count {
        font-size: 15px;
        line-height: 1;
    }

    .search-main .videos-header {
        justify-content: center;
    }

    .search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .watch-ad-horizontal {
        flex-direction: column;
    }

    .ad-728,
    .ad-320 {
        max-width: 100%;
    }
}

@media (max-width: 950px) {
    .header-tools .theme-toggle,
    .header-tools .lang-switcher {
        display: none;
    }

    .header-content {
        grid-template-columns: 1fr auto 1fr;
        gap: 8px;
        padding: 10px 14px;
        position: relative;
    }

    .mobile-left-controls {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
    }

    .logo {
        justify-content: center;
    }

    .logo img {
        height: 52px;
    }

    .search-login {
        justify-content: flex-end;
        width: auto;
        min-width: 0;
        overflow: hidden;
    }

    .search-form {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: static;
    }

    .tag-input-container {
        display: none;
        position: fixed;
        top: 12px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
        min-height: 52px;
        height: auto;
        padding: 10px 44px 10px 44px;
        border-radius: 16px;
        border: 1px solid var(--border-soft);
        background: var(--bg-soft-2);
        z-index: 1200;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        overflow: visible;
    }

    .search-active .tag-input-container {
        display: flex;
    }

    .search-active .search-back-icon {
        display: inline-flex;
    }

    .search-active .logo,
    .search-active .mobile-left-controls {
        visibility: hidden;
    }

    .search-button {
        position: absolute;
        top: 14px;
        left: 12px;
        transform: none;
    }

    .search-back-icon {
        position: absolute;
        top: 12px;
        right: 10px;
        transform: none;
    }

    #tag-list {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
        margin: 0;
        overflow: visible;
        white-space: normal;
    }

    #search-input {
        width: 100%;
        min-width: 0;
        flex: none;
        font-size: 15px;
        padding: 0;
    }

    .tag-suggestions {
        position: fixed;
        top: 124px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
        border-radius: 16px;
        z-index: 1201;
    }

    .nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        transform: none;
        padding: 0;
        z-index: 1100;
    }

    header.menu-active .nav {
        display: block;
    }

    .nav nav {
        border-bottom: none;
        background: var(--bg-soft-2);
        border: 1px solid var(--border-soft);
        border-radius: 18px;
        padding: 10px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
    }

    .nav nav ul {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .nav nav ul li {
        width: 100%;
    }

    .nav nav ul li a {
        width: 100%;
        height: auto;
        min-height: 44px;
        justify-content: center;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 16px;
        text-align: center;
    }

    .nav nav ul li a::after {
        display: none;
    }

    .nav nav ul li a:hover,
    .nav nav ul li a.active {
        background: var(--surface);
        color: var(--accent);
    }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-grid-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .watch-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .watch-title {
        font-size: 26px;
    }

    .watch-ad-horizontal {
        max-width: 100%;
    }

    .header-content,
    .footer-wrapper {
        padding-left: 14px;
        padding-right: 14px;
    }
	
	.header-tools {
    display: none;
}

.mobile-right-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-theme-toggle,
.mobile-lang-toggle {
    display: inline-flex;
}

.search-login {
    margin-left: 0;
}
}

@media (max-width: 768px) {
    .ad-728 {
        display: none;
    }

    .ad-320 {
        max-width: 320px;
    }
}

@media (max-width: 700px) {
    .filters form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filters label,
    .filters select {
        width: 100%;
    }

    .search-layout {
        padding: 0 12px;
    }

    .search-sidebar-mobile {
        gap: 8px;
    }

    .search-sidebar-mobile .search-sidebar-tag {
        padding: 9px 12px;
    }

    .search-sidebar-mobile .search-sidebar-tag-name,
    .search-sidebar-mobile .search-sidebar-tag-count {
        font-size: 14px;
    }

    .search-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .video-grid {
        grid-template-columns: 1fr;
    }

    .related-grid-main {
        grid-template-columns: 1fr;
    }

    .header-content {
        padding: 8px 10px;
    }

    .logo img {
        height: 46px;
    }

    .mobile-icon-button {
        width: 38px;
        height: 38px;
    }

    .tag-input-container {
        top: 10px;
        left: 8px;
        right: 8px;
        width: auto;
        max-width: calc(100vw - 16px);
        padding: 10px 40px 10px 40px;
    }

    #tag-list {
        max-width: 100%;
    }

    .tag-suggestions {
        left: 8px;
        right: 8px;
        top: 118px;
        width: auto;
        max-width: calc(100vw - 16px);
    }

    .nav {
        left: 8px;
        right: 8px;
        width: auto;
    }

    .watch-container {
        padding: 14px;
    }

    .watch-title {
        font-size: 22px;
    }

    .watch-tags-title {
        font-size: 20px;
    }

    .watch-tag-link {
        font-size: 15px;
    }
}