* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.input-section, .output-section {
    flex: 1;
    min-width: 300px;
}

.section-title {
    font-size: 1.3rem;
    color: #3498db;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.input-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.method-btn {
    flex: 1;
    padding: 12px;
    background-color: #ecf0f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.method-btn.active {
    background-color: #3498db;
    color: white;
}

/* 文件导入按钮改为红色 */
#fileInputBtn {
    background-color: #e74c3c;
    color: white;
}

#fileInputBtn:hover {
    background-color: #c0392b;
}

#fileInputBtn.active {
    background-color: #c0392b;
    color: white;
}

.method-btn:hover {
    background-color: #2980b9;
    color: white;
}

.input-area {
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
}

.file-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #bdc3c7;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.file-upload i {
    font-size: 48px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.file-input {
    display: none;
}

.file-name {
    margin-top: 10px;
    color: #7f8c8d;
}

.data-info {
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.info-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.options-section {
    margin-bottom: 25px;
}

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

.option-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.split-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.split-method-btn {
    flex: 1;
    padding: 15px;
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.split-method-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.split-method-btn:hover {
    border-color: #3498db;
}

/* 平均分模式样式 */
.average-split-options {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

/* 按数量分配模式样式 */
.quantity-split-options {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.quantity-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-box {
    display: flex;
    flex-direction: column;
}

.quantity-label {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #7f8c8d;
}

.quantity-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.quantity-input:focus {
    outline: none;
    border-color: #3498db;
}

.input-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-control:focus {
    outline: none;
    border-color: #3498db;
}

.quantity-total {
    background-color: #e8f4fc;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.quantity-total span {
    color: #e74c3c;
    font-size: 1.2rem;
}

.option-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    padding-left: 20px;
    margin-bottom: 15px;
}

.option-description li {
    margin-bottom: 5px;
}

/* 开始分割按钮改为红色 */
.action-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 20px;
}

.action-btn:hover {
    background-color: #c0392b;
}

.action-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.output-area {
    margin-top: 20px;
}

.output-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.output-info.hidden {
    display: none;
}

.download-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
    text-align: left;
}

.download-btn:hover {
    background-color: #27ae60;
}

.download-btn.extra {
    background-color: #e67e22;
}

.download-btn.extra:hover {
    background-color: #d35400;
}

.download-btn i {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.btn-title {
    font-size: 1rem;
    margin-bottom: 5px;
}

.btn-desc {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: normal;
}

.instructions {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 5px solid #3498db;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.instructions ol {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 10px;
}

.instructions code {
    background-color: #ecf0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .input-section, .output-section {
        width: 100%;
    }
    
    .split-methods {
        flex-direction: column;
    }
    
    .quantity-inputs {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .quantity-inputs {
        grid-template-columns: 1fr;
    }
}