/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: #ffffff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.nav-brand .tagline {
    font-size: 0.75rem;
    color: var(--text-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.btn-login {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: background 0.3s;
}

.btn-login:hover {
    background: var(--primary-hover);
}

/* Banner */
.banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.banner h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.banner p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 按钮 */
.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.btn-link:hover {
    color: var(--primary-hover);
}

/* 快速入口 */
.quick-access {
    padding: 4rem 0;
    background: white;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.access-card {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.access-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.access-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.access-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.access-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* 区块样式 */
.section {
    padding: 4rem 0;
}

.bg-light {
    background: var(--bg-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--text-color);
}

.more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* 工具卡片 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.tool-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.tool-header {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-logo {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tool-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.tool-info .tool-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tool-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-light);
    border-radius: 0.25rem;
    color: var(--text-light);
}

.tool-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: #fbbf24;
}

/* 工具导航页面 */
.tools-page {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.tools-header {
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-bar select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: white;
}

.tools-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.category-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.category-sidebar h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: block;
    padding: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: var(--bg-light);
    color: var(--primary-color);
}

.sidebar-stats {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

.tools-main {
    min-height: 500px;
}

.tools-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-options select {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover,
.pagination button.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 知识库页面 */
.knowledge-page {
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.learning-paths {
    margin-bottom: 4rem;
}

.paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.path-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    position: relative;
    transition: all 0.3s;
}

.path-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.path-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.path-card.beginner .path-badge {
    background: #dbeafe;
    color: #1e40af;
}

.path-card.intermediate .path-badge {
    background: #fef3c7;
    color: #92400e;
}

.path-card.expert .path-badge {
    background: #fce7f3;
    color: #831843;
}

.path-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.path-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.path-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.path-card ul li {
    padding: 0.5rem 0;
    color: var(--text-color);
}

.path-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 教程卡片 */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tutorial-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.tutorial-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.tutorial-card .tutorial-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.tutorial-card h3 {
    margin-bottom: 0.5rem;
}

.tutorial-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* 评测页面 */
.reviews-page {
    padding: 2rem 0;
}

.review-standards {
    margin-bottom: 4rem;
}

.standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.standard-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.standard-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.standard-card h3 {
    margin-bottom: 1rem;
}

.standard-card ul {
    list-style: none;
    text-align: left;
}

.standard-card ul li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

.reviews-list {
    display: grid;
    gap: 1.5rem;
}

.review-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.review-card:hover {
    box-shadow: var(--shadow-lg);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.review-tool {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-score {
    font-size: 1.5rem;
    font-weight: 600;
}

.review-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.review-summary {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.review-dimensions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.dimension-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

/* 对比工具 */
.compare-section {
    margin-top: 4rem;
}

.compare-tools {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.compare-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.compare-select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
}

.vs {
    font-weight: 600;
    color: var(--text-light);
}

.compare-results {
    min-height: 200px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.compare-table th,
.compare-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.compare-table th {
    background: var(--bg-light);
    font-weight: 600;
}

/* 社区页面 */
.community-page {
    padding: 2rem 0;
}

.community-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.qa-list,
.discussions-list {
    display: grid;
    gap: 1rem;
}

.qa-item,
.discussion-item {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.qa-item-header,
.discussion-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.qa-item-title,
.discussion-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.qa-item-meta,
.discussion-item-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 页脚 */
.footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 800px;
    width: 90%;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
}

.close:hover {
    color: var(--text-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .tools-layout {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        position: static;
    }

    .banner h2 {
        font-size: 1.75rem;
    }

    .section-header {
        flex-direction: column;
        align-items: start;
        gap: 1rem;
    }

    .compare-selector {
        flex-direction: column;
    }

    .vs {
        display: none;
    }
}

