/* ==================== 全局样式 ==================== */
:root {
    --bg-primary: #29292b;
    --bg-secondary: #202122;
    --bg-hover: #373a3a;
    --text-primary: #e8e8e8;
    --text-secondary: #c5c5c5;
    --text-muted: #9b9b9b;
    --accent-color: #9bd0ff;
    --border-color: #4a4a4a;
    --shadow-sm: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --border-radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: "Source Serif Pro", "Noto Serif SC", -apple-system, "SF UI Text",
        "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    font-weight: 400;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: #b8dcff;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

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

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: var(--bg-secondary);
}

::-webkit-scrollbar-track {
    border-radius: 10px;
    background: var(--bg-hover);
}

/* ==================== 加载动画 ==================== */
#loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
}

.loading-content {
    text-align: center;
    color: var(--text-secondary);
}

.loading-icon {
    font-size: 4rem;
    animation: bounce 1s infinite;
}

.loading-text {
    margin-top: 1rem;
    font-size: 1.1rem;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Vue 过渡动画 */
.fade-enter-active,
.fade-leave-active {
    transition: opacity var(--transition-normal);
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* ==================== 容器布局 ==================== */
.container {
    max-width: 1000px;
    width: 90%;
    margin: 0 auto;
    padding: 5% 0;
}

/* ==================== 个人介绍区域 ==================== */
.intro-section {
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

.main-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.sub-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.intro-section p {
    margin: 1rem 0;
}

/* ==================== 项目展示区域 ==================== */
.projects-section {
    margin: 3rem 0;
}

.projects-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.projects-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-behavior: smooth;
}

.project-card {
    min-width: 230px;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.project-card:hover {
    background-color: var(--bg-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
}

.project-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==================== 支持说明区域 ==================== */
.support-section {
    margin: 3rem 0;
    color: var(--text-secondary);
}

.support-section p {
    margin: 1rem 0;
}

.support-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    overflow: hidden;
    position: relative;
}

.support-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.support-btn:hover::before {
    left: 100%;
}

.support-btn:active {
    transform: translateY(0);
}

/* ==================== 统计卡片 ==================== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-card {
    padding: 2rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    text-align: center;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    background-color: var(--bg-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==================== 赞助者区域 ==================== */
.supporters-section {
    margin: 4rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-header .tip {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--bg-hover);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.toggle-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.toggle-btn:hover {
    background-color: var(--bg-hover);
}

/* 赞助者网格 */
.supporters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.supporter-card {
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.supporter-card:hover {
    background-color: var(--bg-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.supporter-card.vip {
    border-color: #ffdf00;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 223, 0, 0.1) 100%);
}

.supporter-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.supporter-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.supporter-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.supporter-name {
    font-weight: 500;
    font-size: 1rem;
}

.supporter-amount {
    font-size: 0.95rem;
    font-weight: 600;
}

.supporter-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* ==================== 互动按钮（小熊） ==================== */
.interactive-button {
    position: relative;
    height: 100px;
    margin: 2rem 0;
}

#bear-button {
    width: 200px;
    height: 200px;
    position: absolute;
    left: 0;
    top: -50px;
    overflow: hidden;
    transform: scale(0.5);
    transform-origin: left center;
}

.button-body {
    width: 100%;
    height: 100px;
    background-color: #aaa;
    cursor: pointer;
    position: absolute;
    bottom: 0;
    border-radius: 100px;
    transition: all var(--transition-normal);
    z-index: 2;
    overflow: hidden;
}

.button-body.active {
    background-color: #2eec71;
}

.white-ball {
    width: 85px;
    height: 85px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 7px;
    left: 7px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-body.active .white-ball {
    left: calc(100% - 92px);
}

.white-ball .icon {
    position: absolute;
    font-size: 3rem;
    transition: opacity var(--transition-normal);
}

.money-icon {
    opacity: 1;
}

.milk-icon {
    opacity: 0;
}

.button-body.active .money-icon {
    opacity: 0;
}

.button-body.active .milk-icon {
    opacity: 1;
}

.hand {
    width: 30px;
    height: 20px;
    background-color: #784421;
    border-radius: 50%;
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* 小熊 */
.bear {
    position: absolute;
    top: 120px;
    right: 30px;
    z-index: 1;
    transform: rotate(5deg);
    transition: all var(--transition-normal);
}

.bear.peek-head {
    top: 50px;
}

.bear.peek-body {
    top: 20px;
}

.angry-text {
    padding: 5px;
    background-color: white;
    position: absolute;
    top: 25px;
    left: -80px;
    font-size: 0.8rem;
    transform: rotate(-30deg);
    color: black;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.bear.peek-body .angry-text {
    opacity: 1;
}

.bear-head {
    width: 85px;
    height: 85px;
    position: relative;
}

.bear-head-bg {
    width: 100%;
    height: 100%;
    background-color: #784421;
    border-radius: 60% 60% 70% 70%;
    position: relative;
    z-index: 2;
}

.bear-head-bg::after,
.bear-head-bg::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    background-color: black;
    border-radius: 50%;
    position: absolute;
    top: 30px;
}

.bear-head-bg::after {
    left: 20px;
}

.bear-head-bg::before {
    right: 20px;
}

.bear-ear {
    width: 25px;
    height: 25px;
    background-color: #e9c6af;
    border: 5px solid #784421;
    border-radius: 50%;
    position: absolute;
    top: -10px;
    z-index: 1;
}

.bear-ear.left {
    left: -10px;
}

.bear-ear.right {
    right: -10px;
}

.bear-eyebrow {
    width: 100%;
    position: absolute;
    top: 20px;
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.bear-eyebrow.show {
    opacity: 1;
}

.bear-eyebrow::after,
.bear-eyebrow::before {
    content: "";
    display: block;
    width: 23px;
    height: 2px;
    background-color: black;
    position: absolute;
    top: 0;
}

.bear-eyebrow::after {
    left: 10px;
    transform: rotate(25deg);
}

.bear-eyebrow::before {
    right: 10px;
    transform: rotate(-25deg);
}

.bear-mouth {
    width: 65%;
    height: 35%;
    background-color: #e9c6af;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    overflow: hidden;
}

.bear-mouth::after {
    content: "";
    display: block;
    width: 30px;
    height: 30px;
    background-color: black;
    border-radius: 70%;
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
}

.bear-body {
    width: 80px;
    height: 70px;
    background-color: #784421;
    border-radius: 50%;
    position: absolute;
    bottom: -60%;
    left: 50%;
    transform: translateX(-50%);
}

/* ==================== 弹窗样式 ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-body p {
    margin: 0.8rem 0;
    color: var(--text-secondary);
}

.modal-tip {
    font-size: 0.9rem;
    color: var(--accent-color);
}

.modal-close-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.modal-close-btn:hover {
    background-color: var(--bg-hover);
}

/* 弹窗过渡动画 */
.modal-enter-active,
.modal-leave-active {
    transition: opacity var(--transition-normal);
}

.modal-enter-active .modal-content,
.modal-leave-active .modal-content {
    transition: transform var(--transition-normal);
}

.modal-enter-from,
.modal-leave-to {
    opacity: 0;
}

.modal-enter-from .modal-content,
.modal-leave-to .modal-content {
    transform: scale(0.9) translateY(20px);
}

/* 二维码样式 */
.qr-codes {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.qr-item {
    text-align: center;
    cursor: pointer;
}

.qr-image {
    width: 150px;
    height: 150px;
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
    object-fit: cover;
}

.qr-image:hover {
    transform: scale(1.05);
}

.qr-image.enlarged {
    transform: scale(1.8);
    z-index: 10;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.qr-label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 赞助者详情弹窗 */
.supporter-detail .detail-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.detail-stats {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.detail-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-stat:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.detail-stat .label {
    color: var(--text-muted);
}

.detail-stat .value {
    font-weight: 600;
    font-size: 1.1rem;
}

.detail-message {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.detail-message .label {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.message-text {
    line-height: 1.6;
    font-size: 1rem;
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.footer p {
    margin: 0.5rem 0;
}

.footer-tip {
    font-size: 0.9rem;
}

/* ==================== 响应式设计 ==================== */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10% 0;
    }

    .main-title {
        font-size: 2rem;
    }

    .sub-title {
        font-size: 1.5rem;
    }

    .projects-list {
        gap: 0.8rem;
    }

    .project-card {
        min-width: 200px;
    }

    .stats-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .search-box {
        flex-direction: column;
    }

    .supporters-grid {
        grid-template-columns: 1fr;
    }

    .qr-codes {
        flex-direction: column;
        align-items: center;
    }

    .qr-image {
        width: 200px;
        height: 200px;
    }

    .qr-image.enlarged {
        transform: scale(1.3);
    }

    .modal-content {
        padding: 1.5rem;
    }

    #bear-button {
        transform: scale(0.4);
    }
}

@media screen and (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }

    .sub-title {
        font-size: 1.3rem;
    }

    .support-btn {
        width: 100%;
        text-align: center;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .project-card {
        min-width: 180px;
    }
}

/* ==================== 打印样式 ==================== */
@media print {

    #loading,
    .support-btn,
    .search-box,
    .interactive-button,
    .modal-overlay,
    .footer {
        display: none !important;
    }

    body {
        background-color: white;
        color: black;
    }

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

    .supporter-card,
    .project-card,
    .stat-card {
        break-inside: avoid;
    }
}

/* ==================== 无障碍优化 ==================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000;
        --bg-secondary: #1a1a1a;
        --bg-hover: #333;
        --text-primary: #fff;
        --text-secondary: #e0e0e0;
        --border-color: #666;
    }
}

/* 焦点可见性 */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}