/* DarkStream Template - Deep Dark Video Site Style */

:root {
    --dk-bg:        #0d0d0d;
    --dk-surface:   #1a1a1a;
    --dk-surface2:  #242424;
    --dk-surface3:  #2e2e2e;
    --dk-border:    #333333;
    --dk-border-lt: #3d3d3d;
    --dk-text:      #e8e8e8;
    --dk-text-sub:  #aaaaaa;
    --dk-muted:     #666666;
    --dk-primary:   #ff6b35;
    --dk-primary-dk:#e05520;
    --dk-gold:      #f5c518;
    --dk-blue:      #4a9eff;
    --dk-grad:      linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
    --dk-shadow:    0 2px 12px rgba(0,0,0,0.5);
    --dk-shadow-lg: 0 6px 28px rgba(0,0,0,0.7);
    --dk-r:         4px;
    --dk-r-md:      6px;
    --dk-r-lg:      10px;
    --dk-ease:      cubic-bezier(0.25,0.46,0.45,0.94);
    --dk-dur:       0.22s;
}

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

body {
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    background: var(--dk-bg);
    color: var(--dk-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   BRANDING  (不置顶)
============================================================ */

.dk-branding {
    background: var(--dk-surface);
    border-bottom: 1px solid var(--dk-border);
    padding: 12px 0;
}

.dk-brand-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.dk-logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: opacity var(--dk-dur) var(--dk-ease);
}
.dk-logo-link:hover { opacity: 0.8; }

.dk-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--dk-grad);
    border-radius: var(--dk-r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255,107,53,0.4);
}

.dk-site-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--dk-text);
    letter-spacing: -0.3px;
    line-height: 1;
}

.dk-domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,107,53,0.1);
    border: 1px solid rgba(255,107,53,0.4);
    border-radius: 20px;
    padding: 5px 14px;
    animation: dk-pulse 3s ease-in-out infinite;
}

@keyframes dk-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,107,53,0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(255,107,53,0); }
}

.dk-domain-badge {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--dk-primary);
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.dk-domain-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--dk-text);
    white-space: nowrap;
}

/* ============================================================
   PC NAV ROWS  (dark strip)
============================================================ */

.dk-nav-block {
    background: var(--dk-surface);
    border-bottom: 1px solid var(--dk-border);
}

.dk-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--dk-border);
    overflow: hidden;
    width: 100%;
}
.dk-nav-row:last-child { border-bottom: none; }

.dk-nav-zone {
    font-size: 11px;
    font-weight: 700;
    color: var(--dk-primary);
    background: rgba(255,107,53,0.08);
    width: 10%;
    min-width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.3;
    box-shadow: inset -1px 0 0 var(--dk-border);
}

.dk-nav-links {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 6px 8px;
    width: 90%;
    align-items: center;
}

.dk-nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dk-text-sub);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--dk-r);
    border: 1px solid var(--dk-border);
    background: var(--dk-surface2);
    font-size: 13px;
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 30px;
    transition: background var(--dk-dur) var(--dk-ease), color var(--dk-dur) var(--dk-ease), border-color var(--dk-dur) var(--dk-ease);
}

.dk-nav-links a:hover {
    background: var(--dk-primary);
    color: #fff;
    border-color: var(--dk-primary);
}

.dk-nav-links a.active {
    background: var(--dk-primary);
    color: #fff;
    border-color: var(--dk-primary);
    font-weight: 600;
}

/* ============================================================
   MOBILE NAV ROWS  (hidden on PC)
============================================================ */

.dk-mob-nav {
    background: var(--dk-surface);
    border-bottom: 1px solid var(--dk-border);
    display: none;
}

.dk-mob-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--dk-border);
    overflow: hidden;
    width: 100%;
}
.dk-mob-row:last-child { border-bottom: none; }

.dk-mob-zone {
    font-size: 10px;
    font-weight: 700;
    color: var(--dk-primary);
    background: rgba(255,107,53,0.1);
    width: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: inset -2px 0 0 var(--dk-primary);
    line-height: 1.3;
}

.dk-mob-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 5px 5px;
    width: 85%;
    align-content: start;
}

.dk-mob-links a {
    display: block;
    color: var(--dk-text-sub);
    text-decoration: none;
    padding: 5px 2px;
    border-radius: var(--dk-r);
    border: 1px solid var(--dk-border);
    background: var(--dk-surface2);
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background var(--dk-dur) var(--dk-ease), color var(--dk-dur) var(--dk-ease), border-color var(--dk-dur) var(--dk-ease);
}

