/* 全局样式 - 二次元风格 */
:root {
    --primary-color: #ff6b9d;
    --secondary-color: #c44569;
    --accent-color: #feca57;
    --dark-color: #2c2c54;
    --light-color: #f5f3ff;
    --success-color: #48dbfb;
    --info-color: #ff9ff3;
    --warning-color: #feca57;
    --danger-color: #ff6b9d;
    --anime-purple: #9c88ff;
    --anime-pink: #ff6b9d;
    --anime-blue: #48dbfb;
    --anime-yellow: #feca57;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* 导航栏样式 - 二次元风格 */
.navbar {
    backdrop-filter: blur(10px);
    background: linear-gradient(90deg, rgba(255, 107, 157, 0.9), rgba(156, 136, 255, 0.9)) !important;
    transition: all 0.3s ease;
    border-bottom: 3px solid rgba(254, 202, 87, 0.8);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

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

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* 主页英雄区域 - 二次元风格 */
.hero {
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 25%, #9c88ff 50%, #48dbfb 75%, #feca57 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    animation: animeGradient 8s ease infinite;
    background-size: 400% 400%;
}

@keyframes animeGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 20%, white, transparent),
        radial-gradient(2px 2px at 10% 80%, white, transparent);
    background-size: 200% 200%;
    animation: sparkle 10s linear infinite;
}

@keyframes sparkle {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-image {
    z-index: 2;
    position: relative;
}

.profile-img {
    position: relative;
    display: inline-block;
}

.profile-img img {
    border: 8px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.social-links a {
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    color: var(--accent-color) !important;
}

/* 关于我部分 */
#about {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f7 100%);
    position: relative;
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--anime-pink), var(--anime-purple), var(--anime-blue), transparent);
    animation: flowGradient 3s linear infinite;
}

@keyframes flowGradient {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

section h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--anime-pink), var(--anime-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(255, 107, 157, 0.2);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--anime-pink), var(--anime-purple), var(--anime-blue));
    border-radius: 2px;
}

.info-card {
    border-left: 5px solid var(--anime-pink);
    background: linear-gradient(135deg, #fff5f7 0%, #f3e7ff 100%);
    box-shadow: 0 15px 35px rgba(255, 107, 157, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--anime-pink), var(--anime-purple), var(--anime-blue));
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.info-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.3);
}

/* 技能部分背景优化 */
.skills-section {
    background: linear-gradient(135deg, #f3e7ff 0%, #fff5f7 50%, #e3f2ff 100%);
    position: relative;
    overflow: hidden;
}

.skills-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.skills-section .container {
    position: relative;
    z-index: 1;
}

/* 技能部分 - 二次元风格优化 */
.skill-card {
    background: linear-gradient(135deg, #fff5f7 0%, #f3e7ff 100%);
    border-radius: 25px;
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 15px 35px rgba(255, 107, 157, 0.25), 
                inset 0 0 25px rgba(255, 107, 157, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    transform: translateY(0);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b9d, #9c88ff, #48dbfb, #feca57);
    border-radius: 20px;
    z-index: -1;
    animation: animeBorder 3s linear infinite;
    background-size: 300% 300%;
}

@keyframes animeBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.skill-card:hover {
    transform: translateY(-15px) scale(1.03) rotate(1deg);
    box-shadow: 0 25px 50px rgba(255, 107, 157, 0.35);
}

.skill-card:hover i {
    transform: scale(1.2) rotate(10deg);
}

.skill-card i {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 8px rgba(255, 107, 157, 0.3));
}

.skill-card:hover i {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 8px 16px rgba(255, 107, 157, 0.5));
}

.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
    margin-top: 15px;
}

.progress-bar {
    border-radius: 10px;
    transition: width 2s ease;
}

/* 项目部分 - 二次元风格优化 */
.project-card {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.3),
                0 8px 20px rgba(156, 136, 255, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.6);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    border: 2px solid rgba(255, 107, 157, 0.4);
    position: relative;
    margin-bottom: 2rem;
    transform: translateY(0);
}

/* 全图片背景卡片样式 */
.interest-full-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 300px;
}

.interest-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.interest-full-card:hover .interest-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
}

.interest-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.interest-full-card:hover .interest-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.interest-content {
    position: relative;
    z-index: 5;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02) rotate(-1deg);
    box-shadow: 0 30px 60px rgba(255, 107, 157, 0.4);
}

.project-card:hover img {
    transform: scale(1.08) rotate(2deg);
}

.project-card:hover .card-body {
    transform: translateY(-5px);
}

.project-card img {
    transition: transform 0.3s ease;
    height: 250px;
    object-fit: cover;
}

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

.tech-tags .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* 联系部分 */
.contact-form {
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.contact-info i {
    transition: transform 0.3s ease;
}

.contact-info div:hover i {
    transform: scale(1.2);
}

/* 页脚 */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #000000 100%);
}

footer .social-links a {
    transition: transform 0.3s ease, color 0.3s ease;
}

footer .social-links a:hover {
    transform: translateY(-3px);
    color: var(--accent-color) !important;
}

/* 响应式设计优化 */
@media (max-width: 992px) {
    .hero {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-content {
        margin-bottom: 2rem;
    }
    
    .display-4 {
        font-size: 2.8rem;
    }
    
    .skill-card, .project-card {
        margin-bottom: 1.5rem;
        transform: none !important;
    }
    
    .skill-card:hover, .project-card:hover {
        transform: translateY(-5px) !important;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 1rem 0;
    }
    
    .hero-content {
        margin-bottom: 1.5rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .skill-card, .project-card {
        margin-bottom: 1.5rem;
    }
    
    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .info-card {
        margin-bottom: 1.5rem;
    }
    
    .profile-img img {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-image {
        margin-top: 1.5rem;
    }
    
    .profile-img img {
        width: 180px;
        height: 180px;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    section {
        padding: 3rem 0 !important;
    }
    
    section h2 {
        font-size: 1.75rem;
    }
    
    .skill-card, .project-card {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .social-links a {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 400px) {
    .display-4 {
        font-size: 1.75rem;
    }
    
    .hero {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

/* 优雅的联系按钮样式 */
.contact-btn {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.9), rgba(156, 136, 255, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-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 ease;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 157, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

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

.contact-btn small {
    opacity: 0.8;
    font-size: 0.8rem;
}



/* iFlow AI 宣传部分样式 */
.iflow-ai-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f7 50%, #f3e7ff 100%);
    position: relative;
    overflow: hidden;
}

.iflow-ai-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(156, 136, 255, 0.1) 0%, transparent 70%);
    animation: rotate 25s linear infinite reverse;
}

.gradient-text {
    background: linear-gradient(135deg, #9c88ff, #ff6b9d, #48dbfb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 157, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(156, 136, 255, 0.2);
    border-color: rgba(156, 136, 255, 0.4);
}

.feature-item i {
    font-size: 1.5rem;
}

.iflow-badge {
    position: relative;
    padding: 2rem;
}

.ai-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: linear-gradient(135deg, #9c88ff, #ff6b9d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    z-index: 2;
    animation: aiFloat 3s ease-in-out infinite;
}

@keyframes aiFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.ai-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(156, 136, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: aiGlow 2s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes aiGlow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

/* 模态框样式优化 */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(255, 107, 157, 0.3);
}

.modal-header {
    border-bottom: 2px solid rgba(255, 107, 157, 0.2);
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #fff5f7 0%, #f3e7ff 100%);
}

.modal-body {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
    border-radius: 0 0 20px 20px;
}