/* Apple Design System - 音视频合并工具 */

:root {
    /* Colors */
    --primary: #0066cc;
    --primary-focus: #0071e3;
    --ink: #1d1d1f;
    --body: #1d1d1f;
    --body-on-dark: #ffffff;
    --body-muted: #cccccc;
    --ink-muted-80: #333333;
    --ink-muted-48: #7a7a7a;
    --divider-soft: #f0f0f0;
    --hairline: #e0e0e0;
    --canvas: #ffffff;
    --canvas-parchment: #f5f5f7;
    --surface-pearl: #fafafc;
    --surface-black: #000000;
    --on-primary: #ffffff;
    
    /* Typography */
    --font-display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 17px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* Rounded */
    --rounded-sm: 8px;
    --rounded-md: 11px;
    --rounded-lg: 18px;
    --rounded-pill: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.47;
    letter-spacing: -0.374px;
    color: var(--body);
    background: var(--canvas-parchment);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
}

/* Container */
.container {
    background: var(--canvas);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-xxl) var(--spacing-xl);
    max-width: 680px;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Typography */
h1 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0;
    color: var(--ink);
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.subtitle {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.19;
    letter-spacing: 0.231px;
    color: var(--ink-muted-80);
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: 0.196px;
    color: var(--ink);
    margin-bottom: var(--spacing-lg);
}

h3 {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.19;
    letter-spacing: 0.231px;
    color: var(--ink);
    margin-bottom: var(--spacing-md);
}

/* Upload Section */
.upload-section {
    margin-bottom: var(--spacing-xl);
}

.file-input-group {
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.file-label {
    background: var(--primary);
    color: var(--on-primary);
    padding: 11px 22px;
    border-radius: var(--rounded-pill);
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.374px;
    display: inline-block;
    border: none;
}

.file-label:hover {
    transform: scale(0.98);
}

.file-label:active {
    transform: scale(0.95);
}

.file-input {
    display: none;
}

.label-text {
    font-weight: 400;
}

.file-name {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    letter-spacing: -0.224px;
    color: var(--ink-muted-48);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Buttons */
.merge-btn {
    width: 100%;
    padding: 11px 22px;
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--rounded-pill);
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.374px;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.merge-btn:hover:not(:disabled) {
    transform: scale(0.98);
}

.merge-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.merge-btn:disabled {
    background: var(--divider-soft);
    color: var(--ink-muted-48);
    cursor: not-allowed;
    transform: none;
}

.download-btn {
    padding: 11px 22px;
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--rounded-pill);
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.374px;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-btn:hover {
    transform: scale(0.98);
}

.download-btn:active {
    transform: scale(0.95);
}

/* Progress Section */
.progress-section {
    margin-top: var(--spacing-xl);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--divider-soft);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-text {
    text-align: center;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    letter-spacing: -0.224px;
    color: var(--ink-muted-80);
}

/* Result Section */
.result-section {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.preview-video {
    width: 100%;
    border-radius: var(--rounded-md);
    margin-bottom: var(--spacing-lg);
    background: var(--surface-black);
}

/* Info Section */
.info-section {
    margin-top: var(--spacing-xxl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--hairline);
}

.info-section ul {
    list-style: none;
    margin-bottom: var(--spacing-md);
}

.info-section li {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    letter-spacing: -0.224px;
    color: var(--ink-muted-80);
    margin-bottom: var(--spacing-xs);
    padding-left: 20px;
    position: relative;
}

.info-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

.note {
    background: var(--surface-pearl);
    padding: var(--spacing-md);
    border-radius: var(--rounded-sm);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.33;
    letter-spacing: -0.12px;
    color: var(--ink-muted-80);
    border: 1px solid var(--hairline);
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: var(--spacing-md);
    }
    
    .container {
        padding: var(--spacing-xl) var(--spacing-lg);
    }
    
    h1 {
        font-size: 34px;
        letter-spacing: -0.374px;
    }
    
    .subtitle {
        font-size: 17px;
        letter-spacing: -0.374px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .file-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .file-label {
        text-align: center;
    }
    
    .file-name {
        text-align: center;
        padding: var(--spacing-xs) 0;
    }
}

/* Focus States */
.file-label:focus-visible,
.merge-btn:focus-visible,
.download-btn:focus-visible {
    outline: 2px solid var(--primary-focus);
    outline-offset: 4px;
}
