/**
 * 前台样式表
 * 深色高端主题设计，参考Netflix风格
 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background: #000;
    color: #f5f5f5;
    min-height: 100vh;
    padding: 10px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    background-attachment: fixed;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

/* 顶部导航栏 */
.header {
    padding: 0;
    margin-bottom: 0;
    background: #000;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    gap: 20px;
    border-bottom: 1px solid #222;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b00, #ffaa00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 6px 12px;
    border-radius: 8px;
    border: 2px solid #ff6b00;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.search-box {
    flex: 1;
    max-width: 600px;
}

.search-input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 25px;
    padding: 10px 20px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #ff6b00;
    background: #222;
}

.search-input::placeholder {
    color: #666;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    transition: all 0.3s;
    padding: 5px 8px;
    border-radius: 5px;
}

.header-btn:hover {
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.1);
}

.header-btn .icon {
    width: 22px;
    height: 22px;
    margin-bottom: 3px;
    stroke-width: 2;
}

.nav-tabs {
    display: flex;
    padding: 0 20px;
    gap: 0;
    background: #0a0a0a;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-item {
    color: #999;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    padding: 14px 20px;
    border-bottom: 3px solid transparent;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 107, 0, 0.1);
}

.nav-item.active {
    color: #ff6b00;
    border-bottom-color: #ff6b00;
}

/* 主内容区域 */
.main {
    padding: 20px 0;
    min-height: calc(100vh - 150px);
}

/* 标题样式 */
.section-title {
    text-align: center;
    font-size: 1.8rem;
    color: #fff;
    margin: 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff6b00;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b00, #ffaa00);
    border-radius: 2px;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1100px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .container {
        padding: 8px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .nav-item {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* 视频卡片 */
.video-card {
    background: rgba(30, 30, 30, 0.9);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(229, 9, 20, 0.3);
}

.video-cover {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    position: relative;
    display: block;
}

/* 播放按钮（放在video-cover内） */
.video-cover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.video-cover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-45%, -50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid #fff;
    z-index: 3;
    transition: all 0.3s ease;
}

.video-card:hover .video-cover::before {
    background: rgba(229, 9, 20, 0.85);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
}

.video-card:hover .video-cover::after {
    border-left-color: #fff;
    transform: translate(-45%, -50%) scale(1.05);
}

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-category {
    display: inline-block;
    font-size: 0.75rem;
    color: #f5c518;
    background: rgba(245, 197, 24, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(245, 197, 24, 0.3);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    padding: 10px 20px;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(229, 9, 20, 0.4);
    color: #f5f5f5;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background: rgba(229, 9, 20, 0.4);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
    transform: translateY(-3px);
}

.page-btn.active {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.7), rgba(245, 197, 24, 0.4));
    border: 1px solid rgba(245, 197, 24, 0.5);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #111;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.3);
    border: 1px solid #333;
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #e50914;
}

.step h2 {
    color: #fff;
    margin-bottom: 25px;
    text-align: center;
    font-size: 24px;
    background: linear-gradient(90deg, #e50914, #f5c518);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-content {
    padding: 20px 0;
}

.tip-text {
    text-align: center;
    margin-bottom: 15px;
    font-size: 16px;
    color: #aaa;
}

.tip-text strong {
    color: #f5c518;
    font-weight: 600;
}

.share-content {
    background: rgba(40, 40, 40, 0.9);
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    color: #f5f5f5;
    font-size: 15px;
    border-left: 4px solid #f5c518;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

/* 表单控件 */
.form-group {
    margin: 25px 0;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #333;
    background: rgba(40, 40, 40, 0.9);
    color: #f5f5f5;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #e50914;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
}

.form-control::placeholder {
    color: #666;
}

/* 按钮 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    width: 100%;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #e50914, #f5c518);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

.btn-upload {
    background: linear-gradient(135deg, #e50914, #f5c518);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

/* 上传区域 */
.upload-area {
    text-align: center;
    margin: 20px 0;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.preview-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e50914;
    box-shadow: 0 2px 10px rgba(229, 9, 20, 0.3);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 加载动画 */
.loading-spinner {
    border: 4px solid #222;
    border-top: 4px solid #e50914;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 网盘信息 */
.netdisk-info {
    background: rgba(40, 40, 40, 0.9);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    white-space: pre-line;
    line-height: 1.8;
    font-size: 15px;
    color: #f5f5f5;
    border-left: 4px solid #f5c518;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #aaa;
}

/* 加载状态 */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

/* 可复制的文本样式 */
.copyable-text {
    flex: 1;
    color: #f5f5f5;
    line-height: 1.6;
}

/* 复制按钮 */
.copy-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #f5c518, #e50914);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(245, 197, 24, 0.3);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 197, 24, 0.5);
}

.copy-btn:active {
    transform: translateY(0);
}

/* 页面加载遮罩 */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 遮罩显示时禁止页面滚动 */
body.overlay-active {
    overflow: hidden;
    height: 100vh;
}

/* 自定义标签样式 */
.custom-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
    transition: all 0.3s ease;
    cursor: pointer;
}

.custom-link:hover {
    color: #ff6b00;
    border-bottom-style: solid;
}

.custom-copy {
    color: inherit;
    cursor: pointer;
    border-bottom: 1px dashed currentColor;
    transition: all 0.3s ease;
    user-select: none;
}

.custom-copy:hover {
    color: #ff6b00;
    border-bottom-style: solid;
}

.custom-copy:active {
    transform: scale(0.98);
}

/* 移动端底部导航 */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    border-top: 1px solid #333;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    justify-content: space-around;
}

.nav-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    font-size: 11px;
    transition: all 0.3s;
    padding: 5px 8px;
    flex: 1;
}

.nav-bottom-item:hover,
.nav-bottom-item.active {
    color: #ff6b00;
}

.nav-bottom-item .nav-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 3px;
    stroke-width: 2;
}

