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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 确保 header 样式与 portal 一致 */
.header {
    padding: 1rem 0 !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 16px;
    color: #7f8c8d;
}

/* 控制栏 */
.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.control-left,
.control-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-center {
    display: flex;
    gap: 10px;
}

.panel-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.control-btn {
    padding: 8px 16px;
    font-size: 14px;
    color: #555;
    background-color: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.control-btn:active {
    background-color: #e8e8e8;
}

/* 主内容区域 */
.main-content {
    display: flex;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    min-height: 600px;
    height: calc(100vh - 300px);
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.panel-left {
    border-right: 1px solid #e0e0e0;
}

.json-textarea {
    width: 100%;
    height: 100%;
    padding: 20px;
    border: none;
    outline: none;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    resize: none;
}

.json-textarea::placeholder {
    color: #999;
}

.json-output {
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.placeholder-text {
    color: #999;
    font-style: italic;
    text-align: center;
    padding-top: 50px;
}

/* JSON 格式化样式 */
.json-output .json-key {
    color: #881391;
}

.json-output .json-string {
    color: #1a1aa6;
}

.json-output .json-number {
    color: #1c00cf;
}

.json-output .json-boolean {
    color: #0e22a0;
}

.json-output .json-null {
    color: #808080;
}

/* 分隔线 */
.divider {
    width: 1px;
    background-color: #e0e0e0;
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }

    .panel-left {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        min-height: 300px;
    }

    .divider {
        display: none;
    }

    .control-bar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .control-left,
    .control-center,
    .control-right {
        justify-content: center;
        flex-wrap: wrap;
    }
}
