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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 顶部导航栏 */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 3rem;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

/* 主内容区 */
.main-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #1a1a2e;
    font-size: 1.75rem;
}

/* 上传页面 */
.upload-container {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.upload-area {
    border: 2px dashed #d9d9d9;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #1890ff;
    background: rgba(24, 144, 255, 0.05);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-area p {
    color: #666;
    margin-bottom: 1rem;
}

/* 按钮 */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
}

.btn-danger:hover {
    background: #ff7875;
}

/* 进度条 */
.upload-progress {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #666;
    font-size: 0.9rem;
    min-width: 40px;
}

/* 消息提示 */
.upload-result {
    margin-top: 1rem;
}

.success-message {
    padding: 0.75rem 1rem;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 6px;
    color: #52c41a;
}

.error-message {
    padding: 0.75rem 1rem;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    color: #ff4d4f;
}

/* 节目列表 */
.programs-container {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.programs-table {
    width: 100%;
    border-collapse: collapse;
}

.programs-table th,
.programs-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.programs-table th {
    background: #fafafa;
    font-weight: 600;
    color: #666;
}

.programs-table tr:hover {
    background: #fafafa;
}

/* 状态标签 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-播放中 {
    background: #e6f7ff;
    color: #1890ff;
}

.status-待播放 {
    background: #fff7e6;
    color: #fa8c16;
}

.status-已结束 {
    background: #f5f5f5;
    color: #8c8c8c;
}

/* 警告消息 */
.warning-message {
    padding: 0.75rem 1rem;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    color: #d48806;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-content h3 {
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.modal-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    word-break: break-all;
}

.modal-content input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.modal-content input[type="password"]:focus {
    outline: none;
    border-color: #1890ff;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-buttons .btn {
    background: #f0f0f0;
    color: #333;
}

.modal-buttons .btn:hover {
    background: #e0e0e0;
}

/* 视频弹窗 */
.video-modal {
    max-width: 900px;
    width: 90%;
    padding: 0;
    background: #000;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #1a1a2e;
}

.video-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1rem;
}

.btn-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.btn-close:hover {
    color: #ff4d4f;
}

#videoPlayer {
    width: 100%;
    max-height: 70vh;
    display: block;
}

/* 空状态 */
.empty-message {
    text-align: center;
    padding: 3rem;
    color: #999;
}

/* 按钮主色调 */
.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
}

/* 移动端适配 */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: table !important;
}

/* 手机端节目列表 */
.programs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.program-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #fafafa;
    border-radius: 8px;
}

.program-info {
    flex: 1;
    min-width: 0;
    margin-right: 0.75rem;
}

.program-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.program-size {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.25rem;
}

@media screen and (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    .header {
        padding: 0 1rem;
        height: 56px;
    }

    .logo {
        font-size: 1.2rem;
        margin-right: 1rem;
    }

    .nav-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1rem;
    }

    .page-header {
        margin-bottom: 1rem;
    }

    .page-header h1 {
        font-size: 1.35rem;
    }

    .upload-container {
        padding: 1rem;
        border-radius: 8px;
    }

    .upload-area {
        padding: 1.5rem 1rem;
        border-radius: 8px;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    .upload-area p {
        font-size: 0.9rem;
    }

    .programs-container {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .video-modal {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .video-header {
        padding: 0.75rem 1rem;
    }

    .video-header h3 {
        font-size: 0.9rem;
    }

    #videoPlayer {
        max-height: calc(100vh - 50px);
    }

    .success-message,
    .error-message,
    .warning-message {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.2rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .logo {
        font-size: 1rem;
    }

    .nav-item {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }

    .upload-area {
        padding: 1rem 0.5rem;
    }

    .upload-icon {
        font-size: 2rem;
    }
}
