/* SpiegelEdge VideoSite Template — Der Spiegel inspired */

:root {
    --spiegel:      #c0392b;   /* Spiegel burnt red-orange */
    --spiegel-dk:   #9a2a1e;
    --spiegel-lt:   #d44;
    --spiegel-bar:  #c0392b;   /* top bar bg */
    --white:        #ffffff;
    --bg-page:      #f4f3f1;   /* warm off-white paper feel */
    --bg-white:     #ffffff;
    --bg-light:     #fafaf8;
    --bg-panel:     #f0efed;
    --txt-main:     #111111;
    --txt-sub:      #333333;
    --txt-muted:    #888888;
    --txt-light:    #aaaaaa;
    --border:       #e0dedd;
    --border-dk:    #c8c6c3;
    --shadow:       rgba(0,0,0,0.06);
    --shadow-md:    rgba(0,0,0,0.13);
    --rad:          3px;
    --rad-sm:       2px;
    --ease:         all 0.18s ease;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-page);
    color: var(--txt-main);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

/* ===== TOPBAR — Spiegel burnt orange ===== */
.sg-bar {
    background: var(--spiegel-bar);
    padding: 0.6rem 0;
}

.sg-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex-wrap: nowrap;
}

.sg-logo {
    text-decoration: none;
    font-size: 24px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-style: normal;
    white-space: nowrap;
}
.sg-logo:hover { opacity: 0.88; }

.sg-domain-block {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--rad);
    padding: 5px 14px;
}
.sg-domain-lbl {
    font-size: 11px;
    color: rgba(255,255,255,0.72);
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.sg-domain-str {
    font-size: 16px;
    font-weight: 800;
    color: var(--white);
    white-space: nowrap;
}

/* ===== WHITE SECONDARY NAV BAR ===== */
.sg-subnav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shadow);
}
.sg-subnav-inner {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sg-subnav-inner::-webkit-scrollbar { display: none; }
.sg-subnav-inner a {
    display: flex;
    align-items: center;
    padding: 10px 13px;
    color: var(--txt-sub);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: var(--ease);
    flex-shrink: 0;
}
.sg-subnav-inner a:first-child {
    color: var(--spiegel);
    border-bottom-color: var(--spiegel);
}
.sg-subnav-inner a:hover {
    color: var(--spiegel);
    border-bottom-color: var(--spiegel);
}

/* ===== LAYOUT ===== */
.sg-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}
.sg-sec { padding: 8px 0; }

/* ===== NAV PANEL ===== */
.sg-nav-panel {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--spiegel);
    border-radius: var(--rad);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 1px 5px var(--shadow);
}
.sg-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}
.sg-nav-row:last-child { border-bottom: none; }

.sg-zone-lbl {
    font-size: 13px;
    font-weight: 800;
    color: var(--white);
    background: var(--spiegel);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.sg-cat-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 7px 10px;
    align-items: center;
    background: var(--bg-white);
}
.sg-cat-links a {
    display: inline-block;
    color: var(--txt-sub);
    text-decoration: none;
    padding: 4px 3px;
    border-radius: var(--rad-sm);
    transition: var(--ease);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}
.sg-cat-links a:hover {
    background: var(--spiegel);
    color: var(--white);
    border-color: var(--spiegel-dk);
}
.sg-cat-links a.active {
    background: var(--spiegel);
    color: var(--white);
    border-color: var(--spiegel-dk);
    font-weight: 600;
}

/* ===== SEARCH ===== */
.sg-search-bar {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px var(--shadow);
}
.sg-search-bar form {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
}
.sg-search-bar input[type="text"] {
    flex: 1;
    min-width: 60px;
    padding: 8px 12px;
    border: 1.5px solid var(--border-dk);
    border-radius: var(--rad-sm);
    background: var(--bg-light);
    color: var(--txt-main);
    font-size: 13px;
    outline: none;
    transition: var(--ease);
}
.sg-search-bar input[type="text"]:focus {
    border-color: var(--spiegel);
    background: var(--white);
    box-shadow: 0 0 0 2px rgba(192,57,43,0.12);
}
.sg-search-bar input[type="text"]::placeholder { color: var(--txt-muted); }
.sg-search-bar button {
    padding: 8px 14px;
    border: none;
    border-radius: var(--rad-sm);
    background: var(--spiegel);
    color: var(--white);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}
.sg-search-bar button:hover { background: var(--spiegel-dk); }

/* ===== TAGS ===== */
.sg-tag-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 8px 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--spiegel);
    border-radius: var(--rad);
    margin-bottom: 8px;
    box-shadow: 0 1px 4px var(--shadow);
}
.sg-tag-pill {
    padding: 3px 11px;
    background: var(--bg-panel);
    border-radius: var(--rad-sm);
    color: var(--txt-sub);
    text-decoration: none;
    font-size: 12px;
    border: 1px solid var(--border);
    transition: var(--ease);
    font-weight: 500;
}
.sg-tag-pill:hover {
    background: var(--spiegel);
    color: var(--white);
    border-color: var(--spiegel-dk);
}

