/* 基础样式与布局 */
:root {
    --color-light-bg: #f8f9fa;
    --color-dark-text: #333;
    --color-gray-text: #666;
    --color-danger: #dc3545;
    --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition-default: all 0.3s ease;
    --wechat-color: #07C160;
    --alipay-color: #1677FF;
    --qq-color: #12B7F5;
    /* 新增渐变变量 */
    --gradient-light: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --gradient-accent: linear-gradient(135deg, #e6f0ff 0%, #f0f7ff 100%);
    --gradient-card: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0);
}

.navbar-scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    color: #333 !important;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* 解决导航栏遮挡内容问题 */
[id] {
    scroll-margin-top: 60px;
}

.navbar-nav .nav-link {
    position: relative;
    color: #666 !important;
    margin: 0 0.8rem;
    padding: 0.3rem 0 !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: #2c3e50;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2844, 62, 80, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 个人展示区域样式 */
#personal {
    margin-top: 80px;
    padding: 5rem 0;
}

.profile-name {
    font-weight: bold;
    color: #222;
}

/* 头像容器样式 */
.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.avatar {
    width: 180px;
    height: 180px;
    border: 4px solid transparent;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.avatar::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(45deg, #007bff, #66b3ff, #0056b3);
    border-radius: 50%;
    z-index: -1;
    animation: avatar-breath 3s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* 打字机效果样式 */
#typing-text {
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: visible;
    border-right: 2px solid #666;
    animation: blink-caret .5s step-end infinite alternate;
    color: #333;
    box-sizing: border-box;
    display: inline-block;
    margin: 1rem auto;
    padding: 0 8px;
}

.typing-container {
    width: 100%;
    text-align: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 组件样式 */
/* 兴趣爱好卡片样式 */
.hobby-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.3s ease;
}

.hobby-card:hover {
    transform: translateY(-5px);
}

.hobby-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: #007bff;
}

.hobby-name {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.hobby-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    min-height: 63px;
}

.hobby-progress {
    font-size: 16px;
    color: #007bff;
    font-weight: bold;
}

.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.partner-item img {
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.partner-item p {
    margin: 0;
    text-align: center;
}

/* 作品展示卡片样式 */
.work-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.work-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: auto;
    margin: 0;
    width: 100%;
}

.work-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(75, 0, 130, 0.15);
}

.work-card-thumb {
    height: auto;
    aspect-ratio: auto;
    overflow: hidden;
    max-width: 100%;
}

.work-card-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    transition: filter 0.3s ease;
}

.work-card-body {
    padding: 25px 20px;
}

.work-card-title {
    font-size: 18px;
    color: #007bff;
    margin-bottom: 8px;
    font-weight: 600;
}

.work-card-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* 团队展示卡片样式 */
.team-card {
    background: var(--gradient-light);
    border-radius: clamp(10px, 3vw, 15px);
    padding: clamp(1.5rem, 5vw, 30px) clamp(1rem, 3vw, 25px);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transform: perspective(1000px) rotateX(0) rotateY(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    margin: 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.12), 0 2px 8px rgba(0, 123, 255, 0.08);
    transform: perspective(1000px) rotateX(-3deg) rotateY(2deg) translateY(-8px);
}

.team-img-container {
    width: clamp(120px, 60%, 180px);
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto clamp(1rem, 3vw, 20px);
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
    background-clip: padding-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(1.05) contrast(0.95);
    transition: filter 0.3s ease;
}

.team-card:hover .team-img {
    filter: brightness(1.1) contrast(1);
}

.team-info h3 {
    font-size: clamp(1.2rem, 4vw, 22px);
    color: #007bff;
    margin-bottom: clamp(0.5rem, 2vw, 8px);
    font-weight: 600;
    white-space: normal;
    overflow: visible;
}

