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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.container {
    width: 100%;
    max-width: 2000px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* 针对大屏幕显示器的优化 */
@media (min-width: 1800px) {
    .container {
        max-width: 1800px;
    }
}

/* 针对4K显示器的优化 */
@media (min-width: 3000px) {
    .container {
        max-width: 2200px;
    }
    
    .content {
        padding: 25px 40px;
    }
    
    textarea, .formatted-output {
        height: 400px;
    }
}

.header {
    background: linear-gradient(120deg, #2c3e50, #3498db);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.content {
    padding: 20px 30px;
}

.editor-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3498db;
}

textarea {
    width: 100%;
    height: 350px;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px 0;
}

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

.btn-primary {
    background: linear-gradient(120deg, #3498db, #2980b9);
    color: white;
}

.btn-secondary {
    background: linear-gradient(120deg, #2c3e50, #34495e);
    color: white;
}

.btn-success {
    background: linear-gradient(120deg, #27ae60, #2ecc71);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.formatted-output {
    width: 100%;
    height: 350px;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    background: #f8f9fa;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    white-space: pre;
    overflow: auto;
    line-height: 1.5;
}

.error-message {
    color: #e74c3c;
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Consolas', 'Courier New', monospace;
    white-space: pre-wrap;
}

.success-message {
    color: #27ae60;
    background: #f2fdf2;
    border: 1px solid #c6f5cb;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #ecf0f1;
}

/* 响应式设计 */
@media (max-width: 767px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .content {
        padding: 20px;
    }
    
    textarea, .formatted-output {
        height: 300px;
    }
}

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

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

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

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