/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { text-decoration: none; color: inherit; }

/* ========== 导航栏 ========== */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.nav-links .nav-admin {
    background: rgba(255,255,255,0.15);
    margin-left: 8px;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* ========== 主内容区 ========== */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 首页搜索 ========== */
.home-hero {
    text-align: center;
    padding: 80px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.home-hero h1 {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-align: center;
}
.home-hero .subtitle {
    color: #666;
    font-size: 16px;
    text-align: center;
}
.search-box {
    max-width: 640px;
    width: 100%;
    margin: 30px auto 20px;
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 16px 120px 16px 24px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    outline: none;
    transition: box-shadow 0.3s;
}
.search-box input:focus {
    box-shadow: 0 4px 30px rgba(102,126,234,0.3);
}
.search-box .search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}
.search-box .search-btn:hover { opacity: 0.9; }
.hot-words {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.hot-words a {
    padding: 6px 18px;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.hot-words a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

/* ========== 搜索结果 ========== */
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.search-results-header h2 { font-size: 20px; }
.search-progress {
    text-align: center;
    padding: 40px 20px;
}
.search-progress .progress-bar {
    max-width: 400px;
    margin: 16px auto;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}
.search-progress .progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.result-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.result-card .card-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: #eee;
    display: block;
}
.result-card .card-img-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #667eea;
}
.result-card .card-info {
    padding: 10px 12px;
}
.result-card .card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.result-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}
.result-card .card-source {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.result-card .card-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.result-card .source-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    line-height: 1.4;
}
.result-card .card-status {
    color: #28a745;
    font-weight: 500;
}

/* ========== 排行榜 ========== */
.ranking-page { padding: 20px 0; }
.ranking-page h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 6px;
}
.ranking-page .ranking-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 24px;
}
.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}
.ranking-tabs button {
    padding: 8px 24px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}
