/* Clean Professional Video Site - Green & White Theme */

:root {
    --clr-accent: #2d6a4f;
    --clr-accent-hover: #1b4332;
    --clr-accent-light: #52b788;
    --clr-accent-pale: #d8f3dc;
    --clr-text: #1c1c1e;
    --clr-text-muted: #555f6d;
    --clr-text-sub: #8a9bb0;
    --clr-bg: #f5f7f5;
    --clr-surface: #ffffff;
    --clr-surface2: #f0f4f1;
    --clr-border: #dde5de;
    --clr-border-dark: #b7c9bb;
    --clr-shadow: rgba(45, 106, 79, 0.08);
    --clr-shadow-md: rgba(45, 106, 79, 0.16);
    --r-base: 8px;
    --r-sm: 5px;
    --r-lg: 12px;
    --trans: all 0.25s ease;
    --max-w: 1060px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--clr-bg);
    color: var(--clr-text);
    font-size: 15px;
    line-height: 1.55;
    overflow-x: hidden;
}

/* ========== HEADER ========== */
.site-header {
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: 0 1px 6px var(--clr-shadow);
    padding: 0.65rem 0;
}

.site-header .wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 15px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
    justify-content: center;
}

.brand-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.brand-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--clr-accent);
    letter-spacing: -0.5px;
    line-height: 1;
    border-bottom: none;
    font-style: normal;
}

.brand-link:hover .brand-name {
    color: var(--clr-accent-hover);
}

.latest-domain-block {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--clr-accent-pale);
    border: 1px solid var(--clr-accent-light);
    border-radius: 6px;
    padding: 5px 14px;
}

.latest-domain-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--clr-accent);
    white-space: nowrap;
}

.latest-domain-val {
    font-size: 17px;
    font-weight: 700;
    color: var(--clr-accent-hover);
    letter-spacing: 0.2px;
    font-family: 'Courier New', monospace;
}

/* ========== LAYOUT ========== */
.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 15px;
}

.section-gap {
    padding: 8px 0;
}

/* ========== NAV ZONE ========== */
.nav-zone {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-base);
    overflow: hidden;
    box-shadow: 0 1px 4px var(--clr-shadow);
    margin-bottom: 10px;
}

.nav-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--clr-border);
}

.nav-strip:last-child {
    border-bottom: none;
}

.nav-strip .zone-tag {
    font-size: 13px;
    font-weight: 700;
    color: var(--clr-surface);
    background: var(--clr-accent);
    white-space: nowrap;
    width: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    flex-shrink: 0;
    border-right: 1px solid var(--clr-border-dark);
    text-align: center;
}

.nav-strip .zone-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 9px 8px;
    align-items: center;
}

.nav-strip .zone-links a {
    display: inline-block;
    color: var(--clr-text-muted);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--r-sm);
    transition: var(--trans);
    background: var(--clr-surface2);
    border: 1px solid var(--clr-border);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
}

.nav-strip .zone-links a:hover {
    background: var(--clr-accent);
    color: #fff;
    border-color: var(--clr-accent);
}

.nav-strip .zone-links a.active {
    background: var(--clr-accent);
    color: #fff;
    border-color: var(--clr-accent);
    font-weight: 600;
}

/* ========== SEARCH ========== */
.search-bar {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-base);
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.search-bar form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.search-bar input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 9px 14px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-sm);
    background: var(--clr-bg);
    color: var(--clr-text);
    font-size: 14px;
    outline: none;
    transition: var(--trans);
}

.search-bar input[type="text"]:focus {
    border-color: var(--clr-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.search-bar input[type="text"]::placeholder {
    color: var(--clr-text-sub);
}

.search-bar button {
    padding: 9px 16px;
    border: none;
    border-radius: var(--r-sm);
    background: var(--clr-accent);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-bar button:hover {
    background: var(--clr-accent-hover);
    box-shadow: 0 4px 12px var(--clr-shadow-md);
}

/* ========== HOT TAGS ========== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 12px;
    background: var(--clr-surface);
    border-radius: var(--r-base);
    margin-bottom: 10px;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.tag-item {
    padding: 5px 13px;
    background: var(--clr-surface2);
    border-radius: 20px;
    color: var(--clr-text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans);
    border: 1px solid var(--clr-border);
}

.tag-item:hover {
    background: var(--clr-accent);
    color: #fff;
    border-color: var(--clr-accent);
}

/* ========== SECTION BLOCKS ========== */
.block-wrap {
    margin-bottom: 14px;
}

.block-inner {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-base);
    padding: 14px;
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.block-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--clr-border);
    position: relative;
}

.block-head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--clr-accent);
}

