/* 卡片布局 */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
}

.card * {
    text-decoration: none !important;
}

.card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
    transform: rotate(30deg);
    transition: all 0.5s ease;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.card:hover::before {
    transform: rotate(30deg) translateX(50px);
}

.card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-content {
    color: inherit;
}

.card-content h3,
.card-content p {
    text-decoration: none;
}

.card h3 {
    margin: 1rem 0;
    color: var(--primary-color);
}

/* 图标样式 */
.card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.article i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 英雄区域 */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/* 特性区域 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

/* 错误提示 */
.error {
    color: #e74c3c;
    padding: 1rem;
    text-align: center;
    background-color: var(--content-bg);
    border-radius: 4px;
}

/* 文章页布局 */
.article-container {
    display: flex;
    gap: 2rem;
    position: relative;
}

.article-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
}

.toc-sidebar {
    width: 280px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--content-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#toc-title {
    font-weight: bold;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

#toc ul {
    list-style: none;
    padding-left: 1rem;
    margin: 0;
}

#toc li {
    margin-bottom: 0.5rem;
}

#toc a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

#toc a:hover {
    color: var(--primary-color);
}

#toc li.level-2 {
    padding-left: 1rem;
}

#toc li.level-3 {
    padding-left: 2rem;
}
