* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}
body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1px;
    max-width: 100%;
    overflow: hidden;
}
header {
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    flex-shrink: 0;
    position: relative;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
}
.logo i {
    font-size: 28px;
    color: #008800;
}
.logo h1 {
    font-size: 24px;
    color: #2c3e50;
    text-align: center;
}
.tagline {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 3px;
}
.header-tip {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}
.tip-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #128732;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: rgba(18, 135, 50, 0.1);
    transition: all 0.3s;
}
.tip-link:hover {
    background-color: rgba(18, 135, 50, 0.2);
    color: #0c5c23;
    text-decoration: underline;
}
.tip-link i {
    font-size: 14px;
}
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header-tip {
        position: static;
        transform: none;
        margin-top: 5px;
        order: 2;
    }

    .logo {
        order: 1;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }

    .logo i {
        font-size: 24px;
    }
}

.panel {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel-header {
    background-color: #128732;
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.panel-header .actions {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #fff;
    color: #4a6ee0;
}

.btn-primary:hover {
    background-color: #f0f4ff;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.panel-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.textarea-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.language-label {
    font-size: 13px;
    color: #666;
}

textarea {
    width: 100%;
    flex: 1;
    min-height: 100px;
    padding: 15px;
    border: 1px solid #e1e5eb;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: none;
    background-color: #f9fafc;
    transition: border-color 0.3s;
    overflow: auto;
}

textarea:focus {
    outline: none;
    border-color: #4a6ee0;
    box-shadow: 0 0 0 3px rgba(74, 110, 224, 0.1);
}

.convert-btn-container {
    text-align: center;
    margin: 15px 0;
    flex-shrink: 0;
}

.btn-convert {
    background-color: #128732;
    color: white;
    padding: 10px 25px;
    font-size: 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.btn-convert:hover {
    background-color: #008800;
    color: black;
}

.btn-convert:active {
    transform: translateY(1px);
}

.options {
    margin-top: 12px;
    padding: 12px;
    background-color: #f9fafc;
    border-radius: 6px;
    flex-shrink: 0;
}

.option-group {
    margin-bottom: 8px;
    display: inline-block;
    margin-right: 15px;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}

.option-group input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

.option-group span {
    font-weight: 700;
    margin-left: 100px;
}

.history-section {
    margin-top: 12px;
    flex-shrink: 0;
}

.history-list {
    margin-top: 8px;
    height: 150px;
    overflow-y: auto;
    border: 1px solid #eaeaea;
    border-radius: 4px;
}

.history-item {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    cursor: pointer;
    background-color: #f9f9f9;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background-color: #b0bbdb;
}

.success-message {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background-color: #2ecc71;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

.error-message {
    background-color: #e74c3c;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    display: none;
    font-size: 13px;
    flex-shrink: 0;
}

footer {
    text-align: center;
    padding: 10px 0;
    color: #7f8c8d;
    font-size: 12px;
    flex-shrink: 0;
    border-top: 1px solid #eaeaea;
    margin-top: 10px;
}

.copy-btn {
    background-color: #f0f4ff;
    color: #4a6ee0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #d0d9ff;
}

.copy-btn:hover {
    background-color: #e1e9ff;
}

/* 滚动条样式 */
textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 紧凑示例区域 */
.example-section {
    margin-top: 8px;
    font-size: 12px;
    flex-shrink: 0;
}

.example-btn {
    color: #4a6ee0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
    margin-left: 5px;
}

.example-btn:hover {
    color: #3a5bc7;
}

/* 最大化面板的专用样式 */
.maximized-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    margin: 0;
    border-radius: 0;
}

.maximize-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.maximize-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}