/*
Theme Name: Hongguo Việt Nam
Theme URI: https://binhsuaaudio.site
Author: Hongguo VN
Description: Giao diện xem phim ngắn dark-mode phong cách Hongguo Việt Nam, hỗ trợ trình phát MP4-style ẩn link YouTube và phát toàn màn hình trên điện thoại.
Version: 1.0.0
Text Domain: hongguo-vn
*/

:root {
    --hg-bg: #101012;
    --hg-surface: #18181c;
    --hg-surface-2: #222228;
    --hg-border: rgba(255, 255, 255, 0.08);
    --hg-text: #f3f3f5;
    --hg-muted: #9a9aa6;
    --hg-accent: #ff5c00;
    --hg-accent-hover: #ff7726;
    --hg-pill: #232329;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--hg-bg);
    color: var(--hg-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

.hg-container {
    width: 100%;
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.hg-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(16, 16, 18, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hg-border);
}

.hg-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    gap: 20px;
}

.hg-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hg-logo-svg {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.hg-brand-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #ffffff 0%, #ffb284 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hg-brand-badge {
    font-size: 10px;
    font-weight: 700;
    background: var(--hg-accent);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.hg-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    margin-left: 16px;
}

.hg-nav a {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--hg-muted);
    transition: color 0.2s;
    white-space: nowrap;
}

.hg-nav a:hover,
.hg-nav a.is-active {
    color: #fff;
    font-weight: 600;
}

.hg-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hg-search-form {
    position: relative;
    width: 240px;
}

.hg-search-form input {
    width: 100%;
    height: 36px;
    background: var(--hg-surface-2);
    border: 1px solid var(--hg-border);
    border-radius: 999px;
    padding: 0 38px 0 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.hg-search-form input:focus {
    border-color: var(--hg-accent);
}

.hg-search-form button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--hg-muted);
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
}

/* Hero Banner */
.hg-hero {
    position: relative;
    padding: 34px 0 26px;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(255, 92, 0, 0.14) 0%, rgba(16, 16, 18, 0) 65%);
}

.hg-hero-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 14px;
    letter-spacing: 0.3px;
}

.hg-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #ff6a1a 0%, #e64d00 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(255, 92, 0, 0.28);
    transition: transform 0.18s, filter 0.18s;
}

.hg-hero-cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* Section Rows */
.hg-section {
    margin: 26px 0 38px;
}

.hg-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.hg-section-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.hg-section-more {
    font-size: 13px;
    color: var(--hg-muted);
    transition: color 0.2s;
}

.hg-section-more:hover {
    color: var(--hg-accent);
}

/* Horizontal Row / Grid of Drama Cards */
.hg-drama-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1200px) {
    .hg-drama-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hg-container {
        padding: 0 14px;
    }
    .hg-nav {
        display: none;
    }
    .hg-search-form {
        width: 150px;
    }
    .hg-hero-title {
        font-size: 21px;
    }
    .hg-drama-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .hg-drama-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

/* Drama Card */
.hg-card {
    display: flex;
    flex-direction: column;
    group: true;
}

.hg-card-poster {
    position: relative;
    aspect-ratio: 3 / 4.2;
    border-radius: 10px;
    overflow: hidden;
    background: var(--hg-surface-2);
    border: 1px solid var(--hg-border);
}

.hg-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hg-card:hover .hg-card-poster img {
    transform: scale(1.05);
}

.hg-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--hg-muted);
    font-size: 12px;
    gap: 6px;
    background: linear-gradient(145deg, #1e1e24, #141418);
}

.hg-card-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
}

.hg-card-title {
    margin: 9px 0 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #f1f1f4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hg-card:hover .hg-card-title {
    color: var(--hg-accent);
}

.hg-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.hg-tag-pill {
    font-size: 11px;
    color: var(--hg-muted);
    background: var(--hg-pill);
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Mobile Bottom Nav */
.hg-mobile-nav {
    display: none;
}
@media (max-width: 768px) {
    .hg-mobile-nav {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 10px 14px;
        border-bottom: 1px solid var(--hg-border);
        background: var(--hg-surface);
    }
    .hg-mobile-nav a {
        font-size: 13px;
        white-space: nowrap;
        color: var(--hg-muted);
        padding: 4px 10px;
        border-radius: 999px;
        background: var(--hg-surface-2);
    }
    .hg-mobile-nav a.is-active {
        color: #fff;
        background: var(--hg-accent);
    }
}

/* Single Watch Page */
.hg-watch-layout {
    padding: 24px 0 50px;
}

.hg-player-shell {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--hg-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    position: relative;
}

.hg-player-shell .plyr {
    --plyr-color-main: #ff5c00;
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* Hide YouTube branding/overlays where possible */
.hg-player-shell .plyr__video-embed iframe {
    pointer-events: none;
}

/* Custom Hongguo Brand Overlay inside .plyr (works in normal + portrait/landscape fullscreen) */
.hg-plyr-brand-br {
    position: absolute;
    right: 64px;
    bottom: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 16, 18, 0.96);
    border: 1px solid rgba(255, 92, 0, 0.55);
    padding: 4px 10px;
    border-radius: 6px;
    pointer-events: auto;
    user-select: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    transition: right 0.2s ease, bottom 0.2s ease;
}

.hg-plyr-brand-br svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hg-plyr-brand-br span {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.hg-plyr-top-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    z-index: 2;
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.92) 0%, rgba(10, 10, 12, 0) 100%);
    pointer-events: auto;
    display: flex;
    align-items: center;
    padding: 0 14px;
}

.hg-plyr-top-mask-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cover bottom-right YT corner even when controls hide */
.plyr--hide-controls .hg-plyr-brand-br {
    bottom: 10px;
    right: 10px;
}

@media (max-width: 768px) {
    .hg-plyr-brand-br {
        bottom: 8px;
        right: 58px;
        padding: 3px 8px;
    }
    .plyr--hide-controls .hg-plyr-brand-br {
        bottom: 8px;
        right: 8px;
    }
    .hg-plyr-brand-br span {
        font-size: 11px;
    }
}

.hg-movie-meta-box {
    max-width: 960px;
    margin: 22px auto 0;
    background: var(--hg-surface);
    border: 1px solid var(--hg-border);
    border-radius: 12px;
    padding: 20px;
}

.hg-movie-head {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.hg-movie-thumb {
    width: 96px;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--hg-surface-2);
}

.hg-movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hg-movie-info h1 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}

.hg-movie-desc {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--hg-muted);
}

/* Episodes Selector Below Player */
.hg-episodes-panel {
    max-width: 960px;
    margin: 18px auto 0;
    background: var(--hg-surface);
    border: 1px solid var(--hg-border);
    border-radius: 12px;
    padding: 20px;
}

.hg-episodes-panel h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hg-ep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.hg-ep-btn {
    background: var(--hg-surface-2);
    color: var(--hg-text);
    border: 1px solid var(--hg-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.18s;
}

.hg-ep-btn:hover {
    border-color: var(--hg-accent);
    color: #fff;
}

.hg-ep-btn.is-active {
    background: var(--hg-accent);
    border-color: var(--hg-accent);
    color: #fff;
}

/* Footer */
.hg-footer {
    border-top: 1px solid var(--hg-border);
    padding: 28px 0;
    margin-top: 40px;
    text-align: center;
    color: var(--hg-muted);
    font-size: 13px;
}
