* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --bg-color: #f8f9fa;
    --code-bg-color: #f1f1f1;
    --code-color: #333;
    --accent-color: #e74c3c;
    --border-color: #ddd;
}

body {
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    color: #333;
    opacity: 0;
    transition: opacity 0.5s;
}

body.page-loaded {
    opacity: 1;
}

.container {
    flex: 1;
    display: flex;
    height: 100%;
}

/* 导航侧边栏 */
.sidebar {
    width: 300px;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: 0.3s;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    border-right: 1px solid #eee;
    z-index: 1000;
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-width: 180px;
    height: auto;
}

/* 目录标题 */
.sidebar-title {
    padding: 12px 20px;
    font-size: 1.2em;
    font-weight: bold;
    border-bottom: 2px solid #eee;
    color: var(--primary-color);
    background-color: #f9f9f9;
}

/* 手机端导航按钮 */
.nav-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-decoration: none;
}

.nav-toggle i, 
.nav-toggle span {
    color: white;
    text-decoration: none;
}

/* 在移动设备上显示菜单按钮 */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
}

/* 菜单按钮悬停效果 */
.nav-toggle:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    background: #fcfcfc;
}

/* 主内容区标题 */
.main-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* 分类样式 */
.category {
    padding: 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category:hover {
    background: #f5f5f5;
}

.category-header {
    display: flex;
    align-items: center;
    font-weight: 600;
    padding: 15px;
    transition: all 0.3s ease;
}

.category:hover .category-header {
    color: var(--secondary-color);
    padding-left: 20px;
}

.category-header img {
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

/* 优化菜单切换按钮 - 只保留+号效果 */
.toggle-btn {
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    transition: all 0.3s ease;
    margin-left: auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 创建横线 */
.toggle-btn::before {
    content: '';
    display: block;
    width: 10px;
    height: 2px;
    background-color: white;
    position: absolute;
    transition: all 0.3s ease;
}

/* 创建竖线 */
.toggle-btn::after {
    content: '';
    display: block;
    width: 2px;
    height: 10px;
    background-color: white;
    position: absolute;
    transition: all 0.3s ease;
}

/* 展开状态旋转+号变成×号 */
.category-header.active .toggle-btn::before {
    transform: rotate(45deg);
}

.category-header.active .toggle-btn::after {
    transform: rotate(45deg);
}

.toggle-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1a5276);
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.toggle-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 子分类样式 */
.subcategory {
    padding-left: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    opacity: 0;
}

.subcategory.active {
    max-height: 2000px;
    opacity: 1;
}

.subcategory-item {
    padding: 12px 15px 12px 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.subcategory-item:hover {
    background-color: #f5f5f5;
    color: var(--secondary-color);
    padding-left: 50px;
}

.subcategory-item.selected {
    background: var(--secondary-color) !important;
    color: white !important;
    border-left: 4px solid #2980b9;
}

/* 提示词卡片 */
.prompt-card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0,0,0,0.05);
}

.prompt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.prompt-header span {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--primary-color);
}

.copy-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
}

.copy-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.copy-btn:active {
    transform: scale(0.98);
}

.prompt-desc {
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 8px 0;
}

.prompt-desc a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.prompt-desc a:hover {
    color: #2980b9;
    text-decoration: none;
}

.prompt-instruction {
    background-color: #1e1e2e;
    color: #e0f7fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    border-left: 4px solid var(--secondary-color);
}

/* 公告样式 */
.announcement {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-weight: 600;
    color: var(--accent-color);
    display: flex;
    align-items: center;
}

.announcement img {
    margin-right: 10px;
    width: 30px;
    height: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -300px;
        height: 100vh;
        z-index: 999;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 15px;
        margin-left: 0;
    }

    .logo {
        flex-direction: row;
        justify-content: space-between;
    }

    .prompt-card {
        padding: 15px;
        margin-bottom: 15px;
    }
}

@media (min-width: 769px) {
    .container {
        width: 1500px;
        margin: 0 auto;
    }
}

/* 底部版权信息 */
.footer {
    background-color: var(--primary-color);
    color: white !important;
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    color: white !important;
}

.footer-content a,
.footer-content span,
.footer-content div {
    color: white !important;
    text-decoration: none !important;
}

.beian {
    color: white !important;
    text-decoration: none !important;
}

.beian:hover {
    color: white !important;
    text-decoration: none !important;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1001;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: white;
    padding: 25px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    min-width: 300px;
    transform: scale(0.9);
    animation: modalOpen 0.3s forwards;
}

@keyframes modalOpen {
    to {
        transform: scale(1);
    }
}

.modal-button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s;
    font-weight: 500;
}

.modal-button:hover {
    background: #2980b9;
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 现代化搜索框设计 */
.search-container {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.search-box {
    display: flex;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

#search-input {
    flex: 1;
    padding: 12px 50px 12px 20px;
    border: none;
    border-radius: 30px;
    font-size: 0.9em;
    outline: none;
    transition: all 0.3s;
    width: 100%;
    background: transparent;
}

#search-input::placeholder {
    color: #aaa;
    transition: color 0.3s;
}

#search-input:focus::placeholder {
    color: #bbb;
}

#search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #3498db;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#search-btn:hover {
    background: #2980b9;
    transform: translateY(-50%) scale(1.05);
}

/* 添加页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 复制按钮点击效果 */
.copy-btn-clicked {
    background-color: #27ae60 !important;
}

/* 模态框动画 */
.modal-animation {
    animation: modalPulse 0.3s;
}

@keyframes modalPulse {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 回到顶部按钮 */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

#back-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-5px);
}

/* 修复超链接悬停样式 */
a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: none;
}

/* 添加点击反馈效果 */
.category-header:active, 
.subcategory-item:active {
    background-color: rgba(52, 152, 219, 0.1);
    transform: scale(0.98);
}