:root {
    --color-primary: #1cbbb4;
    --color-primary-dark: #129b94;
    --color-surface: #ffffff;
    --color-bg: #f5f7fb;
    --color-text: #1f2a44;
    --color-muted: #6c7a90;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

/* 英雄区样式 */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 6rem 0;
}

.hero h1 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 特色功能样式 */
.features {
    padding: 6rem 0;
}

.features h2 {
    font-weight: 700;
    margin-bottom: 3rem;
}

.features .card {
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.features .icon {
    margin-bottom: 1.5rem;
}

/* 资源展示样式 */
.resources {
    padding: 6rem 0;
}

.resources h2 {
    font-weight: 700;
    margin-bottom: 3rem;
}

.resources h3 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.resources .card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.resources .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* 用户评价样式 */
.testimonials {
    padding: 6rem 0;
}

.testimonials h2 {
    font-weight: 700;
    margin-bottom: 3rem;
}

.testimonials .card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.testimonials .stars {
    margin-bottom: 1.5rem;
}

/* 联系我们样式 */
.contact {
    padding: 6rem 0;
}

.contact h2 {
    font-weight: 700;
    margin-bottom: 3rem;
}

.contact h3 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.contact form {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
}

.contact .form-group {
    margin-bottom: 1.5rem;
}

.contact .social-links {
    margin-top: 1.5rem;
}

.contact .btn-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.contact .btn-circle:hover {
    transform: translateY(-3px);
    background-color: #007bff;
    color: white;
}

/* 底部样式 */
footer {
    background-color: #343a40;
    color: white;
    padding: 4rem 0 2rem;
}

footer h3 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
    text-decoration: none;
}

footer .border-top {
    border-top-color: rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 2rem;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features,
    .resources,
    .testimonials,
    .contact {
        padding: 4rem 0;
    }

    .features h2,
    .resources h2,
    .testimonials h2,
    .contact h2 {
        font-size: 1.75rem;
    }

    .contact form {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .features h2,
    .resources h2,
    .testimonials h2,
    .contact h2 {
        font-size: 1.5rem;
    }

    .contact .btn-circle {
        width: 40px;
        height: 40px;
        margin-right: 0.5rem;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* 错误消息样式 */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

/* 成功消息样式 */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

/* 按钮样式 */
.btn-primary {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-outline-primary {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* 卡片样式 */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 图片样式 */
.img-fluid {
    transition: transform 0.3s ease;
}

.img-fluid:hover {
    transform: scale(1.05);
}

/* 图标样式 */
.fas,
.fab {
    transition: transform 0.3s ease;
}

.fas:hover,
.fab:hover {
    transform: scale(1.2);
}

/* 链接样式 */
a {
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* 表单样式 */
.form-control {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 列表样式 */
ul {
    list-style-type: none;
    padding-left: 0;
}

li {
    margin-bottom: 0.5rem;
}

/* 分隔线样式 */
hr {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 选择文本样式 */
::selection {
    background-color: #007bff;
    color: white;
}

/* 打印样式 */
@media print {
    .navbar,
    footer,
    .social-links {
        display: none;
    }

    .container {
        width: 100%;
        max-width: 100%;
    }
}

/* 无障碍样式 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    .card {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }

    .form-control {
        background-color: #2d2d2d;
        color: #e0e0e0;
        border-color: #444;
    }

    .form-control:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }
}

/* 加载页面样式 */
.loading-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f8f9fa;
}

.loading-page .loading-spinner {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* 404页面样式 */
.error-404 {
    padding: 6rem 0;
    text-align: center;
}

.error-404 h1 {
    font-size: 6rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 1rem;
}

.error-404 h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.error-404 p {
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #0062cc;
    transform: translateY(-3px);
}

/* 遮罩层样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
}

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

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

/* 延迟动画 */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}