/* 前台页面统一样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航 */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: #3498db;
}

/* 主要内容区域 */
.main-content {
    padding: 30px 0;
}

/* 英雄区域 */
.hero-section {
    text-align: center;
    margin-bottom: 30px;
}

.hero-title {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 25px;
}

/* 搜索框 */
.search-section {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
}



/* 搜索结果页面的搜索框（在results-container外部） */
.search-page .search-box {
    display: block;
    margin-bottom: 10px;
}

.search-form {
    display: flex;
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #3498db;
}

.search-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: #2980b9;
}

/* 推荐区域 */
.recommendations {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 1px;
}

.drama-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.drama-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    position: relative;
}

.drama-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #3498db;
}

.drama-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.drama-card:hover::before {
    transform: scaleX(1);
}

.drama-info {
    padding: 15px;
    position: relative;
}

.drama-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.drama-actors {
    font-size: 0.75rem;
    color: #7f8c8d;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.drama-card .drama-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #7f8c8d;
}

.drama-card .drama-meta::before {
    content: none;
}

.drama-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.drama-date::before {
    content: '📅';
    font-size: 0.7rem;
}

.drama-status {
    background: #e8f5e8;
    color: #27ae60;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 500;
}

.drama-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.drama-card .action-btn {
    flex: 1;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    outline: none;
}

.drama-card .btn-primary {
    background: #3498db;
    color: white;
}

.drama-card .btn-primary:hover {
    background: #2980b9;
}

.drama-card .btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e0e0e0;
}

.drama-card .btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* 搜索结果 */
.results-container {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.results-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
}

.results-count {
    color: #7f8c8d;
    font-size: 0.9rem;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 15px;
}

.drama-list {
    display: grid;
    gap: 15px;
}

.drama-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    position: relative;
}

.drama-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #3498db;
}

.drama-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.drama-item:hover::before {
    transform: scaleX(1);
}

/* 搜索结果页的元信息样式 */
.drama-item .drama-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #7f8c8d;
}

.drama-item .drama-meta::before {
    content: none;
}

.drama-link {
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
}

.drama-link:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.drama-link:active {
    transform: translateY(1px);
}

/* API来源标识 */
.source-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: normal;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
}

.page-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    text-decoration: none;
}

.page-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* 详情页样式 */
.back-link {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.back-link:hover {
    color: #2980b9;
}

.detail-container {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.drama-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.drama-title {
    font-size: 1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
}

.drama-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.drama-meta::before {
    content: '📅';
    font-size: 0.8rem;
}

.drama-info {
    display: block;
    margin-bottom: 25px;
}

.info-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e8e8e8;
    margin-bottom: 15px;
}

.info-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-content {
    color: #7f8c8d;
    line-height: 1.5;
    font-size: 0.9rem;
}

.info-content p {
    margin-bottom: 8px;
}

.info-content strong {
    color: #2c3e50;
}

/* 下载区域 */
.download-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.download-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.quark-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4CAF50 0%, #2196F3 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    margin-right: 10px;
}

.quark-brand {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.download-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 100px;
    justify-content: center;
}

.action-btn:hover {
    border-color: #2196F3;
    color: #2196F3;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.2);
}

.action-btn.download {
    color: #2196F3;
    border-color: #2196F3;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.action-btn.download:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 声明区域 */
.disclaimer-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.disclaimer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #856404;
    margin-bottom: 10px;
    text-align: center;
}

.disclaimer-content {
    color: #856404;
    line-height: 1.5;
    font-size: 0.85rem;
}

.disclaimer-content ol {
    margin-left: 15px;
    margin-top: 8px;
}

.disclaimer-content li {
    margin-bottom: 6px;
}

/* 相关推荐 */
.related-dramas {
    margin-top: 25px;
}

.related-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.related-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 1px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.related-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    position: relative;
}

.related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.related-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.related-item:hover::before {
    transform: scaleX(1);
}

.related-title-text {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
    font-size: 0.95rem;
}

.related-meta {
    color: #7f8c8d;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.related-meta::before {
    content: '📅';
    font-size: 0.7rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.empty-desc {
    font-size: 1rem;
    line-height: 1.6;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.no-results p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.back-home {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-home:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 底部 */
.footer {
    background: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-left {
    text-align: left;
}

.footer-right {
    display: flex;
    gap: 20px;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #3498db;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .nav {
        padding: 10px 0;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .search-section {
        padding: 20px;
        border-radius: 12px;
    }
    
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .recommendations {
        padding: 20px;
        border-radius: 12px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .drama-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .drama-info {
        padding: 12px;
    }
    
    .drama-actions {
        flex-direction: row;
        gap: 8px;
    }
    
    .action-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
        min-width: 0;
        flex: 1;
    }
    
    .results-container {
        padding: 20px;
        border-radius: 12px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .results-title {
        font-size: 1.2rem;
    }
    
    .results-count {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .drama-item {
        padding: 12px;
    }
    
    .drama-title {
        font-size: 0.85rem;
    }
    
    .drama-meta {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .drama-link {
        font-size: 0.8rem;
        padding: 4px 8px;
        white-space: nowrap;
    }
    
    .pagination {
        gap: 8px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .back-link {
        position: static;
        transform: none;
        margin-bottom: 10px;
        justify-content: center;
        font-size: 0.85rem;
    }
    
    .drama-title {
        font-size: 1.3rem;
    }
    
    .detail-container {
        padding: 15px;
        border-radius: 10px;
    }
    
    .download-section {
        padding: 12px;
    }
    
    .download-actions {
        flex-direction: row;
        gap: 10px;
    }
    
    .action-btn {
        flex: 1;
        min-width: auto;
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .related-item {
        padding: 12px;
    }
    
    .disclaimer-content {
        font-size: 0.8rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-left {
        text-align: center;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .search-section {
        padding: 15px;
    }
    
    .recommendations {
        padding: 15px;
    }
    
    .drama-info {
        padding: 10px;
    }
    
    .drama-actions {
        gap: 6px;
    }
    
    .action-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .search-box {
        padding: 12px;
    }
    
    .results-container {
        padding: 15px;
    }
    
    .drama-item {
        padding: 10px;
    }
    
    .drama-title {
        font-size: 0.8rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .detail-container {
        padding: 12px;
    }
    
    .drama-title {
        font-size: 1.2rem;
    }
    
    .info-section {
        padding: 15px;
    }
    
    .download-section {
        padding: 10px;
    }
    
    .action-btn {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
} 