/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #0a0a0a;
    color: #fff;
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #e94560;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav a:hover {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
}

/* 搜索区域 */
.search-section {
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a2e 100%);
}

.search-title {
    font-size: 48px;
    margin-bottom: 40px;
    text-align: center;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 600px;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 16px 24px;
    font-size: 16px;
    border: none;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
}

/* 平台选择 */
.platform-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.platform-tab {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.platform-tab:hover {
    background: rgba(233, 69, 96, 0.2);
}

.platform-tab.active {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.3);
}

/* 结果列表 */
.results-section {
    padding: 40px 0;
    min-height: calc(100vh - 70px);
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #fff;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.result-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.result-info {
    padding: 12px;
}

.result-title {
    font-size: 14px;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-desc {
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: rgba(233, 69, 96, 0.3);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #e94560;
}

/* 详情页 */
.detail-section {
    padding: 40px 0;
}

.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.detail-poster {
    width: 200px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.detail-content {
    flex: 1;
    min-width: 300px;
}

.detail-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.detail-meta {
    color: #888;
    margin-bottom: 20px;
    font-size: 14px;
}

.detail-desc {
    color: #ccc;
    line-height: 1.8;
}

.episodes-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.episode-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.episode-card:hover {
    background: rgba(233, 69, 96, 0.2);
    transform: translateY(-3px);
}

.episode-num {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.episode-title {
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 播放页 */
.play-section {
    padding: 20px 0;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.video-title {
    font-size: 20px;
}

.video-controls {
    display: flex;
    gap: 10px;
}

.video-controls button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.video-controls button:hover {
    background: rgba(233, 69, 96, 0.3);
}

.playlist {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

.playlist-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.playlist-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.playlist-item {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.playlist-item:hover {
    background: rgba(233, 69, 96, 0.2);
}

.playlist-item.active {
    background: #e94560;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(233, 69, 96, 0.3);
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    background: rgba(233, 69, 96, 0.9);
    border-radius: 30px;
    color: #fff;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* 返回按钮 */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: rgba(233, 69, 96, 0.3);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .search-title {
        font-size: 32px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-poster {
        width: 180px;
    }

    .detail-title {
        font-size: 24px;
    }

    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .nav {
        gap: 10px;
    }

    .nav a {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .search-title {
        font-size: 28px;
    }

    .platform-tabs {
        gap: 8px;
    }

    .platform-tab {
        padding: 8px 16px;
        font-size: 14px;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }
}