.block-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--clr-text);
    margin: 0;
    letter-spacing: -0.2px;
}

.block-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--trans);
}

.block-title a:hover {
    color: var(--clr-accent);
}

/* ========== CARD GRID ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
}

.card-grid li {
    position: relative;
}

.card-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm);
    aspect-ratio: 600 / 350;
    background: var(--clr-surface2);
    border: 1px solid var(--clr-border);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.card-thumb:hover {
    box-shadow: 0 4px 14px var(--clr-shadow-md);
}

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

.card-thumb::before {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(255,255,255,0.9);
    background: rgba(27, 67, 50, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card-thumb:hover::before {
    opacity: 1;
}

.card-meta {
    padding: 8px 0 0;
}

.card-meta h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.card-meta h5 a {
    color: var(--clr-text);
    text-decoration: none;
    transition: var(--trans);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta h5 a:hover {
    color: var(--clr-accent);
}

/* ========== VIDEO PLAYER ========== */
.video-container {
    width: 100%;
    height: 600px;
    max-height: 640px;
    margin-bottom: 16px;
    background: #000;
    border-radius: var(--r-base);
    overflow: hidden;
    box-shadow: 0 4px 18px var(--clr-shadow-md);
    position: relative;
}

.video-container iframe,
.video-container video,
.video-container #video-container {
    width: 100%;
    height: 100%;
    border: none;
}

.MacPlayer {
    background: #000;
    border-radius: var(--r-base);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 6px 24px var(--clr-shadow-md);
}

/* ========== TORRENT CAPTURE ========== */
.torrent-capture-grid {
    width: 100%;
}

.torrent-capture-grid picture,
.torrent-capture-grid img,
.torrent-capture-grid .img_item img {
    width: 100%;
    height: auto;
    border-radius: var(--r-sm);
    border: 1px solid var(--clr-border);
    display: block;
}

.torrent-capture-grid .img_item {
    width: 100%;
}

/* ========== DOWNLOAD BUTTONS ========== */
.dl-actions {
    text-align: center;
    padding: 14px;
    background: var(--clr-surface);
    border-radius: var(--r-base);
    margin: 14px 0;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.btn-action {
    display: inline-block;
    padding: 10px 22px;
    background: var(--clr-accent);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--trans);
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

.btn-action:hover {
    background: var(--clr-accent-hover);
    box-shadow: 0 4px 14px var(--clr-shadow-md);
}

/* ========== SHARE SECTION ========== */
.share-section {
    background: var(--clr-surface);
    border-radius: var(--r-base);
    padding: 16px;
    margin: 14px 0;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-url-display {
    background: var(--clr-surface2);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.share-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--clr-accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-url {
    font-size: 12px;
    color: var(--clr-text-muted);
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Courier New', monospace;
}

.share-copy-btn {
    padding: 10px 20px;
    background: var(--clr-accent);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--trans);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-copy-btn:hover {
    background: var(--clr-accent-hover);
    box-shadow: 0 4px 12px var(--clr-shadow-md);
}

.share-icon {
    font-size: 16px;
}

/* ========== PAGINATION ========== */
.page_info_div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 18px 0;
}

.a_page_info,
.page_info_focus {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--r-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--trans);
    min-width: 36px;
    text-align: center;
}

.a_page_info {
    background: var(--clr-surface);
    color: var(--clr-text);
    border: 1px solid var(--clr-border);
}

.a_page_info:hover {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    color: #fff;
}

.page_info_focus {
    background: var(--clr-accent);
    color: #fff;
    border: 1px solid var(--clr-accent);
    cursor: default;
}

/* ========== FRIENDLY LINKS ========== */
.links-panel {
    margin-bottom: 10px;
}

.links-body {
    padding: 12px;
    background: var(--clr-surface);
    border-radius: var(--r-base);
    border: 1px solid var(--clr-border);
}

.links-body dl {
    margin: 0;
}

.links-body dd {
    display: inline-block;
    margin: 3px 4px;
}

.links-body a {
    color: var(--clr-accent);
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans);
}

.links-body a:hover {
    color: var(--clr-accent-hover);
    text-decoration: underline;
}

.pd5 {
    padding: 0 5px;
}

/* ========== FOOTER ========== */
.site-footer {
    padding: 22px 0;
    text-align: center;
    border-top: 1px solid var(--clr-border);
    margin-top: 20px;
    background: var(--clr-surface);
}

.site-footer p {
    margin: 6px 0;
    color: var(--clr-text-sub);
    font-size: 13px;
}

