:root {
    --primary-color: #D4A574;
    --bg-dark: #1a1512;
    --bg-card: #2a2320;
    --text-primary: #f5f0e8;
    --text-secondary: #c4b5a0;
    --border-color: #443a32
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px
}

.header {
    background: rgba(26, 21, 18, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212, 165, 116, 0.12);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 200
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.25rem
}

.logo-img {
    height: 40px;
    width: 120px;
    object-fit: contain
}

.nav {
    display: flex;
    gap: 1.5rem
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05)
}

.main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px)
}

.page-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start
}

.content-area {
    flex: 1;
    min-width: 0;
    position: relative;
    min-height: 80vh
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    z-index: 5
}

@media (max-width:1024px) {
    .page-layout {
        flex-direction: column;
        gap: 1.5rem
    }

    .sidebar {
        width: 100%;
        position: static;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 1rem;
        padding-bottom: 1rem
    }

    .ad-zone {
        min-width: 300px;
        flex-shrink: 0
    }

    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr))
    }

    .native-ads-container {
        padding: 0.50rem;
        margin: 1rem 0
    }
}

.ad-zone {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    height: 290px;
    min-height: 270px;
    max-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    contain: layout;
    overflow: hidden
}

.ad-zone ins,
.ad-zone iframe,
.native-ads-container ins,
.native-ads-container iframe {
    max-width: 100% !important;
    width: 100% !important
}

/* CLS fix: forzar dimensiones en imágenes de anuncios para evitar layout shift */
.ad-zone img,
.ad-zone ins img {
    width: 300px !important;
    height: 250px !important;
    max-width: 100%;
    aspect-ratio: 300 / 250;
    object-fit: contain;
    display: block
}

.ad-label {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem 1.5rem;
    margin-bottom: 2rem
}

@media (max-width:768px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem 1rem
    }
}

@media (max-width:480px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem 0.75rem
    }
}

.video-card-wrapper {
    cursor: pointer;
    contain: layout
}

.video-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 16/9;
    cursor: pointer
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem
}

.video-card-info {
    padding: 0.75rem 0.25rem 0
}

.video-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary)
}

.video-card-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.35rem
}

.video-card-tags .tag {
    background: rgba(212, 165, 116, 0.08);
    color: var(--primary-color);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    border: 1px solid rgba(212, 165, 116, 0.18);
    line-height: 1.3;
    white-space: nowrap
}

.video-card-link {
    text-decoration: none;
    color: inherit;
    display: block
}

.gsearch-wrap {
    flex: 1;
    max-width: 560px;
    position: relative
}

.gsearch-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.055);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0 1rem;
    height: 44px;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    backdrop-filter: blur(8px)
}

.gsearch-box:focus-within,
.gsearch-box.gsearch-open {
    border-color: rgba(212, 165, 116, 0.65);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.14), 0 4px 20px rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.08)
}

.gsearch-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.2s
}

.gsearch-box:focus-within .gsearch-icon {
    color: var(--primary-color)
}

.gsearch-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.93rem;
    outline: none;
    min-width: 0;
    font-family: inherit
}

.gsearch-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7
}

.gsearch-input::-webkit-search-cancel-button {
    display: none
}

.gsearch-input::-ms-clear {
    display: none
}

.gsearch-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.15s;
    padding: 0
}

.gsearch-clear:hover {
    background: rgba(212, 165, 116, 0.3);
    transform: scale(1.1)
}

.gsearch-clear svg {
    width: 11px;
    height: 11px;
    stroke: var(--text-secondary)
}

.gsearch-dropdown {
    position: absolute;
    top: calc(100%+8px);
    left: 0;
    right: 0;
    background: rgba(30, 24, 20, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 165, 116, 0.18);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    z-index: 300;
    animation: gsearch-drop 0.18s ease
}

@keyframes gsearch-drop {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.gsearch-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s
}

.gsearch-item:last-child {
    border-bottom: none
}

.gsearch-item:hover {
    background: rgba(212, 165, 116, 0.1)
}

.gsearch-thumb-wrap {
    width: 56px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000
}

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

.gsearch-meta {
    min-width: 0;
    flex: 1
}

.gsearch-title {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35
}

.gsearch-title mark {
    background: transparent;
    color: var(--primary-color);
    font-weight: 700
}

.gsearch-dur {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.15rem
}