/* ===== SECTION BLOCK ===== */
.sg-block { margin-bottom: 14px; }

.sg-block-hd {
    display: flex;
    align-items: center;
    padding-bottom: 7px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--border);
    position: relative;
}
.sg-block-hd::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 44px; height: 2px;
    background: var(--spiegel);
}

.sg-block-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--txt-main);
    margin: 0;
    letter-spacing: -0.2px;
}
.sg-block-title a { color: inherit; text-decoration: none; }
.sg-block-title a:hover { color: var(--spiegel); }

/* ===== CARD GRID ===== */
.sg-film-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
}
.sg-film-grid li { animation: sgRise 0.34s ease backwards; }
.sg-film-grid li:nth-child(1){animation-delay:0.03s}
.sg-film-grid li:nth-child(2){animation-delay:0.06s}
.sg-film-grid li:nth-child(3){animation-delay:0.09s}
.sg-film-grid li:nth-child(4){animation-delay:0.12s}
.sg-film-grid li:nth-child(5){animation-delay:0.15s}
.sg-film-grid li:nth-child(6){animation-delay:0.18s}
.sg-film-grid li:nth-child(7){animation-delay:0.21s}
.sg-film-grid li:nth-child(8){animation-delay:0.24s}

@keyframes sgRise {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
}

.sg-cover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rad);
    aspect-ratio: 600 / 350;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    box-shadow: 0 1px 5px var(--shadow);
}
.sg-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}
.sg-cover:hover {
    box-shadow: 0 4px 14px var(--shadow-md);
    border-color: var(--spiegel);
}
.sg-cover:hover img { transform: scale(1.05); }
.sg-cover::after {
    content: '▶';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.95);
    font-size: 24px;
    background: rgba(0,0,0,0.25);
    border-radius: var(--rad);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}
.sg-cover:hover::after { opacity: 1; }
/* Spiegel-style orange bottom sweep */
.sg-cover::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 3px;
    background: var(--spiegel);
    z-index: 2;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.26s ease;
}
.sg-cover:hover::before { transform: scaleX(1); }

.sg-film-cap { padding: 6px 0 0; }
.sg-film-cap h5 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--txt-sub);
}
.sg-film-cap h5 a {
    color: inherit; text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--ease);
}
.sg-film-cap h5 a:hover { color: var(--spiegel); }

/* ===== PLAYER ===== */
.MacPlayer {
    background: #000;
    border-radius: var(--rad);
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 3px 14px var(--shadow-md);
}

/* ===== DETAIL TITLE ===== */
.sg-detail-head {
    line-height: 1.6;
    text-align: center;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    margin: 10px 0;
    word-break: break-all;
    background: var(--bg-white);
    border-radius: var(--rad);
    border: 1px solid var(--border);
    border-top: 3px solid var(--spiegel);
    box-shadow: 0 1px 4px var(--shadow);
    color: var(--txt-main);
}

/* ===== TORRENT INFO ===== */
.sg-meta-box {
    font-size: 14px;
    line-height: 1.9;
    padding: 16px 18px;
    background: var(--bg-white);
    border-radius: var(--rad);
    border: 1px solid var(--border);
    border-top: 3px solid var(--spiegel);
    margin: 8px 0;
    color: var(--txt-main);
    box-shadow: 0 1px 4px var(--shadow);
}
.sg-preview-frame { width: 100%; margin-top: 8px; }
.sg-preview-frame picture { display: block; width: 100%; }
.sg-preview-frame img {
    width: 100%; height: auto;
    border-radius: var(--rad-sm);
    border: 1px solid var(--border);
    display: block;
}

/* ===== ACTION BUTTONS ===== */
.sg-action-row {
    text-align: center;
    padding: 12px;
    background: var(--bg-white);
    border-radius: var(--rad);
    margin: 8px 0;
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    box-shadow: 0 1px 4px var(--shadow);
}
.down_btn {
    display: inline-block;
    padding: 9px 22px;
    background: var(--spiegel);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--rad-sm);
    font-weight: 700;
    font-size: 13px;
    transition: var(--ease);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}
.down_btn:hover {
    background: var(--spiegel-dk);
    box-shadow: 0 3px 10px rgba(192,57,43,0.3);
    transform: translateY(-1px);
}

