/* 成熟稳定型 */
:root {
    --primary: #6fb6b8;
    --secondary: #badfe7;
    --accent: #388087;
    --bg: rgba(101, 166, 167, 0.8); /* #f6f6f2 */
    --card-bg: rgba(255, 255, 255, 0.96); /* 修改为接近白色 */
    --section-bg: linear-gradient(to right, #388087, #7ccdce);
    --text: #2d4b4c;
    --nav-width: 500px;
    --sidebar-gradient: linear-gradient(to bottom, #6fb6b8, #5aa4a6);
    --zoom-overlay-bg: rgba(56, 128, 135, 0.6);
}

/* 以下保持完全相同的结构，仅卡片背景变化 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 16px;
}

.main-container {
    display: flex;
    margin-left: 40px;
    transition: margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--nav-width);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(56, 128, 135, 0.1);
    padding: 1rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.nav-visible .nav-container {
    transform: translateX(0);
}

.nav-visible .main-container {
    margin-left: var(--nav-width);
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.nav-title {
    font-size: 1.25rem;
    color: var(--text);
    font-weight: 600;
}

.toggle-btn {
    background: rgba(111, 182, 184, 0.1);
    border: none;
    color: var(--secondary);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.toggle-btn:hover {
    background: var(--primary);
    color: white;
}

.nav-list {
    list-style: none;
}

.nav-item {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: var(--text);
}

.nav-item:hover {
    background: rgba(186, 223, 231, 0.3);
    color: var(--accent);
}

.content-container {
    flex: 1;
    padding: 2rem;
    max-width: 95vw;
    margin: 0 auto;
    min-height: 95vh;
    position: relative;
}

.knowledge-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.1rem;
    color: white;
    margin-bottom: 1.5rem;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--section-bg);
    border-radius: 12px;
    box-shadow: 6px 6px 12px rgba(56, 128, 135, 0.7);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    position: relative;
}

.card {
    background: var(--card-bg); /* 已修改为接近白色 */
    border-radius: 16px;
    padding: 1rem;
    position: relative;
    border: 2px solid rgba(111, 182, 184, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 6px 6px 12px rgba(56, 128, 135, 0.7);
    font-size: 1.8rem;
    z-index: 1;
    overflow: hidden;
}
/*知识卡片第一行文字加粗*/
.card::first-line {
    font-weight: bold;
	color: #388087;/*var(--primary)*/
}
.card:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(56, 128, 135, 0.15);
    background: #ffffff;
    border-color: #E67C30;/*var(--primary)*/;/*#E67C30 #CC5500 #4E3524 #3E2723*/
    z-index: 10;
}

.card.zoomed {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2);
    z-index: 200;
    box-shadow: 0 20px 40px rgba(56, 128, 135, 0.2) !important;
    border-color:var(--primary) !important;/*var(--primary) !important*/
    background: #ffffff !important;
    width: 680px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--zoom-overlay-bg);
    z-index: 150;
    display: none;
}

.zoom-overlay.active {
    display: block;
}

.zoom-icon,
.toggle-icon {
    position: absolute;
    bottom: 1rem;
    right: 3rem;
    font-size: 1.2rem;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10;
}

.toggle-icon {
    right: 3rem;
    color: var(--accent);
}

.zoom-icon {
    right: 1rem;
    color: var(--primary);
}

.zoom-icon:hover,
.toggle-icon:hover {
    color: var(--secondary);
}

.highlight {
    color: var(--accent);
    font-weight: 500;
}

.thumbnail-img {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid rgba(111, 182, 184, 0.3);
}

.card.zoomed .thumbnail-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 1rem 0;
}

.image-preview {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 98vw;
    max-height: 98vh;
    border: 2px solid rgba(3, 126, 120, 1.0);
    z-index: 300;
    box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.3);
    display: none;
    border-radius: 20px;
}

.image-preview.active {
    display: block;
}

@media (max-width: 768px) {
    .card {
        font-size: 1.4rem;
    }
    .zoom-icon,
    .toggle-icon {
        right: 2.5rem;
        font-size: 1.1rem;
    }
    .card.zoomed {
        width: 90vw;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.font-controls {
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 50;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(56, 128, 135, 0.1);
    display: flex;
    gap: 0.5rem;
}

.font-controls button {
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.font-controls button:hover {
    background: rgba(56, 128, 135, 0.05);
    color: var(--text);
}