:root {
    --primary-color: #07c160;
    --primary-light: #e8f5e9;
    --background-color: #f7f7f7;
    --text-color: #333;
    --text-light: #999;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-weight: 500;
}

.file-input-wrapper {
    margin-bottom: 30px;
}

.file-input {
    display: none;
}

.file-label {
    display: block;
    padding: 25px;
    background-color: var(--primary-light);
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    text-align: center;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background-color: #d4edda;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.file-label.file-selected {
    background-color: #d4edda;
    border-style: solid;
}

.file-status, .file-name, .file-action {
    display: block;
    margin-bottom: 8px;
}

.file-status {
    font-size: 14px;
    color: var(--text-light);
}

.file-name {
    font-size: 16px;
    color: var(--text-color);
    word-break: break-all;
}

.file-action {
    color: var(--primary-color);
    font-weight: bold;
}

.options-container {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.option-item {
    margin-bottom: 25px;
}

.option-label {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 500;
}

.option-value {
    display: flex;
    justify-content: space-between;
}

.radio-label {
    flex: 1;
    text-align: center;
    padding: 12px;
    background-color: #fff;
    border: 2px solid #e6e6e6;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-label:hover {
    background-color: #f2f2f2;
}

.radio-label input {
    display: none;
}

.radio-label input:checked + .radio-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.radio-custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    position: relative;
}

.radio-custom::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: all 0.2s ease;
}

.radio-label input:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.submit-btn, .download-btn {
    display: block;
    width: 100%;
    max-width: 300px; /* 添加最大宽度 */
    margin: 0 auto; /* 居中对齐 */
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(7, 193, 96, 0.2);
}

.submit-btn:hover, .download-btn:hover {
    background-color: #06ad56;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(7, 193, 96, 0.3);
}

.flash-message {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.flash-message.error {
    background-color: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.flash-message.success {
    background-color: #f0f9eb;
    color: #67c23a;
    border: 1px solid #c2e7b0;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@media (max-width: 600px) {
    .container {
        margin: 20px auto;
        padding: 20px;
    }

    h1 {
        font-size: 20px;
    }

    .file-label, .submit-btn, .download-btn {
        padding: 15px;
    }

    .option-label {
        font-size: 14px;
    }

    .radio-label {
        font-size: 12px;
        padding: 10px;
    }
}

.copyright {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 30px;
    padding: 15px 0;
}

@media (max-width: 600px) {
    .copyright {
        font-size: 10px;
    }
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.action-btn {
    flex: 1;
    max-width: calc(50% - 10px);
    padding: 15px;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-btn {
    background-color: var(--primary-color);
    color: white;
}

.restart-btn {
    background-color: #f0f0f0;
    color: var(--text-color);
    margin-left: 20px;
    display: inline-block;
    text-decoration: none;
}

.download-btn:hover {
    background-color: #06ad56;
}

.restart-btn:hover {
    background-color: #e0e0e0;
    text-decoration: none;
}

@media (max-width: 600px) {
    .button-group {
        flex-direction: row; // 改为行排列
        justify-content: space-between; // 两端对齐
    }

    .action-btn {
        max-width: calc(50% - 5px); // 调整宽度，留出间隔
        margin-bottom: 0; // 移除底部间距
        font-size: 14px; // 稍微减小字体大小以适应移动���
    }

    .restart-btn {
        margin-left: 10px; // 减小左边距
    }
}