.ranking-tabs button.active, .ranking-tabs button:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}
.rank-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: relative;
    transition: transform 0.3s;
    cursor: pointer;
}
.rank-card:hover { transform: translateY(-4px); }
.rank-card .rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    z-index: 2;
}
.rank-1 { background: linear-gradient(135deg, #FFD700, #FFA500); }
.rank-2 { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); }
.rank-3 { background: linear-gradient(135deg, #CD7F32, #B8860B); }
.rank-other { background: rgba(0,0,0,0.5); }
.rank-card .rank-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: #eee;
}
.rank-card .rank-img-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}
.rank-card .rank-info {
    padding: 10px;
}
.rank-card .rank-title {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rank-card .rank-hits {
    font-size: 12px;
    color: #ff6b6b;
    margin-top: 2px;
}

/* ========== 历史记录 ========== */
.history-page { padding: 20px 0; }
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.history-header h2 { font-size: 24px; }
.btn-clear {
    padding: 8px 20px;
    background: #ff4757;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.3s;
}
.btn-clear:hover { opacity: 0.85; }
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.history-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
}
.history-card:hover { transform: translateY(-2px); }
.history-card .history-img {
    width: 80px;
    height: 110px;
    border-radius: 8px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}
.history-card .history-img-placeholder {
    width: 80px;
    height: 110px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}
.history-card .history-info { flex: 1; min-width: 0; }
.history-card .history-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.history-card .history-episode { font-size: 13px; color: #667eea; font-weight: 500; }
.history-card .history-time { font-size: 12px; color: #999; margin-top: 4px; }
.history-card .history-progress { font-size: 12px; color: #999; }
.history-card .history-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.history-card .history-delete:hover { opacity: 1; }
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.empty-state .empty-icon { font-size: 60px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; }

/* ========== 设置页 ========== */
.settings-page { padding: 20px 0; }
.settings-page h2 { font-size: 24px; margin-bottom: 20px; }
.settings-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.settings-section h3 {
    font-size: 16px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f8f8f8;
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 14px; color: #333; }
.setting-desc { font-size: 12px; color: #999; margin-top: 2px; }
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: 0.3s;
}
.toggle-switch .slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .slider {
    background: linear-gradient(135deg, #667eea, #764ba2);
}
.toggle-switch input:checked + .slider:before {
    transform: translateX(22px);
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.stat-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}
.stat-item .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}
.stat-item .stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
.site-list { margin-top: 12px; }
.site-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}
.site-item .site-name { font-weight: 600; font-size: 14px; }
.site-item .site-api { font-size: 12px; color: #999; word-break: break-all; }
.site-item .site-actions { display: flex; gap: 6px; }
.site-item .site-actions button {
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}
.site-item .site-actions button:hover { border-color: #667eea; color: #667eea; }
.site-item .site-actions .btn-disable { color: #ff4757; border-color: #ff4757; }
.site-item .site-actions .btn-delete { color: #ff4757; border-color: #ff4757; }
.add-site-form {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.add-site-form input {
    flex: 1;
    min-width: 150px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}
.add-site-form input:focus { outline: none; border-color: #667eea; }
.add-site-form button {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* ========== 关于页 ========== */
.about-page { padding: 20px 0; max-width: 700px; margin: 0 auto; }
.about-page h2 { font-size: 24px; margin-bottom: 20px; text-align: center; }
.about-features {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.about-features h3 { font-size: 16px; margin-bottom: 12px; }
.about-features ul { list-style: none; }
.about-features li {
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f8f8f8;
}
.about-features li:before { content: "✅ "; }
.feedback-form {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.feedback-form h3 { font-size: 16px; margin-bottom: 16px; }
.feedback-form .form-group { margin-bottom: 14px; }
.feedback-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.feedback-form input, .feedback-form select, .feedback-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.feedback-form input:focus, .feedback-form select:focus, .feedback-form textarea:focus {
    outline: none;
    border-color: #667eea;
}
.feedback-form textarea { min-height: 100px; resize: vertical; }
.feedback-form .btn-submit {
    padding: 10px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* ========== 播放页 ========== */
.player-page {
    background: #000;
    min-height: calc(100vh - 56px);
    margin: -20px;
    padding: 0;
}
.player-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
}
.player-wrapper iframe, .player-wrapper video {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    display: block;
    background: #000;
}
.player-controls {
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.9));
    padding: 20px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}
.player-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #1a1a1a;
}
.player-title-bar h2 {
    color: #fff;
    font-size: 18px;
}
.player-title-bar .player-actions {
    display: flex;
    gap: 10px;
}
.player-title-bar .player-actions button {
    padding: 6px 16px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}
.player-title-bar .player-actions button:hover {
    background: rgba(255,255,255,0.2);
}
.episode-panel {
    background: #1a1a1a;
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}
.episode-panel .ep-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
}
.episode-panel .ep-poster {
    width: 100px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
    background: #333;
    flex-shrink: 0;
}
.episode-panel .ep-info { color: #ccc; flex: 1; }
.episode-panel .ep-info h3 { color: #fff; font-size: 18px; margin-bottom: 8px; }
.episode-panel .ep-info p { font-size: 13px; margin-bottom: 4px; }
.episode-panel .ep-info .ep-desc {
    font-size: 13px;
    color: #999;
    margin-top: 8px;
    max-height: 60px;
    overflow: hidden;
}
.episode-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.episode-grid button {
    padding: 10px 8px;
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    min-width: 0;
}
.episode-grid button:hover, .episode-grid button.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
}
.player-settings-panel {
    background: #1a1a1a;
    padding: 20px;
    display: none;
}
.player-settings-panel h4 { color: #fff; margin-bottom: 12px; }
.player-settings-panel .setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    color: #ccc;
    font-size: 14px;
}
.player-settings-panel input[type="number"] {
    width: 60px;
    padding: 4px 8px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    text-align: center;
}

/* ========== 详情页 ========== */
.detail-page { padding: 20px 0; }
.detail-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}
.detail-poster {
    width: 200px;
    min-height: 280px;
    border-radius: 12px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.detail-poster-placeholder {
    width: 200px;
    min-height: 280px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    flex-shrink: 0;
}
.detail-info { flex: 1; }
.detail-info h1 { font-size: 28px; margin-bottom: 12px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.detail-meta span {
    padding: 4px 14px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
}
.detail-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-top: 12px;
}
.detail-episodes {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.detail-episodes h3 { font-size: 18px; margin-bottom: 16px; }
.detail-episodes .ep-source-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.detail-episodes .ep-source-tabs button {
    padding: 6px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}
.detail-episodes .ep-source-tabs button.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

/* ========== 加载更多 ========== */
.load-more {
    text-align: center;
    margin: 30px 0;
}
.load-more button {
    padding: 12px 40px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}
.load-more button:hover {
    border-color: #667eea;
    color: #667eea;
}

/* ========== 页脚 ========== */
.footer {
    background: #fff;
    padding: 20px;
    border-top: 1px solid #eee;
    margin-top: auto;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}
.footer p { font-size: 13px; color: #999; line-height: 1.8; }

/* ========== 友情链接 ========== */
.friend-links {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.friend-links-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}
.friend-links-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
}
.friend-link-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}
.friend-link-item:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}
.friend-link-logo {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 50%;
}
.friend-link-name {
    white-space: nowrap;
}

/* ========== 管理后台 ========== */
.admin-page { padding: 20px 0; }
.admin-page h2 { font-size: 24px; margin-bottom: 20px; }
.admin-login {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.admin-login h3 { text-align: center; margin-bottom: 20px; }
.admin-login .form-group { margin-bottom: 14px; }
.admin-login label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.admin-login input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}
.admin-login input:focus { outline: none; border-color: #667eea; }
.admin-login .btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.admin-tabs button {
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}
.admin-tabs button.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.admin-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.admin-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.admin-table th {
    font-weight: 600;
    color: #666;
    font-size: 13px;
}
.admin-table .status-on { color: #28a745; font-weight: 600; }
.admin-table .status-off { color: #ff4757; font-weight: 600; }
.admin-table .action-btns { display: flex; gap: 6px; }
.admin-table .action-btns button {
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}
.admin-table .action-btns button:hover { border-color: #667eea; color: #667eea; }
.admin-table .action-btns .btn-danger { color: #ff4757; }
.admin-table .action-btns .btn-danger:hover { border-color: #ff4757; }

/* ========== 响应式 ========== */

/* 平板横屏 & 小桌面 (1024px以下) */
@media (max-width: 1024px) {
    .main-content { padding: 16px; }
    .home-hero { padding: 80px 20px 30px; }
    .home-hero h1 { font-size: 36px; }
    .search-box { max-width: 560px; }
}

/* 平板竖屏 (768px以下) */
@media (max-width: 768px) {
    .main-content { padding: 12px; }
    .nav-links { 
        display: none; 
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea, #764ba2);
        flex-direction: column;
        padding: 10px;
        gap: 2px;
    }
    .nav-links.show { display: flex; }
    .nav-toggle { display: block; }
    
    /* 首页搜索 */
    .home-hero { padding: 60px 16px 24px; min-height: auto; }
    .home-hero h1 { font-size: 28px; }
    .home-hero .subtitle { font-size: 14px; }
    .search-box { max-width: 100%; margin: 20px auto 16px; }
    .search-box input { padding: 14px 100px 14px 18px; font-size: 14px; }
    .search-box .search-btn { padding: 8px 20px; font-size: 13px; }
    .hot-words { gap: 8px; }
    .hot-words a { padding: 5px 14px; font-size: 12px; }
    
    /* 搜索结果 */
    .results-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
    .ranking-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    
    /* 详情页 */
    .detail-header { flex-direction: column; align-items: center; text-align: center; }
    .detail-poster, .detail-poster-placeholder { width: 160px; min-height: 220px; }
    
    /* 历史记录 */
    .history-grid { grid-template-columns: 1fr; }
    
    /* 播放页 */
    .player-layout { flex-direction: column; }
    .player-sidebar { width: 100%; max-height: none; border-left: none; border-top: 1px solid #333; }
    .player-title-bar { flex-direction: column; gap: 8px; }
    .episode-panel .ep-header { flex-direction: column; align-items: center; text-align: center; }
    .episode-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .episode-grid button { padding: 8px 4px; font-size: 12px; }
    
    /* 后台管理 */
    .admin-tabs { flex-wrap: wrap; }
    .admin-tabs button { font-size: 13px; padding: 8px 12px; }
}

/* 手机 (480px以下) */
@media (max-width: 480px) {
    .main-content { padding: 8px; }
    .home-hero { padding: 40px 12px 20px; }
    .home-hero h1 { font-size: 24px; }
    .home-hero .subtitle { font-size: 13px; }
    .search-box { margin: 16px auto 12px; }
    .search-box input { padding: 12px 90px 12px 14px; font-size: 13px; border-radius: 40px; }
    .search-box .search-btn { padding: 7px 16px; font-size: 12px; right: 4px; }
    .hot-words { gap: 6px; margin-top: 14px; }
    .hot-words a { padding: 4px 12px; font-size: 11px; border-radius: 16px; }
    
    /* 搜索结果 */
    .results-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
    .result-card .card-title { font-size: 12px; }
    .result-card .card-remark { font-size: 11px; }
    .ranking-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
    
    /* 详情页 */
    .detail-poster, .detail-poster-placeholder { width: 120px; min-height: 170px; }
    .detail-info h2 { font-size: 18px; }
    .detail-meta { font-size: 12px; }
    .detail-desc { font-size: 13px; }
    
    /* 播放页 */
    .episode-grid { grid-template-columns: repeat(3, 1fr); }
    .sidebar-source-tabs { flex-wrap: wrap; }
    .sidebar-source-tab { font-size: 12px; padding: 6px 12px; }
    
    /* 导航栏 */
    .nav-logo { font-size: 16px; }
    .nav-links a { font-size: 13px; padding: 6px 10px; }
    
    /* 友情链接 */
    .friend-links { flex-wrap: wrap; gap: 6px; }
    .friend-link-item { padding: 4px 10px; font-size: 11px; }
}

/* 超小屏 (360px以下) */
@media (max-width: 360px) {
    .home-hero h1 { font-size: 20px; }
    .search-box input { font-size: 12px; padding: 10px 80px 10px 12px; }
    .search-box .search-btn { padding: 6px 12px; font-size: 11px; }
    .results-grid { grid-template-columns: repeat(2, 1fr); }
    .episode-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========== 采集入库 ========== */
.collect-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
