/* body {
    margin: 0;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
} */

.window {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
    max-width: 1000px;
    margin: auto;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 顶部导航栏 */
.toolbar {
    display: flex;
    align-items: center;
    height: 36px;
    background: rgba(239, 239, 244, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0 12px;
    margin-bottom: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.toolbar .btn {
    font-size: clamp(11px, 1vw, 15px);
    font-weight: 500;
    padding: 5px 14px;
    margin-right: 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar .btn.active {
    background: rgba(0, 122, 255, 0.15);
    color: #0066cc;
}

.toolbar .btn:hover:not(.active) {
    background: rgba(142, 142, 147, 0.12);
}

.titlebar {
    display: flex;
    align-items: center;
    height: 28px;
    padding: 8px 12px;
    background: rgba(239, 239, 244, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.traffic-buttons {
    display: flex;
    gap: 8px;
}

.traffic-buttons .btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15);
    transition: all 0.1s ease;
}

.btn.close {
    background: #ff5f57;
}

.btn.minimize {
    background: #febc2e;
}

.btn.fullscreen {
    background: #28c840;
}

.traffic-buttons:hover .btn.close {
    background: #ff5f57 url("data:image/svg+xml;utf8,<svg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M1.5 1.5L4.5 4.5M4.5 1.5L1.5 4.5' stroke='rgba(0,0,0,0.5)' stroke-width='1' stroke-linecap='round'/></svg>") center no-repeat;
}

.traffic-buttons:hover .btn.minimize {
    background: #febc2e url("data:image/svg+xml;utf8,<svg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M1.5 3H4.5' stroke='rgba(0,0,0,0.5)' stroke-width='1' stroke-linecap='round'/></svg>") center no-repeat;
}

.traffic-buttons:hover .btn.fullscreen {
    background: #28c840 url("data:image/svg+xml;utf8,<svg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M2 1H4V3M4 5H2V3' stroke='rgba(0,0,0,0.5)' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/></svg>") center no-repeat;
}

.content-wrapper {
    display: flex;
    height: calc(60vh)+200px;
}

.left-pane {
    width: 66.66%;
    display: flex;
    flex-direction: column;
}

.right-pane {
    width: 33.33%;
    padding: 16px;
    box-sizing: border-box;
}

/* 响应式布局 - 小屏幕下改为上下结构 */
@media screen and (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        height: auto;
        /* 高度自适应内容 */
    }

    .left-pane,
    .right-pane {
        width: 100%;
        /* 宽度占满 */
    }

    .left-pane {
        order: 1;
        /* 确保左侧面板在上方 */
    }

    .right-pane {
        order: 2;
        /* 确保右侧面板在下方 */
        /* padding: 10px; */
        /* 小屏幕下减小内边距 */
    }

    /* 调整盒子大小以适应垂直布局 */
    .box {
        margin: 8px 10px;
        padding: 12px;
    }

    /* 调整顶部和底部盒子间距 */
    .top-box {
        margin-bottom: 4px;
    }

    .bottom-box {
        margin-top: 4px;
    }
}

/* Add responsive font sizing */
.box {
    flex: 1;
    margin: 10px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    overflow-y: auto;
    /* Responsive font size */
    line-height: 1.6;
}

/* Adjust size of specific content areas */
#textBox,
#translateBox,
#commentBox {
    font-size: clamp(14px, 1.2vw, 18px);
}

/* Scale headings proportionally if needed */
.box h1,
.box h2,
.box h3 {
    font-size: clamp(14px, 1.8vw, 22px);
}

.top-box {
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 5px;
}

.bottom-box {
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 5px;
}

.comment-box {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(214, 232, 247, 0.8);
}