/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 蓝色和粉色配色方案 */
    --primary-pink: #FF69B4;
    --primary-blue: #4A90E2;
    --light-pink: #FFB6D9;
    --light-blue: #7BB3E8;
    --dark-color: #2D3748;
    --light-color: #FFFFFF;
    --text-color: #4A5568;
    --border-color: #E2E8F0;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --gradient-pink: linear-gradient(135deg, #FF69B4 0%, #FFB6D9 100%);
    --gradient-blue: linear-gradient(135deg, #4A90E2 0%, #7BB3E8 100%);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    color: var(--text-color);
    background: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 背景装饰 ===== */
.bg-decoration {
    display: none;
}

/* ===== 导航栏 ===== */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-pink);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-pink);
}

/* ===== 关于我板块 ===== */
.about-section {
    padding: 3rem 0;
    min-height: 100vh;
}

/* 个人信息卡片 */
.profile-card {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: none;
    position: relative;
    overflow: hidden;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.avatar-link {
    display: block;
    text-decoration: none;
}

.avatar-container {
    position: relative;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.avatar-link:hover .avatar {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 107, 157, 0.3);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2.5rem;
    background: transparent;
    padding: 0.3rem 1.5rem;
    display: inline-block;
    color: #000;
    margin-bottom: 0.5rem;
    font-weight: bold;
    border: 3px solid #000;
}

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


/* 内容区域 */
.content-section {
    margin-bottom: 3rem;
}

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

/* Videos标题样式 */
.videos-title {
    font-size: 4rem;
    font-weight: 900;
    background: white;
    color: #000;
    display: inline-block;
    padding: 1rem 2rem;
    border: 4px solid #000;
    position: relative;
    margin-bottom: 3rem;
}

.videos-title::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    background: var(--primary-blue);
    border: 4px solid #000;
    z-index: -1;
}

/* 记录标题样式 */
.records-title {
    font-size: 4rem;
    font-weight: 900;
    background: white;
    color: #000;
    display: inline-block;
    padding: 1rem 2rem;
    border: 4px solid #000;
    position: relative;
    margin-bottom: 3rem;
}

.records-title::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    background: var(--primary-blue);
    border: 4px solid #000;
    z-index: -1;
}

/* 随笔标题样式 */
.essays-title {
    font-size: 4rem;
    font-weight: 900;
    background: white;
    color: #000;
    display: inline-block;
    padding: 1rem 2rem;
    border: 4px solid #000;
    position: relative;
    margin-bottom: 3rem;
}

.essays-title::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    background: var(--primary-blue);
    border: 4px solid #000;
    z-index: -1;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* 视频卡片 */
.video-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 3px solid #000;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.video-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-cover {
    position: relative;
    width: 100%;
    padding-top: 62.5%; /* 16:10 宽高比 */
    overflow: hidden;
    background: #000;
}

.video-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-card:hover .video-cover img {
    transform: scale(1.15);
}


.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-icon i {
    color: #000;
    font-size: 1.8rem;
    margin-left: 4px;
}

.video-info {
    padding: 1.2rem;
    background: white;
}

.video-title {
    font-size: 1.05rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.video-meta {
    display: flex;
    gap: 1.2rem;
    color: #666;
    font-size: 0.9rem;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.video-meta i {
    font-size: 0.9rem;
    color: #888;
}

/* ===== 记录板块 ===== */
.records-section {
    padding: 3rem 0;
    min-height: 50vh;
}

/* 相册网格 */
.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 相册卡片 */
.record-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 3px solid #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.record-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.record-cover {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 宽高比 */
    overflow: hidden;
}

.cover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.record-card:hover .cover-image {
    transform: scale(1.1);
}

/* 城市标签 */
.city-label {
    position: absolute;
    top: 50%;
    left: 50%;
    color: white;
    z-index: 2;
    writing-mode: horizontal-tb;
    white-space: nowrap;
}

/* 武汉、重庆、成都 - 统一样式 */
.city-wuhan,
.city-chongqing,
.city-chengdu {
    transform: translate(-50%, -50%) rotate(-5deg);
    font-size: 9rem;
    font-weight: 500;
    font-family: 'STKaiti', 'KaiTi', 'STFangsong', 'FangSong', serif;
    font-style: normal;
    letter-spacing: 0.25em;
    text-shadow: 
        4px 4px 0 rgba(0, 0, 0, 0.2),
        8px 8px 25px rgba(0, 0, 0, 0.4),
        2px 2px 10px rgba(255, 255, 255, 0.2);
}

/* ===== 随笔板块 ===== */
.essays-section {
    padding: 3rem 0;
    min-height: 50vh;
}

/* 随笔网格 */
.essays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 随笔卡片 */
.essay-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 3px solid #000;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.essay-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 10px 20px rgba(0, 0, 0, 0.15);
}

.essay-cover {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 正方形 */
    background: white;
    overflow: hidden;
}

.essay-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    transition: transform 0.4s ease;
}

.essay-card:hover .essay-overlay {
    transform: scale(1.05);
}

.essay-date {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

.essay-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin: 1rem 0;
    line-height: 1.4;
}

.essay-excerpt {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
    flex: 1;
    overflow: hidden;
}

.essay-read-more {
    display: inline-flex;
    align-items: center;
    color: #000;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: all 0.3s ease;
}

.essay-read-more:hover {
    transform: translateX(5px);
}

/* 随笔窗口容器 */
#essayWindowsContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3000;
}

/* 单个随笔窗口 */
.essay-window {
    position: fixed;
    background: white;
    border-radius: 20px;
    width: 600px;
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    cursor: move;
    user-select: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.essay-window.active {
    opacity: 1;
}

.essay-window.dragging {
    cursor: grabbing;
    transition: none;
}

/* 随笔窗口内容区域 */
.essay-window .essay-modal-body {
    max-height: 85vh;
    overflow-y: auto;
    padding: 3rem;
}

/* 隐藏滚动条但保持滚动功能 */
.essay-window .essay-modal-body::-webkit-scrollbar {
    display: none;
}

.essay-window .essay-modal-body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


.essay-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #000;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.essay-modal-close:hover {
    transform: rotate(90deg);
    background: #333;
}

.essay-modal-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.essay-modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 2rem;
    line-height: 1.3;
}

.essay-modal-text {
    color: #333;
    font-size: 1.1rem;
    line-height: 2;
}

.essay-modal-text p {
    margin-bottom: 1.5rem;
}

.essay-image-container {
    margin-top: 2rem;
    text-align: center;
}

.essay-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 图片画廊 - 全透明浮层 */
.image-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2000;
}

.image-gallery-modal.active {
    display: block;
}

.gallery-header,
.gallery-close,
.gallery-title,
.gallery-nav,
.gallery-counter {
    display: none;
}

.gallery-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.gallery-item.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.gallery-item img {
    max-width: 50vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.5),
        0 15px 45px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* ===== 页脚 ===== */
.footer {
    background: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer p {
    color: var(--text-color);
}

.footer i {
    color: var(--primary-pink);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .avatar {
        width: 150px;
        height: 150px;
    }

    .profile-name {
        font-size: 2rem;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

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

@media (max-width: 480px) {
    .profile-card {
        padding: 2rem 1rem;
    }

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

    .bilibili-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}
