:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #4a6cf7, #1e40af);
    --gradient-secondary: linear-gradient(135deg, #6c757d, #495057);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

header {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo {
    font-size: 1.8rem;
    font-weight: bold;
    padding: 1rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transition: var(--transition);
    transform: translateX(-50%);
}

nav ul li a:hover::after {
    width: 80%;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.player-section {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.player-section:hover {
    box-shadow: var(--box-shadow-hover);
}

.player-container {
    position: relative;
}

.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius);
    background-color: #000;
    transition: var(--transition);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.video-player:hover {
    box-shadow: 0 0 0 3px var(--primary-color);
}

#channel-info {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

#channel-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.channels-section {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}

.channels-header {
    margin-bottom: 1.5rem;
}

.channels-header h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.channel-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--secondary-color);
    background-color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--box-shadow);
}

/* 添加频道按钮样式 */
.add-channel-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: var(--success-color);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    margin-left: auto;
}

.add-channel-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* 模态窗口样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.3rem;
}

.close-modal {
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--secondary-color);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--dark-color);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: #3a5adb;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

/* 频道卡片标识用户自定义频道 */
.channel-card.custom {
    border: 2px solid var(--success-color);
    position: relative;
}

.delete-channel-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.3s ease;
}

.delete-channel-btn:hover {
    background-color: #d32f2f;
}

.channel-card.custom::after {
    content: '自定义';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--success-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

/* 频道管理栏样式 */
.channel-management-bar {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

#channel-search {
    padding: 0.5rem 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    font-size: 1rem;
    width: 300px;
    transition: border-color 0.3s ease;
}

#channel-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

#channel-sort {
    padding: 0.5rem;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: white;
    cursor: pointer;
}

/* 频道卡片样式 */
.channel-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--box-shadow);
    position: relative;
    border: 1px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--primary-color);
}

.channel-card:active {
    transform: translateY(-2px);
}

.channel-card.active {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

.channel-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #ddd;
    position: relative;
    overflow: hidden;
}

.channel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.channel-card:hover .channel-thumbnail img {
    transform: scale(1.05);
}

.channel-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger-color);
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* 收藏按钮样式 */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: #ccc;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.favorite-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.favorite-btn.favorited {
    background-color: rgba(255, 193, 7, 0.9);
    color: white;
}

.favorite-btn.favorited:hover {
    background-color: rgba(255, 193, 7, 1);
}

.channel-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.channel-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.channel-description {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.channel-category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    align-self: flex-start;
    margin-top: auto;
}

/* 分类面板样式 */
#categories-panel {
    position: fixed;
    top: 70px;
    right: -300px;
    width: 300px;
    height: calc(100vh - 70px);
    background-color: white;
    box-shadow: var(--box-shadow-hover);
    padding: 1.5rem;
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

#categories-panel h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    color: var(--dark-color);
}

#close-categories {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

#close-categories:hover {
    background-color: var(--light-color);
}

#categories-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#categories-panel li {
    margin-bottom: 0.5rem;
}

#categories-panel a {
    display: block;
    padding: 0.75rem;
    border-radius: 8px;
    color: var(--dark-color);
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#categories-panel a:hover {
    background-color: var(--light-color);
}

#categories-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

/* 无频道提示样式 */
.no-channels {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

.no-channels p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* 重置按钮样式 */
.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    background-color: #3a5ce7;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

footer {
    background: var(--gradient-secondary);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

/* 响应式设计 - 平板设备 */
@media (max-width: 1024px) {
    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    #channel-search {
        width: 250px;
    }
}

/* 响应式设计 - 小型平板和大型手机 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    header .logo {
        font-size: 1.3rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    nav ul li {
        margin: 0 0.5rem;
    }
    
    nav ul li a {
        padding: 0.5rem 0.75rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .player-container {
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
    }
    
    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .channel-management-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    #channel-search {
        width: 100%;
    }
    
    #categories-panel {
        width: 80%;
        max-width: 300px;
        right: -100%;
        padding: 1rem;
    }
    
    /* 移动端分类面板优化 */
    #categories-panel {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    /* 移动端管理栏优化 */
    .channel-management-bar {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
}

/* 响应式设计 - 手机设备 */
@media (max-width: 480px) {
    header .logo {
        font-size: 1.3rem;
    }
    
    nav ul li {
        margin: 0 0.25rem;
    }
    
    nav ul li a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.75rem;
    }
    
    .channel-thumbnail {
        height: 120px;
    }
    
    .favorite-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    /* 移动端播放器优化 */
    .player-container {
        margin-bottom: 0.75rem;
    }
    
    /* 移动端通知优化 */
    .notification {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* 横屏手机优化 */
@media (max-height: 480px) and (orientation: landscape) {
    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    .channel-thumbnail {
        height: 90px;
    }
    
    .channel-name {
        font-size: 0.85rem;
    }
    
    .channel-details {
        padding: 0.5rem;
    }
    
    .favorite-btn {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    /* 横屏播放器优化 */
    .player-wrapper {
        max-height: 300px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 错误消息样式 */
.error-message {
    color: var(--danger-color);
    text-align: center;
    padding: 1rem;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

/* 全屏样式 */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullscreen .video-player {
    max-width: 100%;
    max-height: 100%;
}`
,"rewrite"
:false
}}}