body {
    background: linear-gradient(135deg, #1e1e2f, #2f2f4f);
    color: #e0e0ff;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 加载界面样式 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 30, 47, 0.95);
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #6b5bff;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading p {
    margin-top: 15px;
    font-size: 1.2em;
    color: #a0a0ff;
}

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

.container {
    background: rgba(30, 30, 47, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    max-width: 700px;
    width: 100%;
    text-align: center;
}

h1 {
    font-size: 2.2em;
    margin-bottom: 25px;
    color: #a0a0ff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-out forwards;
}

textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    background-color: #2a2a3d;
    border: 1px solid #3f3f5f;
    border-radius: 8px;
    color: #e0e0ff;
    font-size: 1em;
    box-sizing: border-box;
    margin-bottom: 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #6b5bff;
    box-shadow: 0 0 8px rgba(107, 91, 255, 0.5);
}

.format-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
    align-items: center;
}

label {
    font-size: 0.95em;
    color: #c0c0ff;
    margin-right: 10px;
}

select {
    padding: 10px;
    background-color: #2a2a3d;
    border: 1px solid #3f3f5f;
    border-radius: 8px;
    color: #e0e0ff;
    font-size: 1em;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #6b5bff;
    background-color: #353550;
}

.buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

/* 文件上传区域样式 */
.upload-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-section h2 {
    font-size: 1.5em;
    color: #a0a0ff;
    margin-bottom: 15px;
}

.upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.upload-wrapper {
    position: relative;
    display: inline-block;
}

input[type="file"] {
    opacity: 0;
    width: 120px;
    height: 40px;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

.upload-label {
    display: block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4a3aff, #6b5bff);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.upload-label:hover {
    background: linear-gradient(135deg, #6b5bff, #8a7aff);
}

.upload-label:active {
    transform: scale(0.95);
}

.file-name {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #d0d0ff;
    word-break: break-all;
    max-width: 120px;
}

.upload-format {
    display: flex;
    align-items: center;
    gap: 10px;
}

button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #6b5bff, #4a3aff);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

button:hover {
    box-shadow: 0 4px 15px rgba(107, 91, 255, 0.6);
}

button:active {
    transform: scale(0.95);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#outputArea {
    margin-top: 25px;
    padding: 15px;
    background-color: #2a2a3d;
    border: 1px solid #3f3f5f;
    border-radius: 8px;
    text-align: left;
}

.hidden {
    display: none;
}

#outputText {
    white-space: pre-wrap;
    font-size: 0.9em;
    color: #d0d0ff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}