/* 全局样式 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --danger-color: #dc3545;
    --light-gray: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    border-bottom: 1px solid #e9ecef;
}

.navbar-brand {
    font-size: 1.25rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    margin-right: 1rem;
    font-weight: 500;
    color: #666 !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero 部分 */
.hero-section {
    color: white;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero-section .btn-light {
    color: var(--primary-color) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-section .btn-light:hover {
    background-color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hero-section .btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-section .btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Hero 区域 APP 展示图样式 */
.hero-app-img {
    max-width: 220px;
    width: 100%;
    height: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* 任务卡片 */
.task-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.task-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.task-card .btn {
    border-radius: 0.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.task-card .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.task-card .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* 标签按钮 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 卡片样式 */
.card {
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

/* 用户卡片 */
.card img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

/* 背景色 */
.bg-light {
    background-color: #f8f9fa !important;
}

/* 文字颜色 */
.text-danger {
    color: var(--danger-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Accordion 样式 */
.accordion-button {
    font-weight: 600;
    color: var(--primary-color);
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* 页脚 */
footer {
    background-color: #1f1f1f !important;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

.hover-link {
    transition: all 0.3s ease;
}

.hover-link:hover {
    padding-left: 0.5rem;
    color: var(--primary-color) !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section .row {
        flex-direction: column-reverse;
    }

    .display-4 {
        font-size: 2rem;
    }
}

/* 数据统计动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section h3 {
    animation: countUp 0.5s ease-out forwards;
}

.hero-section h3:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-section h3:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-section h3:nth-child(3) {
    animation-delay: 0.3s;
}

.hero-section h3:nth-child(4) {
    animation-delay: 0.4s;
}

/* 圆形背景 */
.bg-opacity-10 {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

/* 按钮过渡 */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* 卡片阴影 */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* 任务标题 */
h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

/* 滚动平滑 */
html {
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 文本截断 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 下载按钮在移动设备上的样式 */
@media (max-width: 576px) {
    .d-flex.gap-3 {
        gap: 0.5rem !important;
    }

    .btn-lg {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* 二维码提示样式 */
.qr-cta {
    background: #ffffff;
    color: var(--primary-color);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    display: inline-block;
}

.qr-cta:hover {
    transform: translateY(-2px);
}
