/* M3U8频道管理器样式 */

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* 卡片样式调整 */
.card {
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    border-radius: calc(0.5rem - 1px) calc(0.5rem - 1px) 0 0;
    font-weight: 500;
}

/* 列表样式 */
.list-group-item {
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* 按钮样式 */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
}

/* 表格行交互 */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.04);
}

/* 通知样式 */
#notificationContainer {
    max-width: 300px;
}

.notification {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    animation: slideIn 0.3s forwards;
}

.notification.success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.notification.error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* 脚本编辑器样式 */
#scriptEditor {
    transition: all 0.3s ease;
}

#scriptEditorTextarea {
    font-family: 'Consolas', monospace;
    resize: vertical;
}

/* 动画 */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* 频道状态 */
.table-danger {
    opacity: 0.8;
}

/* 搜索框 */
.input-group .form-control:focus {
    box-shadow: none;
    border-color: #80bdff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card-body {
        padding: 0.75rem;
    }
}

/* CodeMirror样式定制 */
.CodeMirror {
    height: 350px !important;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: #fff;
}

/* 在模态窗口中的CodeMirror样式 */
#codeEditorContainer .CodeMirror {
    border-radius: 0.25rem;
}

/* 增加模态对话框的最大宽度，以便更好地显示代码 */
@media (min-width: 992px) {
    .modal-lg {
        max-width: 800px;
    }
}

/* 暗色主题下的样式调整 */
body.dark-mode .CodeMirror {
    border-color: #444;
}

body.dark-mode .CodeMirror-gutters {
    background-color: #282c34;
    border-right: 1px solid #444;
}