.dk-mob-links a:hover,
.dk-mob-links a.active {
    background: var(--dk-primary);
    color: #fff;
    border-color: var(--dk-primary);
}
.dk-mob-links a.active { font-weight: 600; }

/* ============================================================
   LAYOUT
============================================================ */

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.content   { padding: 14px 0; }

/* ============================================================
   SEARCH BOX
============================================================ */

.dk-search-wrap {
    background: var(--dk-surface);
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-r-lg);
    padding: 12px;
    margin-bottom: 14px;
}

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

.dk-search-wrap input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 10px 15px;
    border: 1px solid var(--dk-border-lt);
    border-radius: var(--dk-r-md);
    background: var(--dk-surface2);
    color: var(--dk-text);
    font-size: 14px;
    outline: none;
    transition: border-color var(--dk-dur) var(--dk-ease), box-shadow var(--dk-dur) var(--dk-ease);
    font-family: inherit;
}

.dk-search-wrap input[type="text"]:focus {
    border-color: var(--dk-primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}

.dk-search-wrap input[type="text"]::placeholder { color: var(--dk-muted); }

.dk-search-wrap button {
    padding: 10px 18px;
    border: none;
    border-radius: var(--dk-r-md);
    background: var(--dk-grad);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity var(--dk-dur) var(--dk-ease), box-shadow var(--dk-dur) var(--dk-ease);
    font-family: inherit;
    letter-spacing: 0.2px;
}

.dk-search-wrap button:hover {
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(255,107,53,0.4);
}

/* ============================================================
   HOT TAGS
============================================================ */

.dk-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 12px;
    background: var(--dk-surface);
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-r-lg);
    margin-bottom: 14px;
}

.dk-tag {
    padding: 4px 12px;
    background: var(--dk-surface2);
    border: 1px solid var(--dk-border-lt);
    border-radius: 12px;
    color: var(--dk-text-sub);
    text-decoration: none;
    font-size: 12px;
    line-height: 1;
    transition: background var(--dk-dur) var(--dk-ease), color var(--dk-dur) var(--dk-ease), border-color var(--dk-dur) var(--dk-ease);
}

.dk-tag:hover {
    background: var(--dk-primary);
    color: #fff;
    border-color: var(--dk-primary);
}

/* ============================================================
   SECTION BLOCKS
============================================================ */

.dk-section { margin-bottom: 28px; }

.dk-sec-hd {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dk-border);
    position: relative;
}

.dk-sec-hd::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--dk-grad);
    border-radius: 1px;
}

.dk-sec-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dk-text);
    margin: 0;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dk-sec-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 18px;
    background: var(--dk-grad);
    border-radius: 2px;
    flex-shrink: 0;
}

.dk-sec-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dk-dur) var(--dk-ease);
}
.dk-sec-title a:hover { color: var(--dk-primary); }

/* ============================================================
   CARD GRID  (PC: 4col  Mobile: 2col)
============================================================ */

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

@keyframes dk-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dk-grid li:nth-child(1) { animation: dk-in 0.3s var(--dk-ease) 0.04s both; }
.dk-grid li:nth-child(2) { animation: dk-in 0.3s var(--dk-ease) 0.08s both; }
.dk-grid li:nth-child(3) { animation: dk-in 0.3s var(--dk-ease) 0.12s both; }
.dk-grid li:nth-child(4) { animation: dk-in 0.3s var(--dk-ease) 0.16s both; }
.dk-grid li:nth-child(5) { animation: dk-in 0.3s var(--dk-ease) 0.20s both; }
.dk-grid li:nth-child(6) { animation: dk-in 0.3s var(--dk-ease) 0.24s both; }
.dk-grid li:nth-child(7) { animation: dk-in 0.3s var(--dk-ease) 0.28s both; }
.dk-grid li:nth-child(8) { animation: dk-in 0.3s var(--dk-ease) 0.32s both; }

.dk-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--dk-r-md);
    aspect-ratio: 600 / 350;
    background: var(--dk-surface2);
    border: 1px solid var(--dk-border);
    transition: box-shadow var(--dk-dur) var(--dk-ease), transform var(--dk-dur) var(--dk-ease);
}

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

