/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.logo {
    text-decoration: none;
    display: inline-block;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 50px;
    vertical-align: middle;
    max-width: 100%;
    display: block;
}

/* 导航样式 */
nav {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: #495057;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 1rem 1.5rem;
    display: inline-block;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav ul li a:hover {
    color: #007bff;
    background-color: #f8f9fa;
    border-bottom-color: #007bff;
}

/* 主内容区域 */
main {
    padding: 2rem 0;
}

/* 标题样式 */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    color: #212529;
    font-weight: 600;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
}

.card:hover::before {
    transform: scaleX(1);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.4s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* 特性卡片 */
.feature-card {
    background-color: white;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 123, 255, 0.2);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #007bff;
}

/* 轮播广告样式 */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background-color: #f5f7fa;
    margin-bottom: 2rem;
}

.carousel {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.indicator.active {
    background-color: white;
    width: 14px;
    height: 14px;
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* 页脚样式 */
footer {
    background-color: #212529;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #adb5bd;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端导航 */
    nav ul {
        flex-direction: column;
        align-items: stretch;
    }
    
    nav ul li a {
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: left;
    }
    
    /* 移动端标题 */
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* 移动端卡片 */
    .card {
        padding: 1.5rem;
    }
    
    /* 移动端网格 */
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 移动端特性卡片 */
    .feature-card {
        padding: 1.5rem;
    }
    
    /* 移动端按钮 */
    .btn {
        width: 100%;
    }
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin: 2rem 0;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

tr:hover {
    background-color: #f8f9fa;
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 12px;
    background-color: #e9ecef;
    color: #495057;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.category-tag.active {
    background-color: #007bff;
    color: white;
}

/* 列表样式 */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* 文本样式 */
p {
    margin-bottom: 1rem;
    color: #6c757d;
}

/* 分隔线 */
hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 2rem 0;
}

/* 引用样式 */
blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #6c757d;
}

/* 成功/错误消息 */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

/* 隐藏元素 */
.hidden {
    display: none;
}

/* 可见性 */
.visible {
    display: block;
}

/* 居中对齐 */
.text-center {
    text-align: center;
}

/* 左对齐 */
.text-left {
    text-align: left;
}

/* 右对齐 */
.text-right {
    text-align: right;
}

/* 粗体 */
.text-bold {
    font-weight: bold;
}

/* 斜体 */
.text-italic {
    font-style: italic;
}

/* 下划线 */
.text-underline {
    text-decoration: underline;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* 浮动 */
.float-left {
    float: left;
}

.float-right {
    float: right;
}

/* 间距 */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mx-1 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-2 { margin-left: 1rem; margin-right: 1rem; }
.mx-3 { margin-left: 1.5rem; margin-right: 1.5rem; }
.mx-4 { margin-left: 2rem; margin-right: 2rem; }

.my-1 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-2 { margin-top: 1rem; margin-bottom: 1rem; }
.my-3 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-4 { margin-top: 2rem; margin-bottom: 2rem; }

/* 内边距 */
.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }

.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.px-3 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-4 { padding-left: 2rem; padding-right: 2rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

/* 背景颜色 */
.bg-white { background-color: white; }
.bg-light { background-color: #f8f9fa; }
.bg-dark { background-color: #212529; }
.bg-primary { background-color: #007bff; }
.bg-success { background-color: #28a745; }
.bg-danger { background-color: #dc3545; }
.bg-warning { background-color: #ffc107; }
.bg-info { background-color: #17a2b8; }

/* 文本颜色 */
.text-white { color: white; }
.text-light { color: #f8f9fa; }
.text-dark { color: #212529; }
.text-primary { color: #007bff; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-info { color: #17a2b8; }
.text-muted { color: #6c757d; }

/* 边框 */
.border { border: 1px solid #dee2e6; }
.border-top { border-top: 1px solid #dee2e6; }
.border-bottom { border-bottom: 1px solid #dee2e6; }
.border-left { border-left: 1px solid #dee2e6; }
.border-right { border-right: 1px solid #dee2e6; }

/* 边框半径 */
.rounded { border-radius: 4px; }
.rounded-top { border-top-left-radius: 4px; border-top-right-radius: 4px; }
.rounded-bottom { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }
.rounded-left { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.rounded-right { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.rounded-circle { border-radius: 50%; }

/* 阴影 */
.shadow-sm { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); }

/* 显示/隐藏 */
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-none { display: none; }

/* 弹性布局 */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.justify-content-evenly { justify-content: space-evenly; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-baseline { align-items: baseline; }
.align-items-stretch { align-items: stretch; }

/* 定位 */
.position-static { position: static; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-index-1 { z-index: 1; }
.z-index-10 { z-index: 10; }
.z-index-100 { z-index: 100; }
.z-index-1000 { z-index: 1000; }

/* 宽度 */
.w-25 { width: 25%; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }
.w-100 { width: 100%; }
.w-auto { width: auto; }

/* 高度 */
.h-25 { height: 25%; }
.h-50 { height: 50%; }
.h-75 { height: 75%; }
.h-100 { height: 100%; }
.h-auto { height: auto; }
.h-screen { height: 100vh; }

/* 最大宽度 */
.mw-100 { max-width: 100%; }

/* 最小宽度 */
.mn-w-100 { min-width: 100%; }

/* 最大高度 */
.mh-100 { max-height: 100%; }

/* 最小高度 */
.mn-h-100 { min-height: 100%; }

/* 溢出 */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }

/* 文本对齐 */
.text-start { text-align: left; }
.text-end { text-align: right; }
.text-center { text-align: center; }
.text-justify { text-align: justify; }
.text-nowrap { white-space: nowrap; }
.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 文本转换 */
.text-lowercase { text-transform: lowercase; }
.text-uppercase { text-transform: uppercase; }
.text-capitalize { text-transform: capitalize; }

/* 字体粗细 */
.font-weight-light { font-weight: 300; }
.font-weight-normal { font-weight: 400; }
.font-weight-bold { font-weight: 700; }
.font-weight-bolder { font-weight: bolder; }

/* 字体大小 */
.fs-1 { font-size: 2.5rem; }
.fs-2 { font-size: 2rem; }
.fs-3 { font-size: 1.75rem; }
.fs-4 { font-size: 1.5rem; }
.fs-5 { font-size: 1.25rem; }
.fs-6 { font-size: 1rem; }
.fs-sm { font-size: 0.875rem; }
.fs-xs { font-size: 0.75rem; }

/* 行高 */
.lh-1 { line-height: 1; }
.lh-sm { line-height: 1.25; }
.lh-base { line-height: 1.5; }
.lh-lg { line-height: 2; }

/* 列表样式 */
.list-unstyled { list-style: none; padding: 0; margin: 0; }
.list-inline { list-style: none; padding: 0; margin: 0; }
.list-inline-item { display: inline-block; }

/* 表格样式 */
.table { width: 100%; margin-bottom: 1rem; color: #212529; }
.table th, .table td { padding: 0.75rem; vertical-align: top; border-top: 1px solid #dee2e6; }
.table thead th { vertical-align: bottom; border-bottom: 2px solid #dee2e6; }
.table tbody + tbody { border-top: 2px solid #dee2e6; }
.table-sm th, .table-sm td { padding: 0.5rem; }
.table-bordered { border: 1px solid #dee2e6; }
.table-bordered th, .table-bordered td { border: 1px solid #dee2e6; }
.table-hover tbody tr:hover { background-color: rgba(0, 0, 0, 0.05); }
.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(0, 0, 0, 0.05); }
.table-primary, .table-primary > th, .table-primary > td { background-color: rgba(0, 123, 255, 0.1); }
.table-hover .table-primary:hover { background-color: rgba(0, 123, 255, 0.2); }
.table-hover .table-primary:hover > td, .table-hover .table-primary:hover > th { background-color: rgba(0, 123, 255, 0.2); }

/* 卡片样式 */
.card-header { padding: 1rem 1.5rem; margin-bottom: 0; background-color: rgba(0, 0, 0, 0.03); border-bottom: 1px solid rgba(0, 0, 0, 0.125); }
.card-footer { padding: 1rem 1.5rem; background-color: rgba(0, 0, 0, 0.03); border-top: 1px solid rgba(0, 0, 0, 0.125); }
.card-title { margin-bottom: 0.5rem; }
.card-subtitle { margin-top: -0.25rem; margin-bottom: 0; }
.card-text:last-child { margin-bottom: 0; }
.card-body { padding: 1.5rem; }
.card-img-top { width: 100%; border-top-left-radius: calc(0.25rem - 1px); border-top-right-radius: calc(0.25rem - 1px); }
.card-img-bottom { width: 100%; border-bottom-right-radius: calc(0.25rem - 1px); border-bottom-left-radius: calc(0.25rem - 1px); }
.card-img-overlay { position: absolute; top: 0; right: 0; bottom: 0; left: 0; padding: 1.25rem; border-radius: calc(0.25rem - 1px); }
.card-group > .card { margin-bottom: 15px; }
.card-deck { display: flex; flex-direction: column; }
.card-deck .card { margin-bottom: 15px; }
.card-columns { column-count: 3; column-gap: 1.25rem; orphans: 2; widows: 2; }
.card-columns .card { display: inline-block; width: 100%; margin-bottom: 1.25rem; }

/* 响应式显示/隐藏 */
@media (max-width: 575.98px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
}

@media (min-width: 1200px) {
    .d-xxl-none { display: none !important; }
    .d-xxl-block { display: block !important; }
}