* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
    background-color: #1a2835;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.app-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background-color: #2a3d52;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(2px);
    border: none;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px 10px 14px;
    background: transparent;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
    flex-shrink: 0;
    min-height: 68px;
    gap: 8px;
}
.top-bar * {
    pointer-events: none;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    position: relative;
}

.logo-img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #5a6f7e;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    background-color: #4a6072;
}

.copyright-notice {
    font-size: 8px;
    font-weight: 300;
    color: rgba(138, 174, 201, 0.6);
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    margin-top: 1px;
    -webkit-text-fill-color: rgba(138, 174, 201, 0.6);
}

.title-group {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex: 1;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
    padding-right: 4px;
}

.main-title {
    font-size: clamp(20px, 5vw, 40px);
    font-weight: 800;
    color: #eaf0f5;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: clamp(3px, 1.2vw, 10px);
    background: linear-gradient(180deg, #f6f9fc 20%, #b8ccdb 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.watermark {
    position: absolute;
    right: 0;
    bottom: -10px;
    font-size: clamp(9px, 1.8vw, 14px);
    font-weight: 300;
    color: #8aaec9;
    letter-spacing: 0.3px;
    opacity: 0.7;
    white-space: nowrap;
    -webkit-text-fill-color: #8aaec9;
    background: transparent;
    padding: 0 2px;
    line-height: 1.2;
}

.main-layout {
    display: flex;
    flex: 1;
    position: relative;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.sidebar {
    width: clamp(150px, 18vw, 180px);
    background: rgba(44, 62, 78, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 5px 8px 8px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    height: 100%;
}

.sidebar-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 10px);
    color: #c8dae8;
    font-size: clamp(11px, 1.6vw, 17px);
    font-weight: 550;
    padding: clamp(6px, 1.2vh, 12px) clamp(6px, 1vw, 12px);
    border-radius: 20px 6px 6px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid transparent;
    transition: all 0.15s;
    letter-spacing: 0.3px;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    min-height: clamp(32px, 5vh, 48px);
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #8ab3d0;
}

.sidebar-item.active {
    background: rgba(70, 130, 180, 0.3);
    border-left-color: #7fc1e6;
    color: #f0f8ff;
    box-shadow: inset 0 0 12px rgba(90, 180, 255, 0.1);
}

.sidebar-item .sidebar-icon {
    width: clamp(18px, 3vw, 32px);
    height: clamp(18px, 3vw, 32px);
    flex-shrink: 0;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 2.2vw, 22px);
    color: #8aaec9;
    opacity: 0.8;
    transition: all 0.2s;
}
.sidebar-item.active .sidebar-icon {
    opacity: 1;
    color: #f0f8ff;
}

.sidebar-item span {
    font-size: clamp(11px, 1.4vw, 16px);
    font-weight: 550;
    line-height: 1.2;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 6px;
    margin-top: 4px;
    flex-shrink: 0;
    text-align: center;
}
.sidebar-footer .footer-text {
    font-size: clamp(10px, 1.2vw, 13px);
    color: #b0c8d8;
    line-height: 1.5;
    opacity: 0.85;
}
.sidebar-footer .footer-text .highlight {
    color: #7fc1e6;
    font-weight: 600;
}
.sidebar-footer .qr-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}
.sidebar-footer .qr-wrapper img {
    width: clamp(44px, 8vw, 72px);
    height: clamp(44px, 8vw, 72px);
    border-radius: 8px;
    background: #2c3e4e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    object-fit: contain;
    padding: 3px;
    cursor: pointer;
    transition: transform 0.2s;
}

.content-area {
    flex: 1;
    padding: clamp(8px, 1.5vh, 18px) clamp(10px, 1.5vw, 18px) clamp(8px, 1.2vh, 14px) clamp(10px, 1.5vw, 18px);
    background: rgba(50, 68, 82, 0.25);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #cbdae6;
    font-size: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
    min-height: 0;
    height: 100%;
}

