:root {
    --primary-color: #0082ef;
    --primary-hover: #267ef0;
    --text-color: #333333;
    --text-secondary: #6c7076;
    --border-color: #edeeef;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    min-width: 350px;
    overflow-y: auto;
    overflow-x: hidden;
}

.top-section {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    min-height: 72px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-img {
    width: 140px;
    height: auto;
    object-fit: contain;
}

.base-title {
    font-size: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-left: 20px;
    margin: 0;
    cursor: pointer;
}

.base-title::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 18px;
    background-color: var(--primary-color);
    opacity: 0.7;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    flex-shrink: 0;
}

.header-btn:hover {
    background-color: rgba(0, 130, 239, 0.08);
    color: var(--primary-color);
}

.search-wrapper {
    display: none;
    align-items: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 12px;
    width: 300px;
    box-shadow: var(--shadow-md);
    height: 44px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
}

.search-wrapper.active {
    display: flex;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    padding: 0 8px;
    height: 100%;
    color: var(--text-color);
    min-width: 0;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.search-btn:hover {
    background-color: rgba(0, 130, 239, 0.1);
}

.search-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.login-btn {
    min-width: 90px;
    height: 40px;
    box-sizing: border-box;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
    flex-shrink: 0;
}

.login-btn:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.main {
    flex: 1;
    padding: 32px 0;
    min-height: calc(100vh - 100px);
}

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

.content-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.content-card:last-child {
    margin-bottom: 0;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    cursor: pointer;
}

.dropdown_menu {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}



@media (max-width: 992px) {
    .top-content {
        padding: 0 16px;
    }

    .content {
        padding: 0 16px;
    }

    .logo-img {
        width: 120px;
    }

    .base-title {
        font-size: 18px;
        padding-left: 18px;
    }

    .main {
        padding: 24px 0;
    }
}

@media (max-width: 768px) {
    body {
        background-color: var(--card-bg);
    }

    .main {
        padding: 16px 0;
        min-height: calc(100vh - 60px);
    }

    .header-container {
        padding: 12px 0;
        min-height: 60px;
    }

    .top-content {
        padding: 0 16px;
    }

    .content {
        padding: 0;
    }

    .logo-section {
        gap: 8px;
    }

    .logo-img {
        width: 100px;
    }

    .base-title {
        font-size: 16px;
        padding-left: 16px;
    }

    .base-title::before {
        width: 1px;
        height: 16px;
        left: 6px;
    }

    .header-actions {
        gap: 12px;
    }

    .header-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .search-wrapper {
        width: 260px;
    }

    .login-btn {
        min-width: 40px;
        width: 40px;
        height: 36px;
        padding: 0;
    }

    .login-text {
        display: none;
    }

    .content-card {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: none;
        margin-bottom: 0;
        padding: 20px 16px;
    }

    .content-card:last-child {
        border-bottom: none;
    }
}

@media (max-width: 576px) {
    body {
        overflow-x: auto;
    }

    .top-content {
        padding: 0 12px;
    }

    .header-container {
        padding: 8px 0;
    }

    .main {
        min-height: calc(100vh - 56px);
        padding: 12px 0;
    }

    .logo-img {
        width: 90px;
    }

    .base-title {
        font-size: 15px;
        padding-left: 14px;
    }

    .header-btn {
        width: 32px;
        height: 32px;
    }

    .search-wrapper {
        width: 240px;
    }

    .login-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .content-card {
        padding: 16px 12px;
    }
}


.ckeditor-wrapper,
.ckeditor-wrapper>*,
.ckeditor-wrapper .cke {
    width: 100% !important;
    max-width: none !important;
    min-width: unset !important;
}

@media (max-width: 576px) {

    /* 移动端工具栏优化 */
    .ckeditor-wrapper .cke_top {
        padding: 4px 6px !important;
    }

    .ckeditor-wrapper .cke_toolbar {
        margin: 2px !important;
    }

    .ckeditor-wrapper .cke_button {
        padding: 2px 4px !important;
    }
}

@media (max-width: 480px) {

    /* 简化工具栏 */
    .ckeditor-wrapper .cke_toolbar_separator {
        display: none !important;
    }

    .ckeditor-wrapper .cke_toolgroup {
        margin: 1px !important;
    }
}