/* ===== SHARE ===== */
.sg-share-zone {
    background: var(--bg-white);
    border-radius: var(--rad);
    padding: 10px 14px;
    margin: 8px 0;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 4px var(--shadow);
}
.share-url-display {
    background: var(--bg-light);
    border: 1px solid var(--border-dk);
    border-radius: var(--rad-sm);
    padding: 8px 12px;
    display: flex; align-items: center; gap: 8px;
    flex: 1; min-width: 0;
}
.share-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--txt-sub);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.share-url {
    font-size: 11px;
    color: var(--txt-muted);
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}
.share-copy-btn {
    padding: 8px 16px;
    background: var(--txt-main);
    color: var(--white);
    border: none;
    border-radius: var(--rad-sm);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--ease);
    display: flex; align-items: center; gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.share-copy-btn:hover { background: var(--spiegel); }
.share-icon { font-size: 14px; }

/* ===== PAGINATION ===== */
.page_info_div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 14px 0;
}
.a_page_info,
.page_info_focus {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--rad-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 34px;
    text-align: center;
}
.a_page_info {
    background: var(--bg-white);
    color: var(--txt-sub);
    border: 1px solid var(--border-dk);
}
.a_page_info:hover {
    background: var(--spiegel);
    border-color: var(--spiegel-dk);
    color: var(--white);
}
.page_info_focus {
    background: var(--spiegel);
    color: var(--white);
    border: 1px solid var(--spiegel-dk);
    cursor: default;
}

/* ===== FRIEND LINKS ===== */
.sg-flink-wrap {
    padding: 10px 12px;
    background: var(--bg-white);
    border-radius: var(--rad);
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shadow);
}
.sg-flink-wrap dl { margin: 0; }
.sg-flink-wrap dd { display: inline-block; margin: 3px; }
.sg-flink-wrap a { color: var(--spiegel); text-decoration: none; font-size: 13px; font-weight: 500; }
.sg-flink-wrap a:hover { color: var(--spiegel-dk); text-decoration: underline; }

/* ===== FOOTER ===== */
.sg-footer {
    padding: 16px 0;
    text-align: center;
    border-top: 3px solid var(--spiegel);
    margin-top: 14px;
    background: var(--txt-main);
}
.sg-footer p { margin: 4px 0; color: #888888; font-size: 12px; }
.sg-footer a { color: #888888; text-decoration: none; }
.sg-footer a:hover { color: var(--spiegel-lt); }

/* ===== UTILITIES ===== */
.hide_mobile { display: block; }
.hide_pc     { display: block; }
@media (min-width: 769px) { .hide_pc { display: none !important; } }
.clearfix::after { content:''; display:table; clear:both; }
img[data-original] { background: var(--bg-panel); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sg-wrap { padding: 0 8px; }
    .sg-sec  { padding: 6px 0; }
    .sg-bar  { padding: 0.42rem 0; }
    .sg-bar-inner { gap: 10px; }
    .sg-logo { font-size: 17px; letter-spacing: 0.5px; }
    .sg-domain-str { font-size: 13px; }
    .sg-domain-lbl { font-size: 10px; }
    .sg-subnav-inner a { padding: 8px 9px; font-size: 12px; }

    /* Nav: zone 15%, links 85%, 4-per-row, min 12px */
    .sg-zone-lbl   { width:15%; font-size:10px; padding:6px 2px; }
    .sg-cat-links  { width:85%; gap:3px; padding:6px 4px; }
    .sg-cat-links a {
        font-size: 12px;
        padding: 4px 1px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* Search one row, no wrap */
    .sg-search-bar form { flex-wrap: nowrap; }
    .sg-search-bar input[type="text"] { min-width:60px; padding:7px 8px; font-size:12px; }
    .sg-search-bar button { padding:7px 9px; font-size:11px; }

    /* Cards 2-per-row */
    .sg-film-grid { grid-template-columns:repeat(2,1fr); gap:8px; }

    .sg-film-cap h5  { font-size:11px; }
    .sg-block-title  { font-size:14px; }
    .sg-block        { margin-bottom:10px; }

    .sg-action-row { padding:9px 6px; gap:6px; }
    .down_btn      { padding:8px 14px; font-size:12px; }
    .sg-share-zone { padding:9px; flex-wrap:nowrap; }
    .share-url-display { padding:7px 10px; }
    .share-copy-btn { padding:8px 10px; font-size:11px; }

    .hide_mobile { display: none !important; }
}

@media (max-width: 480px) {
    .sg-logo { font-size:15px; }
    .sg-domain-str { font-size:12px; }
    .sg-subnav-inner a { padding:6px 7px; font-size:11px; }
    .sg-zone-lbl   { width:15%; font-size:10px; padding:5px 1px; }
    .sg-cat-links  { width:85%; gap:3px; padding:5px 3px; }
    .sg-cat-links a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }
    .sg-search-bar input[type="text"] { padding:6px 7px; font-size:11px; }
    .sg-search-bar button { padding:6px 8px; font-size:11px; }
    .sg-film-grid { grid-template-columns:repeat(2,1fr); gap:6px; }
    .down_btn { padding:7px 10px; font-size:11px; }
    .sg-action-row { gap:4px; }
}
