/* 顶部工具栏样式 */
.top-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-radius: 6px;
    background-color: #f9f9f9;
    border: 1px solid #d9d9d9;
    margin-bottom: 20px;
}

.top-toolbar .action-buttons {
    display: flex;
    gap: 10px;
}

.top-toolbar .format-options {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-toolbar .format-options label {
    display: flex;
    align-items: center;
    margin: 0;
    font-weight: 500;
    color: #555;
}

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

.tool-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 90px);
}

.tab-button {
    background-color: #f5f5f5;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-button.active {
    background-color: #4299e1;
    color: white;
    font-weight: 600;
}

.tab-button:hover:not(.active) {
    background-color: #e6f7ff;
}

.io-container {
    flex: 1;
    display: flex;
    gap: 25px;
    min-height: 0;
    margin-bottom: 20px;
}

.io-container .input-section,
.io-container .output-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

.input-section label,
.output-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

#docker-input,
#docker-output {
    flex: 1;
    width: 100%;
    max-height: none; /* 移除最大高度限制 */
    padding: 15px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-family: 'Consolas', 'Courier New', monospace;
    resize: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    overflow-y: auto;
}

#docker-input:focus,
#docker-output:focus {
    border-color: #4299e1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

#docker-input {
    min-height: 200px;
}

.output-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.output-actions {
    display: flex;
    gap: 10px;
}

.output-header .left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#docker-convert .output-header label {
    margin-bottom: 0;
    font-weight: bold;
}

.output-header .ant-btn {
    position: absolute;
    top: -7px;
    right: 5px;
    padding: 6px 10px;
    font-size: 12px;
    background-color: #f0f0f0;
    border-color: #d9d9d9;
}

.ant-btn {
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.ant-btn:hover {
    background-color: #e6f7ff;
    border-color: #4299e1;
    color: #4299e1;
}

.ant-btn.primary {
    background-color: #4299e1;
    border-color: #4299e1;
    color: white;
}

.ant-btn.primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* 文本域样式 */
#docker-convert .input-section textarea,
#docker-convert .output-section #docker-output-container {
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

#docker-convert .output-section #docker-output-container {
    background-color: #f9f9f9;
    white-space: pre-wrap;
    overflow: auto;
    min-height: 200px;
}

#docker-convert .input-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#docker-convert .input-section textarea {
    background-color: #fff;
}

#docker-convert .toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

#docker-convert .format-options {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    border-radius: 4px;
}

#docker-convert .format-options label {
    display: flex;
    align-items: center;
    margin: 0;
}

#docker-convert .format-options input[type="number"] {
    width: 50px;
    margin-left: 5px;
    padding: 4px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

#docker-convert .output-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#docker-convert .output-section textarea {
    width: 100%;
    min-height: 300px;
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    background-color: #f9f9f9;
}

#docker-convert .error-message {
    margin-top: 15px;
    padding: 10px;
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 4px;
    color: #ff4d4f;
}

/* Docker 高亮样式 */
.docker-key {
    color: #003399;
    font-weight: bold;
}

.docker-string {
    color: #008800; /* 绿色 */
}

.docker-number {
    color: #ff6600; /* 橙红色 */
}

.docker-boolean {
    color: #cc0099; /* 蓝色 */
}

.docker-null {
    color: #9900cc; /* 粉色 */
}

.docker-punctuation {
    color: #333; /* 黑色 */
}

/* 输出区域容器 */
#docker-output-container {
    width: 100%;
    flex: 1; /* 使用弹性布局 */
    padding: 15px;
    min-height: 200px; /* 设置最小高度而非固定高度 */
    max-height: none; /* 移除最大高度限制 */
    height: auto; /* 自动高度 */
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background-color: #fafafa;
    font-family: 'Consolas', 'Courier New', monospace;
    overflow: auto;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    line-height: 1.4;
}

/* Prism.js 代码高亮样式覆盖 */
#docker-output-container pre {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    overflow: auto;
    border-radius: 6px;
}

#docker-output-container code {
    border-radius: 6px;
    display: block;
    font-family: 'Consolas', 'Courier New', monospace;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* 确保高亮容器正确显示 */
#docker-output-container {
    width: 100%;
    flex: 1; /* 使用弹性布局 */
    min-height: 200px; /* 设置最小高度而非固定高度 */
    max-height: none; /* 移除最大高度限制 */
    height: auto; /* 自动高度 */

    border-radius: 6px;

    overflow: auto;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    line-height: 1.4;
}



/* 转换结果信息区域 */
.conversion-info {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-section {
    background-color: #f9f9f9;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 15px;
}

.info-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.info-section ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.info-section li {
    margin-bottom: 5px;
    color: #555;
}

.error-section {
    background-color: #fff2f0;
    border-color: #ffccc7;
}

.error-section h4 {
    color: #ff4d4f;
}

.error-section li {
    color: #ff4d4f;
}

/* 通知消息样式 */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

.copy-notification.success {
    background-color: #52c41a;
}

.copy-notification.warning {
    background-color: #faad14;
}

.copy-notification.error {
    background-color: #ff4d4f;
}

.copy-notification.info {
    background-color: #4299e1;
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector {
    color: #005bbd !important;
}

.token.attr-value, .token.char, .token.regex, .token.string, .token.variable{
    color: #2f8f00 !important;
}

.token.punctuation{
    color: #000000 !important;
}

code[class*=language-], pre[class*=language-]{
    color: #000000 !important;
}

/*!* 针对 YAML 代码块禁用自动换行 *!*/
/*#docker-output-container code[class*="language-yaml"],*/
/*#docker-output-container pre[class*="language-yaml"] {*/
/*    white-space: pre !important;*/
/*    overflow-x: auto;*/
/*}*/

/*!* 确保高亮容器正确显示 *!*/
/*#docker-output-container {*/
/*    white-space: pre !important;*/
/*    overflow-x: auto;*/
/*}*/