.dk-thumb:hover {
    box-shadow: 0 0 0 2px var(--dk-primary), var(--dk-shadow);
    transform: translateY(-2px);
}
.dk-thumb:hover img { transform: scale(1.06); }

.dk-thumb::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(255,255,255,0.92);
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity var(--dk-dur) var(--dk-ease);
    z-index: 1;
}
.dk-thumb:hover::after { opacity: 1; }

.dk-card-info { padding: 7px 0 0; }

.dk-card-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

.dk-card-info h5 a {
    color: var(--dk-text-sub);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--dk-dur) var(--dk-ease);
}
.dk-card-info h5 a:hover { color: var(--dk-primary); }

/* ============================================================
   VIDEO PLAYER
============================================================ */

.dk-player {
    width: 100%;
    height: 640px;
    max-height: 640px;
    background: #000;
    border-radius: var(--dk-r-lg);
    overflow: hidden;
    box-shadow: var(--dk-shadow-lg);
    margin-bottom: 18px;
    position: relative;
}

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

.MacPlayer {
    background: #000;
    border-radius: var(--dk-r-lg);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: var(--dk-shadow-lg);
}

/* ============================================================
   DETAIL TITLE BAR
============================================================ */

.dk-detail-bar {
    line-height: 1.8;
    text-align: center;
    padding: 16px 20px;
    font-size: 17px;
    margin: 16px 0;
    word-break: break-all;
    background: var(--dk-surface);
    border-radius: var(--dk-r-lg);
    border: 1px solid var(--dk-border-lt);
}

