/* 基础样式 */
* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* 主容器 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* 内容网格 */
.content-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
}

/* 控制面板 */
.control-panel {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    height: fit-content;
}

/* 播放器面板 */
.player-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 通用区块样式 */
.section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 流输入区域 */
.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-group .form-control {
    flex: 1;
}

.stream-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.offline {
    background: #6c757d;
}

.status-indicator.connecting {
    background: #ffc107;
    animation: pulse 1.5s infinite;
}

.status-indicator.online {
    background: #28a745;
}

.status-indicator.error {
    background: #dc3545;
}

.status-indicator.checking {
    background: #17a2b8;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 录制控制区域 */
.record-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.record-controls .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.record-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item .label {
    font-weight: 500;
    color: #6c757d;
}

.info-item .value {
    font-weight: 600;
    color: #2c3e50;
}

/* 设置区域 */
.setting-item {
    margin-bottom: 1rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

/* 服务器状态 */
.server-info {
    margin-top: 0.5rem;
}

.server-info small {
    color: #6c757d;
}

/* 播放器区域 */
.player-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.player-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    text-align: center;
}

.player-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.player-placeholder h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.player-placeholder p {
    margin: 0;
    opacity: 0.8;
}

.player-instance {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.player-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row .label {
    font-weight: 500;
    color: #6c757d;
}

.info-row .value {
    font-weight: 600;
    color: #2c3e50;
}

/* 文件列表 */
.files-list {
    max-height: 300px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border: none;
}

/* 表单控件 */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        order: 2;
    }
    
    .player-panel {
        order: 1;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .player-container {
        height: 300px;
    }
    
    .record-controls {
        flex-direction: column;
    }
    
    .input-group {
        flex-direction: column;
    }
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 通知样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.custom-toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border: none;
    min-width: 300px;
    margin-bottom: 1rem;
}

.custom-toast.success {
    border-left: 4px solid #28a745;
}

.custom-toast.error {
    border-left: 4px solid #dc3545;
}

.custom-toast.warning {
    border-left: 4px solid #ffc107;
}

.custom-toast.info {
    border-left: 4px solid #17a2b8;
}

.toast-header {
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
}

.toast-body {
    padding: 1rem;
} 