/* ===== AI-CodeBuddy 教程页面样式 ===== */

.codebuddy-page {
    min-height: 100vh;
    padding-top: 70px;
    background: #0a0a17;
    display: flex;
}

/* ===== 左侧内容区 ===== */
.cb-content {
    flex: 1;
    padding: 30px 60px 60px;
    margin-left: 220px;
}

.cb-content .cb-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    color: #00ffc8;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(0,255,200,0.2);
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,255,200,0.1);
}

.cb-section {
    margin-bottom: 30px;
    background: rgba(15,15,30,0.6);
    border: 1px solid rgba(0,255,200,0.08);
    border-radius: 10px;
    padding: 24px 28px;
    transition: border-color 0.2s;
}

.cb-section:hover {
    border-color: rgba(0,255,200,0.2);
}

.cb-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.cb-section p, .cb-section li {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.8;
}

.cb-section code {
    display: block;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(0,255,200,0.1);
    border-radius: 6px;
    padding: 14px 16px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: #00ffc8;
    white-space: pre-wrap;
    line-height: 1.6;
}

.cb-section ul {
    padding-left: 20px;
    margin: 8px 0;
}

.cb-section ul li {
    list-style: none;
    position: relative;
    padding-left: 16px;
}

.cb-section ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #00ffc8;
    opacity: 0.5;
}

/* ===== 左侧导航栏 ===== */
.cb-sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: rgba(10,10,25,0.98);
    border-right: 1px solid rgba(0,255,200,0.1);
    padding: 24px 16px;
    overflow-y: auto;
    z-index: 100;
}

.cb-sidebar-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #00ffc8;
    letter-spacing: 2px;
    margin-bottom: 28px;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,255,200,0.08);
}

.cb-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cb-sidebar-nav a {
    display: block;
    padding: 10px 14px;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.88rem;
    transition: all 0.2s;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.cb-sidebar-nav a:hover,
.cb-sidebar-nav a.active {
    background: rgba(0,255,200,0.08);
    color: #00ffc8;
}

.cb-sidebar-nav a .nav-icon {
    display: inline-block;
    width: 20px;
    margin-right: 8px;
    text-align: center;
}

/* ===== 空状态 ===== */
.cb-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255,255,255,0.12);
    font-size: 0.9rem;
    line-height: 2;
}

.cb-empty .icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.3; }

/* ===== 加载 ===== */
.cb-loading {
    text-align: center;
    padding: 60px;
    color: rgba(255,255,255,0.2);
    font-size: 0.85rem;
}

.cb-loading .spinner {
    display: inline-block;
    width: 24px; height: 24px;
    border: 2px solid rgba(0,255,200,0.1);
    border-top-color: #00ffc8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }
