:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #495057;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.card {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--shadow-color);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.logo i {
    font-size: 32px;
    margin-right: 12px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
}

.tagline {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

main {
    padding: 24px;
}

.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffeeba;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
}

.warning i {
    font-size: 24px;
    margin-right: 12px;
    color: #ffc107;
}

.warning-content h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.warning ul {
    margin: 8px 0 0 20px;
    font-size: 14px;
}

.upload-card {
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.upload-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.1);
}

.upload-area {
    text-align: center;
    cursor: pointer;
    padding: 20px;
    position: relative;
}

.upload-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.upload-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.upload-subtext {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
}

#fileInput {
    display: none;
}

.file-info {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    position: relative;
}

.file-info i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 12px;
}

.file-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

#fileName {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#fileSize {
    font-size: 12px;
    color: #6c757d;
}

.file-warning {
    font-size: 12px;
    color: var(--warning-color);
    margin-top: 4px;
}

.change-file-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 16px;
    margin-left: 12px;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.change-file-btn:hover {
    background: rgba(67, 97, 238, 0.1);
    transform: rotate(90deg);
}

.extract-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.extract-btn i {
    margin-right: 8px;
}

.extract-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.extract-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-container {
    margin: 24px 0;
}

.status-message {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.status-message i {
    margin-right: 8px;
    color: var(--primary-color);
}

.progress-container {
    margin-top: 16px;
    background: #e9ecef;
    border-radius: 8px;
    height: 12px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--success-color) 0%, #4895ef 100%);
    height: 100%;
    border-radius: 8px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 10px;
    line-height: 12px;
    font-weight: bold;
}

#memoryWarning {
    display: none;
    margin-top: 10px;
}

.loading-container {
    text-align: center;
    margin: 24px 0;
}

.loading-spinner {
    border: 4px solid rgba(67, 97, 238, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.download-btn i {
    margin-right: 8px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
}

footer {
    padding: 16px 24px;
    background: #f8f9fa;
    text-align: center;
}

.tips {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tips i {
    margin-right: 6px;
    color: var(--primary-color);
}

.copyright {
    font-size: 12px;
    color: #adb5bd;
}

@media (max-width: 640px) {
    .container {
        padding: 0;
    }
    
    .card {
        border-radius: 0;
    }
    
    header {
        padding: 20px;
    }
    
    main {
        padding: 20px;
    }
    
    .upload-area {
        padding: 16px;
    }
}