/**
 * DR005 模板样式
 * 风格：白色背景 + 红色强调色（搜索型首页）
 * 基于 A6_wapsltmhl 风格
 */

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    line-height: 1.5;
    font-size: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}

/* 颗粒感噪点背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
}

a {
    text-decoration: none;
    color: #e0e0e0;
    transition: color .2s;
}

a:hover {
    color: #2299ff;
}

img {
    max-width: 100%;
    height: auto;
    border: none;
}

ul, ol {
    list-style: none;
}

button, input, select {
    font: inherit;
    border: none;
    outline: none;
    background: none;
}

/* 统一布局容器 - 全局宽度一致 */
.dr-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

/* 广告位 - banner */
.ad-banner { display: flex; flex-direction: column; gap: 0; padding: 0; line-height: 0; }
.ad-banner img { width: 100%; height: 65px; object-fit: fill; display: block; vertical-align: top; }
@media (max-width: 767px) { .ad-banner img { height: auto; } }

/* 头部导航 - 紧凑 */
.dr-header {
    background: transparent;
    padding: 8px 0;
}

.dr-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dr-logo {
    font-size: 20px;
    font-weight: 700;
    color: #2299ff;
}

.dr-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dr-nav-btn {
    font-size: 13px;
    color: #aaa;
    padding: 4px 8px;
}

.dr-nav-btn:hover {
    color: #2299ff;
}

/* 资源导航 - 自动换行 */
.dr-nav {
    padding: 8px 0;
}

.dr-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.dr-nav-item {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #ccc;
    background: #1a1a1a;
    border-radius: 20px;
    border: 1px solid #333;
    white-space: nowrap;
    transition: all .3s;
}

.dr-nav-item:hover,
.dr-nav-item.active {
    background: #2299ff;
    color: #fff;
    border-color: #2299ff;
}

/* 搜索栏 - 紧凑 */
.dr-search {
    padding: 10px 0;
}

.dr-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #333;
    border-radius: 25px;
    overflow: hidden;
    background: #1a1a1a;
}

.dr-search-select {
    padding: 10px 15px;
    font-size: 14px;
    color: #aaa;
    background: #1a1a1a;
    border-right: 1px solid #333;
    cursor: pointer;
}

.dr-search-input {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    color: #e0e0e0;
    background: #1a1a1a;
}

.dr-search-input::placeholder {
    color: #666;
}

.dr-search-btn {
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #2299ff;
    cursor: pointer;
    transition: background .2s;
}

.dr-search-btn:hover {
    background: #1a88dd;
}

/* 公告栏 - 紧凑 */
.dr-announcement {
    background: rgba(34,153,255,.1);
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #2299ff;
}

.dr-announcement-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #2299ff;
}

/* 热门标签云 - 自动换行 */
.dr-tags-title {
    font-size: 16px;
    font-weight: 600;
    color: #2299ff;
    margin: 12px 0 10px;
    text-align: center;
}

.dr-tags-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.dr-tag {
    padding: 5px 14px;
    font-size: 13px;
    border-radius: 16px;
    border: 1px solid #333;
    background: #1a1a1a;
    transition: all .2s;
}

.dr-tag:hover {
    background: #2299ff;
    color: #fff !important;
    border-color: #2299ff;
    transform: scale(1.02);
}

/* 随机颜色标签 */
.dr-tag.size0 { color: #ff6b6b; }
.dr-tag.size1 { color: #ffa94d; }
.dr-tag.size2 { color: #ffd43b; }
.dr-tag.size3 { color: #69db7c; }
.dr-tag.size4 { color: #38d9a9; }
.dr-tag.size5 { color: #4dabf7; }
.dr-tag.size6 { color: #748ffc; }
.dr-tag.size7 { color: #da77f2; }
.dr-tag.size8 { color: #f783ac; }
.dr-tag.size9 { color: #e599f7; }

/* 主内容区 */
.dr-main {
    padding: 12px 0;
}

/* 区块标题 */
.dr-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dr-section-title h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.dr-section-more {
    font-size: 13px;
    color: #2299ff;
}

/* 视频网格 */
.dr-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 768px) {
    .dr-grid {
        grid-template-columns: repeat(var(--grid-pad, 4), 1fr);
    }
}

@media (min-width: 1024px) {
    .dr-grid {
        grid-template-columns: repeat(var(--grid-pc, 5), 1fr);
    }
}

/* 视频卡片 */
.dr-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #252525;
    transition: transform .3s, border-color .3s;
}

.dr-card:hover {
    transform: translateY(-3px);
    border-color: #2299ff;
}

.dr-card-thumb {
    position: relative;
    overflow: hidden;
}

.dr-card-thumb-landscape {
    padding-top: 56.25%;
}

.dr-card-thumb-portrait {
    padding-top: 140%;
}

.dr-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

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

.dr-card-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 2px 6px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,.7);
    border-radius: 3px;
}

.dr-card-hd {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #2299ff;
    border-radius: 3px;
}

.dr-card-info {
    padding: 8px;
}

.dr-card-title {
    font-size: 13px;
    font-weight: 400;
    color: #ccc;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分页 */
.dr-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.dr-page-btn {
    padding: 8px 18px;
    font-size: 13px;
    color: #ccc;
    background: #1a1a1a;
    border-radius: 20px;
    border: 1px solid #333;
    cursor: pointer;
    transition: all .2s;
}

.dr-page-btn:hover,
.dr-page-btn.active {
    background: #2299ff;
    color: #fff;
    border-color: #2299ff;
}

/* 质量选择按钮 */
.dr-quality {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
}

.dr-quality-btn {
    padding: 8px 18px;
    font-size: 13px;
    color: #ccc;
    background: #1a1a1a;
    border-radius: 20px;
    border: 1px solid #333;
    cursor: pointer;
    transition: all .2s;
}

.dr-quality-btn:hover,
.dr-quality-btn.active {
    background: #2299ff;
    color: #fff;
    border-color: #2299ff;
}

/* 播放页 */
.dr-player-wrap {
    background: #000;
}

.dr-player {
    width: 100%;
    aspect-ratio: 16/9;
}

.dr-video-info {
    padding: 16px 0;
}

.dr-video-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.dr-video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #999;
}

.dr-video-meta a {
    color: #2299ff;
}

/* 底部 - 统一宽度 */
.dr-footer {
    background: #0f0f0f;
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #1a1a1a;
}

.dr-footer a {
    color: #2299ff;
}

/* 表单 */
.dr-form {
    max-width: 360px;
    margin: 0 auto;
    padding: 20px;
}

.dr-form-group {
    margin-bottom: 16px;
}

.dr-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #ccc;
}

.dr-form-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: #e0e0e0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    transition: border-color .2s;
}

.dr-form-input:focus {
    border-color: #2299ff;
}

.dr-form-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #2299ff;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s;
}

.dr-form-btn:hover {
    background: #1a88dd;
}

/* 广告位 */
.dr-ad-banner {
    max-width: 1200px;
    margin: 10px auto;
    padding: 0 12px;
}

.dr-ad-banner img {
    width: 100%;
    border-radius: 6px;
}

/* 骨架屏 */
.dr-skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 响应式调整 */
@media (max-width: 767px) {
    .dr-wrap {
        padding: 0 10px;
    }
    
    .dr-logo {
        font-size: 18px;
    }
    
    .dr-nav-item {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .dr-section-title h2 {
        font-size: 15px;
    }
    
    .dr-card-info {
        padding: 6px;
    }
    
    .dr-card-title {
        font-size: 12px;
    }
    
    .dr-tag {
        padding: 3px 10px;
        font-size: 11px;
    }
}