.team-position {
    font-size: clamp(0.9rem, 3vw, 16px);
    color: #666;
    margin-bottom: clamp(0.8rem, 3vw, 12px);
    font-weight: 500;
    position: relative;
    padding-bottom: clamp(0.5rem, 2vw, 10px);
}

.team-position::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #e6d9f3;
    border-radius: 1px;
}

.team-desc {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
    margin: 15px 0;
    min-height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.team-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.skill-tag {
    font-size: 12px;
    color: #007bff;
    background: var(--gradient-accent);
    padding: 5px 14px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.1);
    transition: transform 0.2s ease;
}

.skill-tag:hover {
    transform: translateY(-1px);
}

/* SVG圆形进度条样式 */
.progress-svg-box {
    margin: 0 auto;
    width: 150px;
}

.progress-svg {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.progress-svg svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.bg-circle {
    fill: none;
    stroke: #f3f3f3;
    stroke-width: 10;
}

.progress-circle {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 24px;
    color: #333;
}

.progress-text .percent {
    font-size: 32px;
    font-weight: bold;
}

/* 动画效果 */
@keyframes blink-caret {
    50% {
        border-color: transparent;
    }
}

@keyframes avatar-breath {
    0%, 100% {
        transform: scale(0.98);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* 响应式样式 */
/* 平板适配 */
@media (min-width: 768px) {
    #typing-text {
        font-size: 1.1em;
    }
}

/* 桌面适配 */
@media (min-width: 992px) {
    #typing-text {
        font-size: 1.2em;
    }
}

/* 平板及以下适配 */
@media (max-width: 768px) {
    .hobby-desc {
        min-height: auto;
    }

    .hobby-card {
        margin: 0 10px;
        width: calc(100% - 20px);
        padding: 20px 15px;
    }

    .hobby-icon {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .hobby-name {
        font-size: 16px;
    }

    .work-card {
        margin: 0 8px;
        width: calc(100% - 16px);
    }

    .work-card-body {
        padding: 20px 15px;
    }

    .work-card-title {
        font-size: 16px;
    }

    .work-card-text {
        font-size: 13px;
    }

    .team-card {
        padding: 25px 20px;
    }

    .team-img-container {
        width: 150px;
        height: 150px;
    }

    .team-desc {
        min-height: auto;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .skill-tag {
        padding: 4px 12px;
        font-size: 11px;
    }

    .work-card-thumb {
        aspect-ratio: auto;
    }
}

/* 手机适配 */
@media (max-width: 576px) {
    #typing-text {
        font-size: 0.9em;
        padding: 0 5px;
    }

    .typing-container {
        padding: 0 10px;
    }

    #works .col-md-3 {
        flex: 0 0 auto;
        width: 100% !important;
    }

    .work-card-body {
        padding: 15px 10px;
    }

    .hobby-card {
        margin: 0 8px;
        padding: 15px 10px;
        border-radius: 8px;
    }

    .hobby-desc {
        font-size: 13px;
    }

    .team-card {
        margin: 8px auto;
        width: calc(100% - 24px);
        padding: 20px 15px;
        border-radius: 12px;
    }

    .team-img-container {
        width: 140px;
        height: 140px;
    }

    .team-info h3 {
        font-size: 18px;
    }

    .team-position {
        font-size: 14px;
    }

    .team-desc {
        font-size: 13px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .avatar {
        width: 140px;
        height: 140px;
    }

    .avatar::before {
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
    }
}

/* 合作伙伴展示样式 */
#partners .row {
    align-items: center;
}

#partners .partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 120px;
    justify-content: center;
}

#partners img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

#partners p {
    margin: 0;
    font-size: 14px;
}

.hobby-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* 内联样式迁移 */
.profile-desc-container {
    max-width: 300px;
}

.payment-card-position {
    position: relative;
}

.payment-icon-radius {
    border-radius: 8px !important;
}

.donors-section-custom {
    background: transparent !important;
    box-shadow: none !important;
    padding: 10px 0 !important;
}