* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6a89cc;
    --secondary-color: #78e08f;
    --background-color: #f8f9fa;
    --card-color: #ffffff;
    --text-color: #333333;
    --border-radius: 10px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}

/* 表单部分 */
.form-section {
    background: var(--card-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.form-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input, textarea, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: 'Nunito', sans-serif;
    transition: border-color 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 文件上传区域 */
.file-upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8faff;
}

.file-upload-area:hover {
    background: #f0f4ff;
    border-color: #5a75b5;
}

.file-upload-area i {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.file-upload-area p {
    color: #666;
    font-size: 1rem;
}

#fileUpload {
    display: none;
}

/* 文件列表 */
.file-list {
    margin-top: 20px;
}

.no-files {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

.file-item {
    background: #f8f9ff;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    border-left: 4px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.file-settings {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.setting-tag {
    background: #e3e9ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.file-action-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-action-btn:hover {
    background: #e3e9ff;
    transform: scale(1.1);
}

.file-action-btn.edit {
    color: var(--primary-color);
}

.file-action-btn.remove {
    color: #ff6b6b;
}

/* 选项按钮 */
.options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #f0f4ff;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s;
}

.option-label:hover {
    background: #e3e9ff;
}

.option-label input[type="radio"] {
    width: auto;
    margin: 0;
}

.number-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.number-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.number-btn:hover {
    background: #5a75b5;
}

.number-input input {
    text-align: center;
    flex: 1;
}

/* 按钮样式 */
.button-group {
    display: flex;
    gap: 15px;
    margin: 30px 0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

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

.btn-primary:hover {
    background: #5a75b5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(106, 137, 204, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-copy {
    background: var(--secondary-color);
    color: #333;
}

.btn-copy:hover {
    background: #67d084;
    transform: translateY(-2px);
}

/* 输出区域 */
.output-section {
    background: var(--card-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.output-container {
    position: relative;
}

.output-actions {
    margin-top: 15px;
}

#outputText {
    background: #f8f9ff;
    border: 1px solid #ddd;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    padding: 15px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h3 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.modal-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: var(--border-radius);
}

.modal-file-info i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.modal-form {
    display: grid;
    gap: 20px;
}

.modal-footer {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    text-align: right;
}

/* 底部样式 */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #666;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        min-width: 100%;
    }
    
    .options {
        flex-direction: column;
    }
    
    .option-label {
        width: 100%;
        justify-content: center;
    }
    
    .file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .file-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .header-decoration {
        display: none;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}