.gsearch-all {
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    color: var(--primary-color);
    cursor: pointer;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
    font-weight: 500
}

.gsearch-all:hover {
    background: rgba(212, 165, 116, 0.08)
}

@media (max-width:640px) {
    .gsearch-wrap {
        max-width: 100%;
        order: 3;
        flex-basis: 100%
    }

    .header-content {
        flex-wrap: wrap
    }

    .gsearch-box {
        height: 40px
    }
}

.search-section {
    display: none !important
}

.hidden {
    display: none !important
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
    min-height: 60vh
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary)
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    min-height: 130px;
    align-items: center;
    /* CLS fix: reservar espacio siempre, solo ocultar visualmente */
    visibility: visible;
    overflow: hidden
}

/* Cuando está "hidden", mantén el espacio pero sé invisible */
.pagination.hidden {
    display: flex !important;
    visibility: hidden !important;
    pointer-events: none
}

.pagination-btn,
.pagination-number {
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center
}

.pagination-number.active {
    background: var(--primary-color);
    color: var(--bg-dark);
    border-color: var(--primary-color)
}

.video-player-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: visible;
    margin-bottom: 1.5rem;
    position: relative
}

.video-player-wrapper .plyr,
.video-player-container .plyr {
    width: 100%;
    height: 70vh;
    max-height: 720px;
    position: relative;
    z-index: 10
}

.video-player-wrapper .plyr__controls,
.video-player-container .plyr__controls {
    z-index: 100;
    position: relative;
    overflow: visible
}

.plyr__controls [data-plyr="mute"] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 101 !important
}

.video-details {
    padding: 0 0.5rem
}

.video-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary)
}

.admin-panel {
    max-width: 800px;
    margin: 0 auto
}

.form-group {
    margin-bottom: 1.5rem
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color)
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-dark)
}

.panel-title {
    margin-bottom: 1rem;
    color: var(--text-primary)
}

.upload-form,
.password-form,
.recent-videos,
.password-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem
}

.section-title {
    margin-bottom: 0.75rem;
    color: var(--primary-color)
}

.form-hint {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.85rem
}

.btn-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-top-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 0.4rem
}

.progress-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0
}

.progress-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem
}

.progress-text,
.progress-percent,
.progress-info-text {
    color: var(--text-secondary)
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden
}

.progress-fill {
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease
}

.status-message {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03)
}

.recent-list {
    display: grid;
    gap: 0.75rem;
    width: 100%;
    overflow-x: hidden
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden
}

.recent-item-info {
    min-width: 0;
    flex: 1
}

.recent-item-title {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.recent-item-meta {
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.recent-item-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0
}

.btn-action {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer
}

.btn-action:hover {
    color: var(--primary-color);
    border-color: var(--primary-color)
}

.video-manager-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem
}

.video-manager-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem
}

.video-manager-toolbar .form-input {
    flex: 1
}

#clearVideoSearchBtn {
    padding: 0.75rem 1rem;
    white-space: nowrap
}

.video-manager-pagination {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: center
}

.video-page-btn {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    cursor: pointer
}

.video-page-btn.active {
    background: var(--primary-color);
    color: var(--bg-dark);
    border-color: var(--primary-color)
}

.video-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed
}

.video-page-dots {
    color: var(--text-secondary);
    padding: 0 0.2rem
}

@media (max-width:768px) {
    .video-manager-toolbar {
        flex-direction: column;
        align-items: stretch
    }

    #clearVideoSearchBtn {
        width: 100%
    }

    .recent-item {
        flex-direction: column;
        align-items: stretch
    }

    .recent-item-actions {
        justify-content: flex-end
    }
}

.edit-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem
}

.edit-modal-content {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem
}

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem
}

.edit-modal-title {
    color: var(--text-primary)
}

.edit-modal-close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer
}

.edit-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color)
}

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2100;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    max-width: min(420px, calc(100vw - 2rem))
}

.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    position: relative;
    z-index: 20;
    margin-top: 3rem
}

.footer-content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap
}

.footer-section {
    flex: 1;
    min-width: 200px
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem
}

.footer-section ul {
    list-style: none;
    padding: 0
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s
}

.footer-section a:hover {
    color: var(--primary-color)
}

.footer-section .warning {
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.5rem
}

.video-player-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: visible;
    margin-bottom: 1.5rem;
    position: relative
}

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

