
/* 全局样式设置 */
body {
    background-color: #F8FAFB; /* 主背景色，营造清新简洁的氛围 */
    color: #2E303E; /* 主要文字颜色，确保高对比度与可读性 */
    font-family: 'Roboto', sans-serif; /* 现代无衬线字体，提高整体美感 */
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* 标题样式 */
h2, h3, h4 {
    color: #2E303E;
    margin-bottom: 15px;
    font-weight: 700;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

/* 链接样式 */
a {
    color: #1A73E8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 栅格布局容器 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); /* 每个板块最小500px */
    gap: 30px;
    padding: 40px;
}

/* 卡片样式 */
.card {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影效果，增加立体感 */
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 平滑过渡效果 */
}

/* 卡片悬停效果 */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #1A73E8, #42B6F5); /* 渐变背景，营造动态感 */
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    color: #FFFFFF;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background: linear-gradient(45deg, #1558B0, #398EDB); /* 悬停时颜色加深 */
}

/* 图片样式 */
.image {
    width: 100%;
    border-radius: 8px; /* 圆角效果 */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* 阴影效果 */
    transition: transform 0.3s ease;
}

.image:hover {
    transform: scale(1.05); /* 悬停时放大效果 */
}

/* 代码块样式 */
pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
}

code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: #D63384;
}

/* 折叠区域样式 */
.collapsible {
    background-color: #E0E0E0;
    color: #2E303E;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.collapsible:hover {
    background-color: #CCCCCC;
}

.active, .collapsible.active {
    background-color: #B0BEC5;
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #F1F1F1;
    border-radius: 0 0 4px 4px;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #FFFFFF;
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .logo {
    font-size: 24px;
    font-weight: bold;
    color: #1A73E8;
}

.navbar .nav-links {
    display: flex;
    gap: 20px;
}

.navbar .nav-links a {
    font-size: 16px;
    color: #2E303E;
    position: relative;
}

.navbar .nav-links a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #1A73E8;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar .nav-links {
        flex-direction: column;
        width: 100%;
    }
    .grid-container {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

/* 动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555555;
    color: #FFFFFF;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* 显示在元素上方 */
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 按钮波纹效果 */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.ripple:active::after {
    transform: scale(4);
    opacity: 1;
    transition: 0s;
}