.dk-cat-link {
    color: var(--dk-primary);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
    transition: color var(--dk-dur) var(--dk-ease);
}
.dk-cat-link:hover { color: #ff9500; }

/* ============================================================
   INFO PANEL
============================================================ */

.dk-info-panel {
    font-size: 15px;
    line-height: 2;
    padding: 20px 24px;
    background: var(--dk-surface);
    border-radius: var(--dk-r-lg);
    border: 1px solid var(--dk-border);
    margin: 16px 0;
}

/* ============================================================
   TORRENT PREVIEW  (single image 100% width)
============================================================ */

.dk-preview { width: 100%; margin-top: 12px; }
.dk-preview picture { display: block; width: 100%; }

.dk-preview picture img {
    width: 100%;
    height: auto;
    border-radius: var(--dk-r-md);
    border: 1px solid var(--dk-border);
    display: block;
}

/* ============================================================
   ACTION BUTTONS  (centered)
============================================================ */

.dk-actions {
    text-align: center;
    padding: 16px;
    background: var(--dk-surface);
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-r-lg);
    margin: 16px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.dk-btn {
    display: inline-block;
    padding: 11px 24px;
    background: var(--dk-grad);
    color: #fff;
    text-decoration: none;
    border-radius: var(--dk-r-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity var(--dk-dur) var(--dk-ease), box-shadow var(--dk-dur) var(--dk-ease);
    letter-spacing: 0.2px;
    font-family: inherit;
}

.dk-btn:hover {
    opacity: 0.87;
    box-shadow: 0 5px 18px rgba(255,107,53,0.45);
}

/* ============================================================
   SHARE SECTION
============================================================ */

.dk-share {
    background: var(--dk-surface);
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-r-lg);
    padding: 14px 16px;
    margin: 14px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dk-share-url {
    flex: 1;
    min-width: 0;
    background: var(--dk-surface2);
    border: 1px solid var(--dk-border-lt);
    border-radius: var(--dk-r-md);
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dk-share-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--dk-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.dk-share-uri {
    font-size: 12px;
    color: var(--dk-muted);
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dk-share-btn {
    padding: 9px 18px;
    background: var(--dk-grad);
    color: #fff;
    border: none;
    border-radius: var(--dk-r-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity var(--dk-dur) var(--dk-ease), box-shadow var(--dk-dur) var(--dk-ease);
    font-family: inherit;
}

.dk-share-btn:hover {
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(255,107,53,0.4);
}

.dk-share-icon { font-size: 15px; }

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

.dk-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.dk-pg-link {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--dk-r-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    min-width: 36px;
    text-align: center;
    background: var(--dk-surface);
    color: var(--dk-text-sub);
    border: 1px solid var(--dk-border);
    transition: background var(--dk-dur) var(--dk-ease), color var(--dk-dur) var(--dk-ease), border-color var(--dk-dur) var(--dk-ease);
}

.dk-pg-link:hover {
    background: var(--dk-primary);
    color: #fff;
    border-color: var(--dk-primary);
}

.dk-pg-cur {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--dk-r-md);
    background: var(--dk-grad);
    color: #fff;
    border: 1px solid var(--dk-primary);
    font-weight: 700;
    font-size: 13px;
    min-width: 36px;
    text-align: center;
    cursor: default;
}

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

.dk-footer {
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--dk-border);
    margin-top: 32px;
    background: var(--dk-surface);
}

.dk-footer p { margin: 5px 0; color: var(--dk-muted); font-size: 12px; }
.dk-footer a { color: var(--dk-muted); text-decoration: none; transition: color var(--dk-dur) var(--dk-ease); }
.dk-footer a:hover { color: var(--dk-primary); }

/* ============================================================
   FRIENDLY LINKS
============================================================ */

.dk-flinks {
    padding: 12px;
    background: var(--dk-surface);
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-r-md);
}

.dk-flinks dl { margin: 0; }
.dk-flinks dd { display: inline-block; margin: 3px 4px; }
.dk-flinks a { color: var(--dk-muted); text-decoration: none; font-size: 13px; transition: color var(--dk-dur) var(--dk-ease); }
.dk-flinks a:hover { color: var(--dk-primary); }
.pd5 { padding: 3px 5px; }

/* ============================================================
   MISC
============================================================ */

img[data-original] { background: var(--dk-surface2); }
.clearfix::after   { content: ""; display: table; clear: both; }

/* ============================================================
   PC (>=769px)
============================================================ */

@media (min-width: 769px) {
    .dk-grid      { grid-template-columns: repeat(4, 1fr); }
    .hide-mob     { display: block; }
    .hide-pc      { display: none !important; }
    .dk-mob-nav   { display: none !important; }
    .dk-nav-block { display: block; }
}

/* ============================================================
   MOBILE (<=768px)
============================================================ */

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

    .dk-branding    { padding: 10px 0; }
    .dk-brand-inner { gap: 10px; }
    .dk-site-name   { font-size: 19px; }
    .dk-domain-val  { font-size: 12px; }

    .dk-nav-block { display: none !important; }
    .dk-mob-nav   { display: block; }

    .dk-mob-zone  { font-size: 10px; }
    .dk-mob-links a { font-size: 14px; padding: 5px 2px; }

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

    .dk-player { height: 56.25vw; max-height: 380px; margin-bottom: 12px; }

    .dk-search-wrap input[type="text"] { min-width: 100px; padding: 9px 12px; font-size: 13px; }
    .dk-search-wrap button { padding: 9px 12px; font-size: 12px; }

    .dk-btn { padding: 9px 14px; font-size: 12px; }
    .dk-actions { gap: 7px; }

    .dk-share { padding: 12px; gap: 8px; }
    .dk-share-lbl { font-size: 10px; }
    .dk-share-uri { font-size: 10px; }
    .dk-share-btn { padding: 8px 11px; font-size: 11px; }

    .dk-sec-title { font-size: 16px; }
    .dk-card-info h5 { font-size: 12px; }

    .dk-pg-link, .dk-pg-cur { padding: 6px 10px; font-size: 12px; min-width: 32px; }

    .dk-footer { padding: 16px 0; margin-top: 20px; }

    .hide-mob { display: none !important; }
    .hide-pc  { display: block; }
}

/* ============================================================
   SMALL MOBILE (<=480px)
============================================================ */

@media (max-width: 480px) {
    .dk-site-name { font-size: 17px; }
    .dk-mob-zone  { font-size: 10px; }
    .dk-mob-links { gap: 3px; padding: 4px 3px; }
    .dk-mob-links a { font-size: 12px; padding: 4px 1px; }
    .dk-grid { gap: 8px; }
    .dk-card-info h5 { font-size: 11px; }
    .dk-search-wrap input[type="text"] { min-width: 80px; padding: 8px 10px; font-size: 12px; }
    .dk-search-wrap button { padding: 8px 9px; font-size: 11px; }
    .dk-actions { gap: 5px; padding: 12px 8px; }
    .dk-btn { padding: 8px 10px; font-size: 11px; }
    .dk-share { padding: 9px; gap: 6px; }
    .dk-share-btn { padding: 7px 9px; font-size: 11px; }
}