.video-player-stage {
    position: relative;
    width: 100%;
    overflow: visible;
    background: #000
}

.video-player-stage .video-player,
.video-player-stage .plyr,
.video-player-stage #ima-ad-container {
    width: 100%;
    height: 100%
}

.video-details {
    padding: 1.5rem
}

.video-title-large {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0 0 1rem 0
}

.video-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem
}

.video-description {
    color: var(--text-secondary);
    line-height: 1.6
}

.video-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem
}

.video-tags .tag {
    background: rgba(212, 165, 116, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.813rem;
    border: 1px solid rgba(212, 165, 116, 0.2)
}

.related-section h2 {
    color: var(--primary-color)
}

.ad-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    min-height: 270px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center
}

.ad-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.625rem;
    color: var(--text-secondary);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.875rem
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none
}

.breadcrumb a:hover {
    text-decoration: underline
}

.native-ads-container {
    background: #f0ede8;
    padding: 0.75rem;
    border-radius: 10px;
    margin: 1rem 0;
    overflow: visible;
    /* CLS fix: reservar altura siempre, con o sin anuncio cargado */
    min-height: 250px;
    height: 250px;
    width: 100%;
    contain: layout size
}

.native-ads-container ins {
    background: transparent !important
}

.native-ads-container .eas6a97888e20,
.native-ads-container [data-zoneid="5853676"] {
    display: block;
    min-height: 220px
}

.ad-zone {
    overflow: hidden
}

.ad-zone iframe {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0
}

.native-ads-container {
    overflow: visible
}

.native-ads-container iframe {
    display: block;
    width: 100% !important;
    border: 0;
    min-height: 220px
}

.native-ads-container * {
    color: #333 !important
}

.native-ads-container a {
    color: #0066cc !important
}

.native-ads-container a:hover {
    color: #003d7a !important
}

.player-notification {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 10000;
    max-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3)
}

.player-notification.show {
    opacity: 1;
    transform: translateY(0)
}

@media (max-width:768px) {
    .container {
        padding: 0 15px
    }

    .main {
        padding: 1rem 0
    }

    .page-layout {
        gap: 1rem
    }

    .header {
        padding: 0.75rem 0
    }

    .header-content {
        flex-direction: column;
        gap: 1rem
    }

    .logo-img {
        height: 32px
    }

    .nav {
        gap: 0.75rem
    }

    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem
    }

    .search-container {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%
    }

    .search-input-wrapper,
    .search-btn {
        width: 100%
    }

    .video-player-container {
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100%+30px)
    }

    .video-player {
        aspect-ratio: 16/9
    }

    .video-player-wrapper .plyr {
        height: auto;
        aspect-ratio: 16/9
    }

    .video-player-stage .plyr__controls {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center
    }

    .video-player-stage .plyr__controls .plyr__controls__item.plyr__progress__container,
    .video-player-stage .plyr__controls .plyr__progress__container {
        order: -1;
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        margin: 0 0 0.5rem 0;
        padding-left: 0;
        padding-right: 0
    }

    .video-details {
        padding: 1rem
    }

    .video-title-large {
        font-size: 1.2rem
    }

    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem
    }

    .native-ads-container {
        padding: 0.5rem;
        margin: 0.75rem 0;
        border-radius: 0;
        width: 100%;
        min-height: 250px;
        height: 250px;
        contain: layout size
    }

    .native-ads-container [data-zoneid] {
        min-height: 220px
    }

    .player-notification {
        bottom: 60px;
        right: 10px;
        font-size: 0.85rem;
        padding: 10px 16px;
        max-width: 200px
    }

    .sidebar {
        display: flex;
        flex-direction: column;
        overflow-x: visible;
        gap: 0.75rem;
        padding-bottom: 0
    }

    .ad-zone {
        min-width: 0;
        width: 100%;
        min-height: 230px;
        margin-bottom: 0.75rem;
        padding: 0.75rem
    }

    .ad-zone:last-child {
        margin-bottom: 0
    }

    .ad-zone [data-zoneid="5853672"] {
        min-height: 200px
    }

    .native-ads-container [data-zoneid="5853676"] {
        min-height: 220px
    }

    .ad-zone>ins[data-zoneid="5853672"] {
        display: block !important;
        width: 100% !important;
        min-height: 200px !important
    }

    .ad-zone>ins[data-zoneid="5853672"]>* {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box
    }

    .native-ads-container>ins[data-zoneid="5853676"] {
        display: block !important;
        width: 100% !important;
        min-height: 220px !important
    }

    .native-ads-container>ins[data-zoneid="5853676"]>* {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box
    }

    .native-ads-container>ins[data-zoneid="5853676"] img,
    .ad-zone>ins[data-zoneid="5853672"] img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover
    }

    .ad-zone iframe {
        min-height: 200px
    }

    .native-ads-container iframe {
        min-height: 220px
    }
}

