/* 看板娘容器板块 */
.cat-container {
    position: fixed !important;
    right: 5px !important;
    bottom: 0px !important;
    z-index: 998 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    transition: all 0.5s ease;
}

/* 按钮容器 - 垂直排列按钮组 */
.button-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    margin-right: 10px !important;
    z-index: 1000 !important;
}

/* 确保按钮可以点击 */
#catToggleBtn, #catInfoBtn, #catStatus, #catInfo {
    pointer-events: auto !important;
}

/* 强制覆盖所有Live2D相关元素 - 主要样式控制 */
#live2dcanvas, .live2d-widget, .canvas-container, .live2d-tip,
div[id*="live2d"], div[class*="live2d"], canvas[id*="live2d"],
iframe[id*="live2d"], .live2d, .live2d-model, .live2d-container,
.live2d-wrapper {
    position: fixed !important;
    right: 5px !important;
    left: auto !important;
    bottom: 0px !important;
    top: auto !important;
    width: 190px !important;
    height: 300px !important;
    z-index: 1 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 看板娘核心样式 */
#live2dcanvas {
    width: 190px !important;
    height: 300px !important;
    transition: all 0.5s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-left: 10px !important;
    margin-bottom: 0 !important;
    opacity: 1 !important;
    background: transparent !important;
}

/* 隐藏/显示按钮 - 在板块内 */
#catToggleBtn {
    position: relative !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #8b9dc3 0%, #a4b8e5 100%);
    color: white;
    border: none;
    border-radius: 60% !important;
    cursor: pointer;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(139, 157, 195, 0.3);
    margin-bottom: 10px !important;
    z-index: 1002 !important;
}

#catToggleBtn:hover {
    background: linear-gradient(135deg, #9ca8d3 0%, #b8c6eb 100%);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(139, 157, 195, 0.5);
}



/* 头部提示信息 - 显示在板娘头上 */
#catStatus {
    position: absolute !important;
    top: -50px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 6px 12px;
    background: linear-gradient(135deg, #a8b5e6 0%, #c0c8f0 100%);
    color: #2c3e50;
    border-radius: 18px;
    font-size: 12px;
    display: none;
    animation: fadeInOut 2.5s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    z-index: 1003 !important;
    min-width: 80px;
    text-align: center;
}

/* 头部提示信息样式 */
#catInfo {
    position: absolute !important;
    top: -80px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 10px 14px;
    background: linear-gradient(135deg, #b0c6f2 0%, #d0dcf8 100%);
    color: #2c3e50;
    border-radius: 18px;
    font-size: 12px;
    display: none;
    max-width: 200px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    z-index: 1003 !important;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* h2柔和橙色背景，修复宽度问题 */
h2 {
    background-color: #ffb88c;
    color: #2c3e50;
    width: 100%;
    padding: 12px 18px;
    margin-bottom: 18px;
    font-size: 1.5rem;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    border-radius: 8px;
    background-image: linear-gradient(to right bottom, #ffb88c, #ffa07a);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* h3柔和蓝色背景，修复超模问题 */
h3 {
    background-color: #b8d4f1;
    color: #2c3e50;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
    background-image: linear-gradient(to right bottom, #b8d4f1, #a8c0e1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}



/* 标题悬停效果 */
h2:hover, h3:hover {
    transform: translateY(-10px);
    box-shadow: 0 13px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}





body.dark-theme h2:hover, body.dark-theme h3:hover {
    transform: translateY(-10px);
    box-shadow: 0 13px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

/* 确保内容可交互 */
#home, .post, .entry, #toc, article {
    position: relative;
    z-index: 10;
    pointer-events: auto;
    padding: 0 15px;
}

a, button, input, select, textarea {
    position: relative;
    z-index: 20;
    pointer-events: auto;
}

/* 隐藏左侧导航菜单 */
#leftmenu {
    display: none !important;
}

/* 隐藏右侧统计菜单 */
#rightmenu {
    display: none !important;
}

/* 明暗主题切换按钮样式 */
#themeToggle {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
    padding: 10px 15px !important;
    background: linear-gradient(135deg, #8b9dc3 0%, #a4b8e5 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    font-family: Arial, sans-serif !important;
    font-weight: 500 !important;
}

#themeToggle:hover {
    background: linear-gradient(135deg, #9ca8d3 0%, #b8c6eb 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

#themeToggle:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

/* 暗色主题样式 */
body.dark-theme {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

body.dark-theme #midground,
body.dark-theme #foreground,
body.dark-theme #top {
    opacity: 0.3 !important;
    background-color: #2a2a2a !important;
}

body.dark-theme h2 {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
    color: #e0e0e0 !important;
}

body.dark-theme h3 {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
    color: #e0e0e0 !important;
}

body.dark-theme #themeToggle {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%) !important;
    color: #e0e0e0 !important;
}

body.dark-theme #themeToggle:hover {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
}

/* 暗色主题的板娘样式 */
body.dark-theme #live2dcanvas {
    filter: brightness(1.2) contrast(1.1);
}