/* 抖音视频下载器 - 样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

/* 头部 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* 主卡片 */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.card-header {
    background: #f8f9fa;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.card-header h2 {
    font-size: 1.25rem;
    color: #333;
}

.card-body {
    padding: 24px;
}

/* 输入组 */
.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.input-group input {
    flex: 1;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    border: 2px solid #dee2e6;
    color: #495057;
}

.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
}

/* 加载指示器 */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 视频信息卡片 */
.video-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.video-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    color: #6c757d;
    font-size: 0.875rem;
}

.video-cover {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 16px;
}

.video-detail {
    display: flex;
    align-items: flex-start;
}

.video-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6c757d;
    font-size: 0.875rem;
}

/* 进度条 */
.progress-container {
    margin: 20px 0;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
    border-radius: 4px;
}

.progress-text {
    margin-top: 8px;
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
}

/* 消息提示 */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* 下载链接按钮 */
.download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 16px;
    transition: all 0.3s;
}

.download-link:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* 历史记录表格 */
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.history-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.history-table tr:hover {
    background: #f8f9fa;
}

.history-link {
    color: #667eea;
    text-decoration: none;
}

.history-link:hover {
    text-decoration: underline;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1rem;
    color: #6c757d;
    transition: all 0.3s;
}

.tab.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.tab:hover {
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 响应式 */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .video-detail {
        flex-direction: column;
    }
    
    .video-cover {
        width: 100%;
        height: auto;
        margin-bottom: 16px;
    }
    
    .video-meta {
        flex-wrap: wrap;
    }
    
    .history-table {
        font-size: 0.875rem;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px;
    }
}