.new-video-notif {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    background: var(--bg-card);
    border: 1px solid var(--primary-color);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    max-width: 360px;
    width: calc(100vw - 2rem);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), opacity 0.3s ease;
    pointer-events: none
}

.new-video-notif.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto
}

.new-video-notif-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1
}

.new-video-notif-body {
    flex: 1;
    min-width: 0
}

.new-video-notif-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    margin-bottom: 0.2rem
}

.new-video-notif-title {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.45rem
}

.new-video-notif-link {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bg-dark);
    background: var(--primary-color);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    text-decoration: none;
    transition: opacity 0.2s
}

.new-video-notif-link:hover {
    opacity: 0.85
}

.new-video-notif-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    margin-top: -0.1rem;
    transition: color 0.2s
}

.new-video-notif-close:hover {
    color: var(--text-primary)
}

.new-video-notif-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 0 0 0.75rem 0.75rem;
    transform-origin: left;
    animation: notif-progress 8s linear forwards
}

@keyframes notif-progress {
    from {
        transform: scaleX(1)
    }

    to {
        transform: scaleX(0)
    }
}

.footer-seo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem
}

.footer-seo-tags a {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: rgba(212, 165, 116, 0.08);
    border: 1px solid rgba(212, 165, 116, 0.18);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap
}

.footer-seo-tags a:hover {
    color: var(--primary-color);
    background: rgba(212, 165, 116, 0.16)
}

.video-card-meta {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary)
}

.views-count {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem
}

.legal-container {
    max-width: 860px;
    margin: 2rem auto;
    padding: 0 1rem
}

.legal-content h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem
}

.legal-content h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.5rem
}

.legal-section p,
.legal-section li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.5rem
}

.legal-section ul,
.legal-section ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem
}

.legal-section a {
    color: var(--accent-color, #667eea);
    text-decoration: underline
}

.contact-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0
}

.dmca-form-container {
    margin-top: 2rem
}

.dmca-form {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem
}

.dmca-form h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem
}

.form-group {
    margin-bottom: 1rem
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    background: var(--bg-secondary, #1a1512);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    box-sizing: border-box
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color, #667eea)
}

.checkbox-group {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start
}

.checkbox-group input {
    margin-top: 3px;
    flex-shrink: 0
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s
}

.submit-btn:hover {
    opacity: .88
}

.form-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px
}

.form-message.success {
    background: #1a3a1a;
    color: #6fcf6f
}

.form-message.error {
    background: #3a1a1a;
    color: #cf6f6f
}

.filter-page .main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start
}

@media (max-width:900px) {
    .filter-page .main-layout {
        grid-template-columns: 1fr
    }

    .filter-page .sidebar-column {
        display: none
    }
}

.filter-page .content-column {
    min-width: 0
}

.sidebar-column .sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1rem
}

.sidebar-banner-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center
}

.sidebar-banner-title {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: .1em;
    text-transform: uppercase
}

.filter-header {
    margin-bottom: 1.5rem
}

.filter-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem
}

.filter-description {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem
}

.filter-badge {
    background: var(--accent-color, #667eea);
    color: #fff;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .5)
}

@media (max-width:480px) {
    .video-player-stage .plyr__controls .plyr__volume {
        display: inline-flex !important;
        align-items: center;
        min-width: 0
    }

    .video-player-stage .plyr__controls .plyr__volume input[type="range"] {
        display: block !important;
        width: 60px !important;
        min-width: 0
    }

    .video-player-stage .plyr__controls [data-plyr="mute"] {
        padding: 0 0.35rem;
        margin: 0;
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        min-width: 36px;
        justify-content: center
    }

    .video-player-stage .plyr__time--duration {
        display: none !important
    }
}

.native-ads-container {
    min-height: 220px
}