.content-panel {
    background: rgba(255, 255, 255, 0.03);
    border-radius: clamp(12px, 2vw, 18px);
    padding: clamp(10px, 1.5vh, 18px) clamp(10px, 1.5vw, 18px) clamp(8px, 1.2vh, 14px) clamp(10px, 1.5vw, 18px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(2px);
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    text-align: center;
    padding-bottom: clamp(6px, 1vh, 12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.panel-header .panel-title {
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 600;
    letter-spacing: clamp(2px, 0.5vw, 4px);
    background: linear-gradient(135deg, #e0edf5, #b6ccdd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.panel-header .panel-desc {
    margin-top: 2px;
    font-size: clamp(12px, 1.4vw, 15px);
    opacity: 0.8;
    color: #b8ccdb;
    -webkit-text-fill-color: #b8ccdb;
}

.scroll-wrapper {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: clamp(8px, 1.2vh, 14px);
    padding-right: 4px;
}
.scroll-wrapper::-webkit-scrollbar {
    width: 6px;
}
.scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}
.scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
}
.scroll-wrapper {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.05);
}

.sections-container {
    padding-right: 2px;
}

.section-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: clamp(10px, 1.5vw, 14px);
    margin-bottom: clamp(6px, 0.8vh, 10px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transition: all 0.2s;
    flex-shrink: 0;
}
.section-item:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(8px, 1.2vh, 14px) clamp(12px, 1.5vw, 18px);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    border-radius: clamp(10px, 1.5vw, 14px);
}
.section-header:hover {
    background: rgba(255, 255, 255, 0.06);
}
.section-header .section-name {
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 500;
    color: #dce8f0;
    letter-spacing: 0.5px;
}
.section-header .section-toggle {
    font-size: clamp(16px, 2vw, 22px);
    color: #8aaec9;
    transition: transform 0.25s ease;
    opacity: 0.7;
}
.section-item.expanded .section-header .section-toggle {
    transform: rotate(180deg);
}

