/* ==========================================
   个人网站 - 动漫风格样式
   ========================================== */

/* 基础重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B9D;
    --primary-light: #FF6B9D33;
    --primary-dark: #e5547f;
    --text-dark: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 50%, #f0f9ff 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 动漫背景样式 */
.anime-bg-anime {
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(255, 182, 193, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(173, 216, 230, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 40%, rgba(221, 160, 221, 0.2) 0%, transparent 40%),
        linear-gradient(135deg, #fdf2f8 0%, #faf5ff 50%, #f0f9ff 100%);
    background-attachment: fixed;
}

.anime-bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

.anime-bg-minimal {
    background: #f8fafc;
}

.anime-bg-stars {
    background: 
        radial-gradient(white 1px, transparent 1px),
        linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    background-size: 50px 50px, 100% 100%;
    background-attachment: fixed;
}

/* 浮动装饰元素 */
.floating-decorations {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star, .cloud, .sparkle {
    position: absolute;
    opacity: 0.4;
    animation: float 6s ease-in-out infinite;
}

.star-1 { top: 10%; left: 10%; font-size: 1.5rem; animation-delay: 0s; color: var(--primary-color); }
.star-2 { top: 20%; right: 15%; font-size: 1rem; animation-delay: 1s; color: #a855f7; }
.star-3 { top: 60%; left: 5%; font-size: 1.2rem; animation-delay: 2s; color: #6366f1; }
.star-4 { bottom: 30%; right: 10%; font-size: 0.8rem; animation-delay: 3s; color: var(--primary-color); }

.cloud-1 { top: 15%; left: 30%; font-size: 2rem; animation-delay: 0.5s; color: #e0e7ff; }
.cloud-2 { bottom: 20%; right: 25%; font-size: 2.5rem; animation-delay: 2.5s; color: #fce7f3; }

.sparkle-1 { top: 40%; right: 5%; font-size: 1.5rem; animation-delay: 1.5s; }
.sparkle-2 { bottom: 40%; left: 15%; font-size: 1.2rem; animation-delay: 4s; }

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 0.8rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-dropdown {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.nav-icon {
    font-size: 1rem;
}

.dropdown-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* 主内容区 */
.main-content {
    position: relative;
    z-index: 1;
    padding-top: 70px;
}

/* Flash 消息 */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flash-message {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: slideIn 0.3s ease;
    min-width: 280px;
    box-shadow: var(--shadow-md);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flash-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.flash-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.flash-warning {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.flash-close:hover {
    opacity: 1;
}

/* Hero 区域 */
.hero {
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

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

.hero-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bg-white);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.hero-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a855f7 100%);
    font-size: 4rem;
}

.avatar-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.avatar-sparkles .sparkle {
    position: absolute;
    animation: sparkle 2s ease-in-out infinite;
}

.avatar-sparkles .sparkle:nth-child(1) { top: 0; left: 50%; animation-delay: 0s; }
.avatar-sparkles .sparkle:nth-child(2) { top: 50%; right: 0; animation-delay: 0.5s; }
.avatar-sparkles .sparkle:nth-child(3) { bottom: 0; left: 30%; animation-delay: 1s; }

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1); }
}

.hero-title {
    font-family: 'Quicksand', 'Noto Sans SC', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.title-decoration {
    color: var(--primary-color);
    margin: 0 0.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.hero-bio {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-icon {
    font-size: 1.1rem;
}

.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.deco-circle-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -100px;
    right: -100px;
}

.deco-circle-2 {
    width: 200px;
    height: 200px;
    background: #a855f7;
    bottom: -50px;
    left: -50px;
}

.deco-circle-3 {
    width: 150px;
    height: 150px;
    background: #6366f1;
    top: 50%;
    right: 10%;
}

/* 版块展示 */
.sections-grid {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.title-star {
    color: var(--primary-color);
    margin: 0 0.5rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.section-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.section-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.section-card:hover .card-decoration {
    opacity: 1;
}

.card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(168, 85, 247, 0.1) 100%);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    font-size: 2.5rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

.card-content {
    padding: 1.5rem;
}

.subsection-list {
    list-style: none;
}

.subsection-list li {
    margin-bottom: 0.8rem;
}

.subsection-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.subsection-list a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.bullet {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.more-items {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.card-link:hover {
    gap: 0.6rem;
}

.card-link .arrow {
    transition: transform 0.3s ease;
}

.card-link:hover .arrow {
    transform: translateX(4px);
}

.card-decoration {
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-sparkle {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* 快捷入口 */
.quick-access {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
}

.quick-access-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.quick-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.quick-title .emoji {
    margin-right: 0.5rem;
}

.quick-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    min-width: 120px;
}

.quick-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

.quick-icon {
    font-size: 2rem;
}

.quick-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d3f 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-stars {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    letter-spacing: 8px;
}

.footer-text {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.footer-subtitle {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-link {
        padding: 1rem;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        padding-left: 1rem;
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .hero {
        padding: 4rem 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-avatar {
        width: 120px;
        height: 120px;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .quick-links {
        gap: 1rem;
    }
    
    .quick-link {
        padding: 1rem 1.5rem;
        min-width: 100px;
    }
    
    .flash-messages {
        left: 10px;
        right: 10px;
    }
    
    .flash-message {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .title-decoration {
        display: none;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