.site-footer a {
    color: var(--clr-text-sub);
    text-decoration: none;
    transition: var(--trans);
}

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

/* ========== MISC ========== */
.mhlleset-main {
    width: 100%;
}

.mhlleset-heading {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--clr-border);
    position: relative;
}

.mhlleset-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--clr-accent);
}

.mhlleset-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--clr-text);
    margin: 0;
}

.mhlleset-title a {
    color: inherit;
    text-decoration: none;
}

.mhlleset-title a:hover {
    color: var(--clr-accent);
}

/* legacy compat aliases */
.mhlleset {
    margin-bottom: 14px;
}

.thumbnail2-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
}

.thumbnail2-group li {
    position: relative;
}

.thumbnail2 {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm);
    aspect-ratio: 600 / 350;
    background: var(--clr-surface2);
    border: 1px solid var(--clr-border);
}

.thumbnail2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.thumbnail2:hover {
    box-shadow: 0 4px 14px var(--clr-shadow-md);
}

.thumbnail2:hover img {
    transform: scale(1.06);
}

.thumbnail2::before {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(255,255,255,0.9);
    background: rgba(27, 67, 50, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.thumbnail2:hover::before {
    opacity: 1;
}

.video-info {
    padding: 8px 0 0;
}

.video-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.video-info h5 a {
    color: var(--clr-text);
    text-decoration: none;
    transition: var(--trans);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-info h5 a:hover {
    color: var(--clr-accent);
}

/* compat for #ddab search wrapper */
#ddab {
    margin-bottom: 0;
}

/* clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* hide utilities */
.hide_mobile { display: block; }
.hide_pc { display: block; }

/* ========== RESPONSIVE ========== */
@media (min-width: 769px) {
    .hide_pc { display: none !important; }
}

@media (max-width: 768px) {
    .hide_mobile { display: none !important; }

    .wrap { padding: 0 8px; }

    .brand-name { font-size: 20px; }

    .latest-domain-block { padding: 4px 10px; gap: 6px; }
    .latest-domain-label { font-size: 10px; }
    .latest-domain-val { font-size: 15px; }

    .section-gap { padding: 5px 0; }

    /* Nav - mobile: 15% label + 85% links, 2 rows of 4 */
    .nav-strip .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 7px 3px;
    }

    .nav-strip .zone-links {
        width: 85%;
        gap: 4px;
        padding: 7px 4px;
        font-size: 12px;
    }

    .nav-strip .zone-links a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .thumbnail2-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .video-container {
        height: 56.25vw;
        max-height: 380px;
        margin-bottom: 12px;
    }

    .block-title, .mhlleset-title { font-size: 16px; }

    .search-bar { padding: 10px; }
    .search-bar input[type="text"] { min-width: 90px; font-size: 13px; padding: 8px 10px; }
    .search-bar button { padding: 8px 10px; font-size: 12px; }

    .dl-actions { padding: 10px; gap: 8px; }
    .btn-action { padding: 9px 14px; font-size: 13px; }

    .share-section { padding: 10px; gap: 8px; }
    .share-url-display { padding: 8px 10px; }
    .share-label { font-size: 12px; }
    .share-url { font-size: 11px; }
    .share-copy-btn { padding: 9px 12px; font-size: 12px; }

    .page_info_div { padding: 14px 0; gap: 4px; }
    .a_page_info, .page_info_focus { padding: 6px 10px; font-size: 12px; }

    .tag-cloud { padding: 10px; gap: 6px; }
    .tag-item { font-size: 12px; padding: 4px 10px; }

    .mhlleset { margin-bottom: 10px; }
    .block-wrap { margin-bottom: 10px; }
}

@media (max-width: 480px) {
    .brand-name { font-size: 18px; }
    .latest-domain-val { font-size: 14px; }

    .nav-strip .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .nav-strip .zone-links {
        width: 85%;
        gap: 3px;
        padding: 6px 3px;
    }

    .nav-strip .zone-links a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }

    .thumbnail2-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .video-container {
        height: 56.25vw;
        max-height: 280px;
    }

    .video-info h5, .card-meta h5 { font-size: 12px; }
    .mhlleset-title, .block-title { font-size: 15px; }

    .btn-action { padding: 8px 10px; font-size: 12px; }

    .share-section { padding: 8px; gap: 5px; }
    .share-copy-btn { padding: 8px 10px; font-size: 11px; }
}

/* Large screen: ensure 14px min for nav on tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .nav-strip .zone-links a { font-size: 14px; }
}
