/* 隐藏所有元素的滚动条 */
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

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

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

body {
    font-family: 'Arial', 'Helvetica', 'Microsoft YaHei', sans-serif;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* 首页全屏滚动样式 */
.home-body {
    overflow-y: hidden;
    scroll-snap-type: y mandatory;
}

/* 隐藏滚动条 */
body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ========== 通用部分样式 ========== */
.section {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}


/* ========== 第一部分：首页 ========== */
.section-1 {
    background: url('image1.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-1.slide-up {
    transform: translateY(-100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('image1.jpg') center/cover no-repeat;
    z-index: -1;
}

.section-1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 2;
    color: #fff;
}

.main-title {
    font-size: 5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5rem;
    animation: fadeInDown 1s ease-out;
}

.typing-text {
    font-size: 1.8rem;
    min-height: 2.5rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out 0.5s both;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    z-index: 2;
}

.arrow-down {
    width: 30px;
    height: 30px;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(45deg);
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

@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);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========== 全局导航栏 ========== */
.nav-hover-zone {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    z-index: 1250;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1200;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
}

.top-nav.collapsed {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.nav-hover-zone:hover + .top-nav,
.top-nav:hover {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nav-left {
    font-size: 1.3rem;
    font-weight: 900;
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 2px;
    display: flex;
    gap: 2px;
}

.nav-logo span {
    display: inline-block;
}

.nav-logo .letter-red { color: #E60012; }
.nav-logo .letter-yellow { color: #FFD700; }
.nav-logo .letter-blue { color: #0066CC; }
.nav-logo .letter-black { color: #000; }

.nav-center {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-item:hover {
    color: rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.04);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    stroke: currentColor;
}

.nav-text {
    font-weight: 900;
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

.nav-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #2f2f2f;
    transition: transform 0.25s ease;
}

.top-nav.collapsed .nav-toggle {
    transform: rotate(180deg);
}

/* 搜索框 */
.search-box {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: height 0.3s ease;
    z-index: 1100;
}

.search-box.active {
    height: 80px;
}

.search-box input {
    width: 60%;
    max-width: 600px;
    padding: 12px 20px;
    font-size: 1.1rem;
    border: 2px solid #fff;
    background: transparent;
    color: #fff;
    outline: none;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-close {
    position: absolute;
    right: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* ========== 第二部分：蒙德里安风格 ========== */
.section-2 {
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding-top: 40px;
}

.mondrian-container {
    width: 90%;
    height: 85%;
    display: grid;
    grid-template-columns: 3.5fr 0.7fr 2fr 0.4fr 0.4fr 3fr;
    grid-template-rows: 40px 40px 1fr 60px 1.5fr;
    gap: 12px;
    position: relative;
    padding: 20px;
}

.mondrian-block {
    border: 4px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.mondrian-block[data-block] {
    cursor: pointer;
}

.mondrian-block[data-block]:hover {
    box-shadow: 10px 10px 0 #000;
    transform: translate(-5px, -5px);
    z-index: 5;
}

/* 蒙德里安颜色 */
.yellow-block { background-color: #facd01; }
.blue-block { background-color: #044ea2; }
.red-block { background-color: #e30512; }
.white-block { background-color: #ffffff; }
.black-block { background-color: #000000; }

/* 具体布局 - 按图示 */
.block-art { grid-column: 1 / 3; grid-row: 1 / 4; }
.block-portfolio { grid-column: 1; grid-row: 4 / 6; }
.block-divider-left-top { grid-column: 2; grid-row: 4; border-width: 2px; }
.block-divider-left-bottom { grid-column: 2; grid-row: 5; border-width: 2px; }

.block-center-thin-1 { grid-column: 3; grid-row: 1; border-width: 2px; }
.block-center-thin-2 { grid-column: 3; grid-row: 2; border-width: 2px; }
.block-media { grid-column: 3; grid-row: 3 / 5; }
.block-business { grid-column: 3 / 5; grid-row: 5; }

.block-tech { grid-column: 4 / 7; grid-row: 1 / 5; }
.block-divider-right-2 { grid-column: 5; grid-row: 5; border-width: 2px; }
.block-info { grid-column: 6; grid-row: 5; }

.block-content {
    text-align: center;
    z-index: 2;
}

.mondrian-block h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.yellow-block h2,
.white-block h2 {
    color: #000;
}

.blue-block h2,
.red-block h2 {
    color: #fff;
}

/* 网站资讯样式优化 */
.info-content {
    padding: 15px;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #444;
}

.info-item svg {
    color: #888;
}

.info-text {
    font-weight: 500;
}

/* 卡片翻转效果 */
.card-flip-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-flip-container.active {
    display: flex;
    opacity: 1;
}

.flip-card {
    width: 500px;
    height: 400px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip-container.active .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 8px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.flip-card-front {
    background-color: var(--card-color, #fff);
}

.flip-card-back {
    background-color: var(--card-color, #fff);
    transform: rotateY(180deg);
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    color: #000;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    transition: transform 0.2s ease;
    z-index: 10;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.card-detail-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #000;
    text-align: center;
}

.card-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #000;
}

.card-detail-link:hover {
    background: #fff;
    color: #000;
}

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

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

/* 留言气泡输入框 */
.bubble-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bubble-modal.active {
    display: flex;
    opacity: 1;
}

.bubble-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.bubble-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
}

.bubble-modal h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: #000;
}

.bubble-modal textarea {
    width: 100%;
    min-height: 140px;
    padding: 12px 14px;
    font-size: 1rem;
    border: 2px solid #000;
    border-radius: 8px;
    resize: vertical;
    outline: none;
}

.bubble-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 15px;
}

.bubble-modal-actions button {
    padding: 10px 16px;
    border: 2px solid #000;
    background: #000;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.bubble-modal-actions button:last-child {
    background: #fff;
    color: #000;
}

.bubble-modal-actions button:hover {
    transform: translateY(-2px);
}

/* ========== 第三部分：自我介绍 ========== */
.section-3 {
    background: url('image2.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.about-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('image2.jpg') center/cover no-repeat;
    filter: blur(5px);
    z-index: -1;
}

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

.avatar-container {
    position: relative;
    z-index: 2;
}

.avatar-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 5px solid #fff;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: #fff;
    animation: float 3s ease-in-out infinite;
    margin-bottom: 40px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 联系方式卡片 */
.contact-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    margin-top: 20px;
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #000;
    text-align: center;
}

.contact-info {
    text-align: center;
}

.contact-info p {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #333;
}

.contact-card .social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.contact-card .social-link {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    border: 2px solid #000;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-card .social-link:hover {
    background-color: #000;
    color: #fff;
    transform: translateY(-2px);
}

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

/* 气泡样式 */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: bubbleFloat 15s infinite ease-in-out;
    padding: 15px;
    white-space: nowrap;
    width: 80px;
    height: 80px;
    text-align: center;
    pointer-events: auto;
}

.bubble.interactive {
    border: 2px dashed #000;
    background: rgba(255, 255, 255, 0.8);
    color: #555;
}

@keyframes bubbleFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1.2);
        opacity: 0;
    }
}

/* ========== 页面加载动画 ========== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.page-loader.active {
    display: flex;
}

.loader-square {
    width: 80px;
    height: 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    animation: jump-rotate 1.2s infinite ease-in-out;
}

.loader-inner-square {
    width: 100%;
    height: 100%;
}

.loader-inner-square.red { background-color: #e30512; }
.loader-inner-square.yellow { background-color: #facd01; }
.loader-inner-square.blue { background-color: #044ea2; }
.loader-inner-square.white { background-color: #ffffff; border: 1px solid #000; }

@keyframes jump-rotate {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(90deg); }
    50% { transform: translateY(0) rotate(180deg); }
    75% { transform: translateY(-15px) rotate(270deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

/* ========== 蒙德里安风格页面切换动画 ========== */
.page-transition {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    overflow: hidden;
    pointer-events: none;
    background: transparent;
}

.page-transition.active {
    display: block;
}

.mondrian-block-anim {
    position: absolute;
    border: 3px solid #000;
    opacity: 0;
    transform: translateY(-100%);
}

@keyframes mondrianFall {
    0% {
        opacity: 0;
        transform: translateY(-100%) rotate(0deg);
    }
    5% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(110vh) rotate(var(--rotate));
    }
}

.mondrian-block-anim.falling {
    animation: mondrianFall 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 鼠标点击特效粒子 */
.click-particle {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    width: 8px;
    height: 8px;
    animation: particle-fade 0.8s forwards ease-out;
}

@keyframes particle-fade {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .main-title {
        font-size: 3.5rem;
    }
    
    .typing-text {
        font-size: 1.5rem;
    }
    
    .mondrian-container {
        width: 95%;
        height: 95%;
        gap: 6px;
        grid-template-columns: 2.5fr 1.6fr 2.5fr;
        grid-template-rows: 3fr 1fr 3fr 2fr;
    }
    
    .mondrian-block {
        border-width: 6px;
    }
    
    .mondrian-block h2 {
        font-size: 1.4rem;
    }
    
    .top-nav {
        height: 60px;
    }
    
    .flip-card {
        width: 400px;
        height: 350px;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
        letter-spacing: 0.3rem;
    }
    
    .typing-text {
        font-size: 1.2rem;
    }
    
    .top-nav {
        height: 52px;
        padding: 0 12px;
    }
    
    .nav-center {
        gap: 14px;
    }
    
    .nav-item {
        padding: 5px 8px;
        font-size: 0.85rem;
    }
    
    .nav-icon {
        font-size: 1rem;
    }
    
    .mondrian-container {
        grid-template-columns: 1.6fr 1.2fr 1.6fr;
        grid-template-rows: 2.5fr 1fr 2.5fr 1.5fr;
        gap: 4px;
        width: 96%;
    }
    
    .mondrian-block {
        border-width: 4px;
    }
    
    .mondrian-block h2 {
        font-size: 1rem;
    }
    
    .flip-card {
        width: 90%;
        max-width: 340px;
        height: 280px;
    }
    
    .avatar-circle {
        width: 200px;
        height: 200px;
    }
    
    .contact-card {
        max-width: 300px;
        padding: 20px 25px;
    }
    
    .bubble {
        font-size: 0.75rem;
        width: 60px;
        height: 60px;
        padding: 10px;
    }
    
    .info-content {
        padding: 15px;
    }
    
    .info-item {
        font-size: 0.8rem;
    }
}
