/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

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

/* 头部样式 */
header {
    text-align: center;
    padding: 25px 0;
    border-bottom: 2px solid #eaeaea;
    margin-bottom: 30px;
}

header h1 {
    color: #1a3a6c;
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

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

.header-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.header-links .btn {
    text-decoration: none;
}

/* 主要内容区域 */
main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }
}

/* 输入区域 */
.input-section, .output-section {
    background-color: #f9fafc;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e1e5eb;
}

.input-section h2, .output-section h2 {
    color: #1a3a6c;
    font-size: 1.6rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5eb;
}

/* 文本输入框 */
textarea {
    width: 100%;
    min-height: 350px;
    padding: 20px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 15px;
    line-height: 1.5;
    border: 2px solid #d1d9e6;
    border-radius: 10px;
    resize: vertical;
    margin-bottom: 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: white;
}

textarea:focus {
    outline: none;
    border-color: #4a7dff;
    box-shadow: 0 0 0 3px rgba(74, 125, 255, 0.2);
}

textarea::placeholder {
    color: #999;
}

/* 控制区域 */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.select-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #444;
}

select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #d1d9e6;
    background-color: white;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #4a7dff;
}

/* 按钮样式 */
button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: #1a73e8;
    color: white;
}

.btn-primary:hover {
    background-color: #0d62d9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

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

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

/* 输出区域 */
.output-container {
    background-color: white;
    border: 2px solid #d1d9e6;
    border-radius: 10px;
    padding: 20px;
    min-height: 350px;
    margin-bottom: 20px;
    overflow: auto;
}

#outputText {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #333;
}

.output-info {
    background-color: #e8f4fd;
    border-radius: 10px;
    padding: 18px;
    border-left: 4px solid #1a73e8;
}

.output-info p {
    font-weight: 600;
    color: #1a3a6c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.output-info ul {
    list-style-type: none;
    padding-left: 5px;
}

.output-info li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.output-info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px 0;
    border-top: 2px solid #eaeaea;
    color: #666;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    button, select {
        width: 100%;
    }

    .select-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}