.section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 clamp(10px, 1.5vw, 14px) clamp(10px, 1.5vw, 14px);
}
.section-item.expanded .section-body {
    max-height: 400px;
    overflow-y: auto;
    padding: clamp(8px, 1.2vh, 14px) clamp(12px, 1.5vw, 18px) clamp(10px, 1.5vh, 18px) clamp(12px, 1.5vw, 18px);
}
.section-body::-webkit-scrollbar {
    width: 4px;
}
.section-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}
.section-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}
.section-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.rich-group {
    margin-bottom: clamp(10px, 1.5vh, 16px);
    padding-bottom: clamp(10px, 1.5vh, 16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rich-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.rich-text-content {
    font-size: clamp(13px, 1.4vw, 16px);
    color: #c8dae8;
    line-height: 1.8;
}
.rich-text-content p {
    margin-bottom: 4px;
}

.rich-text-content .bracket-copyable {
    color: #7fc1e6;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-style: dotted;
    transition: color 0.2s;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-block;
}
.rich-text-content .bracket-copyable:hover {
    color: #a8d8ff;
    background: rgba(127, 193, 230, 0.15);
}
.rich-text-content .bracket-copyable:active {
    color: #4a9fd4;
}

.rich-text-content .coord-x {
    color: #f0a030;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-style: solid;
    transition: color 0.2s;
    padding: 1px 3px;
    border-radius: 4px;
    display: inline-block;
}
.rich-text-content .coord-x:hover {
    color: #ffb84d;
    background: rgba(240, 160, 48, 0.2);
}
.rich-text-content .coord-x:active {
    color: #d4891a;
}

.rich-text-content .coord-y {
    color: #4fc3f7;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-style: solid;
    transition: color 0.2s;
    padding: 1px 3px;
    border-radius: 4px;
    display: inline-block;
}
.rich-text-content .coord-y:hover {
    color: #81d4fa;
    background: rgba(79, 195, 247, 0.2);
}
.rich-text-content .coord-y:active {
    color: #29b6f6;
}

.rich-text-content .img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: clamp(6px, 0.8vh, 10px) 0 clamp(2px, 0.3vh, 4px) 0;
}
.rich-text-content .img-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: clamp(8px, 1.2vw, 12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s;
    display: block;
    width: 100%;
    min-height: clamp(50px, 8vh, 80px);
    background-color: #3d5365;
    background-image: linear-gradient(135deg, #3d5365 25%, #4a6072 50%, #3d5365 75%);
    background-size: 200% 200%;
    animation: imgLoading 1.5s ease-in-out infinite;
    opacity: 0;
}
.rich-text-content .img-wrapper img.loaded {
    opacity: 1;
    animation: none;
    background-image: none;
    background-color: transparent;
}
.rich-text-content .img-wrapper img:active {
    transform: scale(0.97);
}
@keyframes imgLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.rich-text-content .img-wrapper .img-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: #8aa3b5;
    font-size: clamp(12px, 1.2vw, 14px);
    border-radius: clamp(8px, 1.2vw, 12px);
    min-height: clamp(50px, 8vh, 80px);
    width: 100%;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    padding: 10px;
    text-align: center;
}
.rich-text-content .img-wrapper .img-fallback.show {
    display: flex;
}

.no-image-placeholder {
    color: #8aa3b5;
    font-size: clamp(12px, 1.2vw, 14px);
    opacity: 0.5;
    padding: clamp(8px, 1vh, 12px) 0;
    text-align: center;
}

.copy-toast {
    position: fixed;
    bottom: clamp(20px, 4vh, 40px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #eaf0f5;
    padding: clamp(6px, 1vh, 10px) clamp(16px, 3vw, 28px);
    border-radius: 30px;
    font-size: clamp(12px, 1.4vw, 15px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}
.copy-toast.show {
    opacity: 1;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.93);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    padding: 20px;
}
.fullscreen-overlay.active {
    display: flex;
}
.fullscreen-overlay img {
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .sidebar::-webkit-scrollbar {
        width: 0;
        display: none;
    }
    .scroll-wrapper::-webkit-scrollbar {
        width: 0;
        display: none;
    }
    .section-body::-webkit-scrollbar {
        width: 0;
        display: none;
    }
}

@media (max-width: 360px) {
    .sidebar {
        width: 88px;
        padding: 6px 3px 6px 5px;
    }
    .sidebar-item {
        font-size: 10px;
        padding: 4px 4px 4px 3px;
        gap: 3px;
        min-height: 28px;
        border-radius: 14px 4px 4px 14px;
    }
    .sidebar-item .sidebar-icon {
        width: 16px;
        height: 16px;
        font-size: 12px;
    }
    .sidebar-item span {
        font-size: 10px;
    }
    .logo-img {
        width: 48px;
        height: 48px;
    }
    .copyright-notice {
        font-size: 6px;
    }
    .main-title {
        font-size: 16px;
        letter-spacing: 1px;
    }
    .watermark {
        font-size: 8px;
        bottom: -8px;
    }
    .top-bar {
        padding: 8px 8px 6px 8px;
        min-height: 54px;
    }
    .section-item.expanded .section-body {
        max-height: 250px;
    }
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 960px;
        max-height: 880px;
        border-radius: 24px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.06);
    }
    .logo-img {
        width: 72px;
        height: 72px;
    }
    .copyright-notice {
        font-size: 10px;
    }
    .sidebar {
        width: 180px;
        padding: 16px 12px 14px 16px;
    }
    .sidebar-item {
        font-size: 17px;
        padding: 12px 14px 12px 12px;
        min-height: 50px;
        gap: 12px;
    }
    .sidebar-item .sidebar-icon {
        width: 32px;
        height: 32px;
        font-size: 22px;
    }
    .sidebar-item span {
        font-size: 13px;
    }
    .section-item.expanded .section-body {
        max-height: 500px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .app-container {
        max-width: 100%;
        border-radius: 16px;
    }
    .sidebar {
        width: 150px;
    }
    .logo-img {
        width: 56px;
        height: 56px;
    }
    .section-item.expanded .section-body {
        max-height: 380px;
    }
}

@media (max-width: 640px) {
    .section-item.expanded .section-body {
        max-height: 300px;
    }
}

/* =============================================
   底部备案信息 - 固定在页面底部
   ============================================= */
.footer-beian {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(26, 40, 53, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    text-align: center;
    flex-shrink: 0;
}

/* 给主容器底部留出空间，防止内容被遮盖 */
.app-container {
    padding-bottom: 44px;
}

.footer-beian-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-beian-inner a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-beian-inner a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-beian-divider {
    opacity: 0.3;
}

/* 小屏适配 */
@media (max-width: 480px) {
    .footer-beian {
        padding: 6px 12px;
    }
    .footer-beian-inner {
        font-size: 10px;
        gap: 6px;
    }
    .app-container {
        padding-bottom: 38px;
    }
}

@media (max-width: 360px) {
    .footer-beian-inner {
        font-size: 9px;
        flex-direction: column;
        gap: 2px;
    }
    .footer-beian-divider {
        display: none;
    }
    .app-container {
        padding-bottom: 52px;
    }
}