.nav-bottom-item span {
    font-weight: 500;
}

.overlay-content {
    background: transparent;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}



.overlay-steps {
    background: transparent;
    padding: 20px 0;
    margin-bottom: 30px;
    text-align: left;
}

.overlay-steps h3 {
    color: #ff6b00;
    font-size: 2rem;
    margin-bottom: 15px;
}

.overlay-steps ul {
    list-style: decimal;
    padding-left: 20px;
    margin: 0;
}

.overlay-steps li {
    color: #fff;
    padding: 8px 0;
    line-height: 1.6;
    font-weight: 500;
    font-size: 1rem;
}

.overlay-unlock-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff6b00, #ffaa00);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
}

.overlay-unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6);
}

.overlay-unlock-btn:active {
    transform: translateY(0);
}

/* 移动端优化 */
@media (max-width: 768px) {
    /* 显示底部导航 */
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* 为底部导航留出空间 */
    body {
        padding-bottom: 70px;
    }
    
    .header-top {
        display: grid;
        grid-template-columns: auto 1fr auto;
        padding: 10px;
        gap: 10px;
        align-items: center;
    }
    
    .logo {
        font-size: 1.2rem;
        padding: 5px 10px;
        grid-column: 1;
    }
    
    .search-box {
        flex: 1;
        max-width: 100%;
        grid-column: 2;
    }
    
    .search-input {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .header-actions {
        gap: 5px;
        grid-column: 3;
    }
    
    .header-btn {
        font-size: 10px;
        padding: 3px 5px;
    }
    
    .header-btn .icon {
        width: 20px;
        height: 20px;
        margin-bottom: 2px;
    }
    
    .nav-tabs {
        padding: 0 10px;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .nav-item {
        padding: 12px 15px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin: 20px 0;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .overlay-content {
        padding: 25px;
        width: 95%;
    }
    
    .overlay-steps {
        padding: 15px 0;
    }
    
    .overlay-steps h3 {
        font-size: 2rem;
    }
    
    .overlay-steps li {
        font-size: 1rem;
        padding: 6px 0;
    }
    
    .overlay-unlock-btn {
        font-size: 1rem;
        padding: 12px 25px;
    }
    
    .share-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .copy-btn {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .container {
        padding: 8px;
    }
    
    .header-btn span:last-child {
        display: none;
    }
    
    .header-btn .icon {
        width: 18px;
        height: 18px;
    }
    
    .nav-item {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .video-cover::before {
        width: 40px;
        height: 40px;
    }
    
    .video-cover::after {
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-left: 16px solid #fff;
    }
    
    .video-info {
        padding: 8px;
    }
    
    .video-title {
        font-size: 0.9rem;
    }
    
    .video-category {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    
    .modal-content {
        padding: 20px;
        max-width: 95%;
        margin: 10% auto;
    }
    
    .step h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .tip-text {
        font-size: 14px;
    }
    
    .share-content {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .copy-btn {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* 错误提示样式 */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
