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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 移动端字体大小自动调整 */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    html {
        font-size: 13px;
    }
}

/* 优化移动端滚动性能 */
.container,
.page-view {
    -webkit-overflow-scrolling: touch;
}

/* 优化移动端触摸反馈 */
a,
button,
.nav-btn,
.project-card,
.tech-card,
.goal-card {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
}

.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-image: url('https://i.stardots.io/locxl/StarDots_2025-11-13T18_07_41.0260Z_0775.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 添加一个半透明遮罩层，使内容更清晰 */
.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-image-overlay);
    z-index: 1;
    pointer-events: none;
}

/* 添加一个微弱的渐变光效层 */
.container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-gradient-overlay);
    z-index: 1;
    pointer-events: none;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}

.content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 20px;
}

/* 头像样式 */
.avatar-wrapper {
    animation: fadeInDown 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* 头像链接 */
.avatar-link {
    display: inline-block;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.avatar-link:hover .avatar {
    transform: scale(1.12) rotate(8deg);
    box-shadow: 0 18px 60px var(--accent-glow), 0 0 40px var(--accent-primary);
    border-color: var(--accent-secondary);
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-primary);
    box-shadow: 0 10px 30px var(--shadow-accent), 0 0 0 0 var(--accent-glow);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: pulse 3s ease-in-out infinite;
    display: block;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 10px 30px var(--shadow-accent), 0 0 0 0 var(--accent-glow);
    }
    50% {
        box-shadow: 0 15px 40px var(--shadow-accent), 0 0 0 10px transparent;
    }
}

/* 座右铭 */
.motto {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    text-shadow: 0 2px 10px var(--shadow-color);
    margin: 0;
    letter-spacing: 2px;
    animation: fadeIn 1s ease-out 0.5s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 导航栏样式 */
.navigation {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.nav-btn {
    position: relative;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--btn-bg);
    border: 2px solid var(--btn-border);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
                background 0.3s ease, 
                border-color 0.3s ease, 
                box-shadow 0.35s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-text {
    position: relative;
    z-index: 2;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-hover-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--glass-bg-light), transparent);
    transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-btn:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 10px 30px var(--shadow-color), 0 0 25px var(--shadow-accent);
    border-color: var(--border-hover);
    background: var(--btn-bg-hover);
}

.nav-btn:hover .btn-hover-effect {
    width: 300px;
    height: 300px;
}

.nav-btn:hover .btn-text {
    color: var(--text-primary);
    text-shadow: 0 2px 10px var(--accent-primary);
}

.nav-btn:active {
    transform: translateY(-2px) scale(0.98);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 链接按钮包装器 */
.nav-btn-wrapper {
    position: relative;
}

/* 子菜单样式 */
.submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid var(--nav-border);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    box-shadow: 0 8px 25px var(--shadow-color), 0 0 15px var(--shadow-accent);
}

.submenu.active {
    display: flex;
    opacity: 1;
    animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--btn-bg);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 15px;
    font-weight: 500;
}

.submenu-item:hover {
    background: var(--btn-bg-hover);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 5px 18px var(--shadow-color);
}

.submenu-item .iconify {
    flex-shrink: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* 动画关键帧 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 雨滴动画 */
.rain {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.raindrop {
    position: absolute;
    width: 1.5px;
    height: 30px;
    background: linear-gradient(to bottom, var(--accent-glow), transparent, transparent);
    animation: fall linear infinite;
    filter: blur(0.5px);
}

@keyframes fall {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    85% {
        opacity: 0.25;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content {
        gap: 35px;
        padding: 20px 15px;
    }
}

@media (max-width: 768px) {
    .content {
        gap: 30px;
        padding: 15px;
    }
    
    .avatar {
        width: 110px;
        height: 110px;
    }
    
    .motto {
        font-size: 16px;
    }
    
    .navigation {
        gap: 12px;
        padding: 0;
        width: 100%;
        max-width: 400px;
    }
    
    .nav-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 120px;
    }
    
    .submenu {
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .content {
        gap: 25px;
        padding: 10px;
    }
    
    .avatar {
        width: 90px;
        height: 90px;
        border-width: 3px;
    }
    
    .motto {
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .navigation {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
        text-align: center;
        min-width: unset;
    }
    
    .nav-btn-wrapper {
        width: 100%;
    }
    
    .submenu {
        left: 0;
        right: 0;
        transform: none;
        min-width: 100%;
    }
    
    .submenu.active {
        animation: slideDownMobile 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
}

@keyframes slideDownMobile {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 360px) {
    .avatar {
        width: 80px;
        height: 80px;
    }
    
    .motto {
        font-size: 13px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}
