/* 基础样式 */
:root {
    --primary-color: #ff3e3e;
    --secondary-color: #2c3e50;
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-color: #f0f0f0;
    --text-secondary: #b0b0b0;
    --border-radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--dark-bg);
    background-image: radial-gradient(circle at 10% 20%, rgba(30, 30, 30, 0.8) 0%, rgba(18, 18, 18, 1) 90%);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航  短剧搜索 www.rdhk.net*/  
.navbar {
    background-color: var(--secondary-color);
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 1.8rem;
}

/* 主导航菜单 - 替代跑马灯广告的新导航 */
.main-nav {
    background-color: var(--secondary-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 999;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.nav-list::-webkit-scrollbar {
    height: 4px;
}

.nav-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.nav-item {
    flex: 0 0 auto;
}

.nav-link {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link i {
    margin-right: 6px;
    font-size: 15px;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    flex: 1;
}

/* 输入区域 */
.input-section {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.input-section:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary-color);
}

.url-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-control {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    background-color: #2a2a2a;
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 62, 62, 0.2);
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #e03636;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 62, 62, 0.3);
}

.btn-secondary {
    background-color: #3a3a3a;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #454545;
    transform: translateY(-2px);
}

/* 视频区域 */
.video-section {
    margin-bottom: 25px;
}

.line-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.line-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.line-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.video-container {
    position: relative;
    flex: 1;
    min-height: 200px;
    background-color: #000;
    overflow: hidden;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.line-info {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333;
}

.line-name {
    font-size: 14px;
    font-weight: 500;
}

.line-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-active {
    background-color: #4cd964;
}

.status-unknown {
    background-color: #ffcc00;
}

.select-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.select-btn:hover {
    background-color: #e03636;
}

/* 全屏视频样式 */
.fullscreen-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: none;
}

.fullscreen-video.active {
    display: block;
}

.fullscreen-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.fullscreen-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}

/* 控制按钮 */
.ctrl-btns {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    transform: translateY(-10px);
}

.ctrl-btns.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ctrl-btn {
    background: rgba(44, 62, 80, 0.9);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.ctrl-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.ctrl-btn i {
    margin-right: 6px;
}

/* 提示信息 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: rgba(44, 62, 80, 0.95);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* 底部版本信息 */
.footer {
    background-color: var(--secondary-color);
    padding: 15px 0;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
}

.version-info {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

.version-info span {
    color: var(--primary-color);
    font-weight: 500;
}

.copyright {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 5px 0 0;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .line-grid {
        grid-template-columns: 1fr;
    }
    
    .url-input-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .navbar {
        padding: 10px 15px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .ctrl-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .ctrl-btn span {
        display: none;
    }
    
    .ctrl-btn i {
        margin-right: 0;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .nav-link i {
        margin-right: 4px;
    }
    
    .version-info {
        font-size: 12px;
    }
    
    .copyright {
        font-size: 11px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.line-card {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.line-card:nth-child(1) { animation-delay: 0.1s; }
.line-card:nth-child(2) { animation-delay: 0.2s; }
.line-card:nth-child(3) { animation-delay: 0.3s; }
.line-card:nth-child(4) { animation-delay: 0.4s; }
.line-card:nth-child(5) { animation-delay: 0.5s; }
.line-card:nth-child(6) { animation-delay: 0.6s; }
