* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00f0ff;
    --secondary: #ff00ea;
    --accent: #ffb800;
    --dark: #0a0a0f;
    --light: #f0f0f0;
    --glow: rgba(0, 240, 255, 0.6);
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    cursor: none;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 自定义光标 */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    transition: all 0.1s ease;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    opacity: 0.5;
    transition: all 0.3s ease;
}

/* 粒子背景 */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* 侧边导航 */
.side-nav {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    position: relative;
    display: block;
}

.nav-dot span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.nav-dot::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 240, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
}

.nav-dot:hover::before {
    opacity: 1;
    right: 40px;
}

.nav-dot.active span,
.nav-dot:hover span {
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary);
}

/* 社交悬浮球 */
.social-fab {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
}

.fab-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 30px var(--glow);
    transition: all 0.3s ease;
}

.fab-button:hover {
    transform: rotate(45deg) scale(1.1);
}

.fab-button svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.fab-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.social-fab:hover .fab-menu {
    opacity: 1;
    pointer-events: all;
    bottom: 90px;
}

.fab-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease calc(var(--i) * 0.1s) both;
}

.fab-item:hover {
    background: var(--primary);
    color: var(--dark);
    transform: scale(1.1);
}

.fab-item svg {
    width: 20px;
    height: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 主页区域 */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 10;
}

/* 故障效果标题 */
.glitch-wrapper {
    margin-bottom: 20px;
}

.glitch {
    font-size: 6rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: glitch 5s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch::before {
    animation: glitch-1 2.5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
    animation: glitch-2 2.5s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-5px, 0); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(5px, 0); }
}

/* 打字机效果 */
.typewriter {
    font-size: 1.5rem;
    margin-bottom: 40px;
    height: 40px;
    color: var(--primary);
}

.cursor {
    display: inline-block;
    background: var(--primary);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 3D立方体 */
.hero-3d {
    perspective: 1000px;
    margin: 60px auto;
    width: 200px;
    height: 200px;
}

.cube {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--primary);
    background: rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(10px);
}

.cube-face.front  { transform: rotateY(0deg) translateZ(100px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(100px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(100px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(100px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(100px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotateCube {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* 液态按钮 */
.cta-button {
    position: relative;
    padding: 20px 60px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.cta-button span {
    position: relative;
    z-index: 2;
    color: var(--primary);
    transition: color 0.3s ease;
}

.liquid {
    position: absolute;
    top: -80px;
    left: 0;
    width: 100%;
    height: 200px;
    background: var(--primary);
    transition: all 0.7s ease;
    border-radius: 50%;
}

.cta-button:hover .liquid {
    top: -20px;
}

.cta-button:hover span {
    color: var(--dark);
}

.cta-button:hover {
    box-shadow: 0 0 30px var(--glow);
}

/* 滚动指示器 */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scroll-down span {
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 3px;
    animation: scroll 1.5s infinite;
}

.scroll-down span:nth-child(2) { animation-delay: 0.2s; }
.scroll-down span:nth-child(3) { animation-delay: 0.4s; }

@keyframes scroll {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(10px); }
}

/* 通用区域样式 */
section {
    min-height: 100vh;
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.reveal-text {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.header-line {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 20px var(--glow);
}

/* 关于区域 */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.profile-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, var(--glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 20px;
}

.profile-card:hover .card-glow {
    opacity: 1;
}

.hexagon {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    position: relative;
}

.hexagon-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.profile-info h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.role {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.tags span {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.about-text .intro {
    font-size: 2rem;
    margin-bottom: 30px;
    line-height: 1.4;
}

.highlight {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(240, 240, 240, 0.8);
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--glow);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    color: rgba(240, 240, 240, 0.6);
    margin-top: 10px;
}

/* 技能区域 */
.skills-section {
    background: rgba(0, 0, 0, 0.3);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-orb {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    cursor: pointer;
}

.orb-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, var(--glow), transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: rotate 10s linear infinite;
}

.skill-orb:hover .orb-glow {
    opacity: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orb-content {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--primary);
    background: rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.skill-orb:hover .orb-content {
    transform: scale(1.1);
    box-shadow: 0 0 40px var(--glow);
}

.skill-icon {
    font-size: 3rem;
}

.skill-info {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 150px;
}

.skill-name {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.skill-level {
    display: block;
    color: var(--primary);
    font-size: 0.9rem;
}

/* 作品区域 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.project-item {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
}

.project-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: transform 0.5s ease;
}

.project-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.project-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.project-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-item:hover .project-image {
    transform: scale(1.1);
}

.project-details h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-details p {
    color: rgba(240, 240, 240, 0.8);
    margin-bottom: 20px;
}

.tech-stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-stack span {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 30px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-btn:hover {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 20px var(--glow);
}

/* 联系区域 */
.contact-section {
    background: rgba(0, 0, 0, 0.3);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.contact-info > p {
    color: rgba(240, 240, 240, 0.8);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.method-item {
    display: flex;
    gap: 20px;
    align-items: center;
}

.method-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.method-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.method-item p {
    color: rgba(240, 240, 240, 0.6);
}

/* 浮动表单 */
.contact-form {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
}

.form-floating {
    position: relative;
    margin-bottom: 30px;
}

.form-floating input,
.form-floating textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(0, 240, 255, 0.3);
    color: var(--light);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-floating label {
    position: absolute;
    left: 0;
    top: 15px;
    color: rgba(240, 240, 240, 0.5);
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-floating input:focus,
.form-floating textarea:focus {
    border-color: var(--primary);
}

.form-floating input:focus + label,
.form-floating input:valid + label,
.form-floating textarea:focus + label,
.form-floating textarea:valid + label {
    top: -20px;
    font-size: 0.9rem;
    color: var(--primary);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.form-floating input:focus ~ .form-line,
.form-floating textarea:focus ~ .form-line {
    width: 100%;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50px;
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--glow);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--glow);
}

.btn-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

/* 加载动画 */
.loader {
    position: fixed;
    inset: 0;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(0, 240, 255, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    color: var(--primary);
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .glitch {
        font-size: 4rem;
    }

    .reveal-text {
        font-size: 3rem;
    }

    .about-grid,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .side-nav {
        display: none;
    }

    .social-fab {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 640px) {
    .glitch {
        font-size: 2.5rem;
    }

    .reveal-text {
        font-size: 2rem;
    }

    .hero-3d {
        width: 150px;
        height: 150px;
    }

    .cube,
    .cube-face {
        width: 150px;
        height: 150px;
    }

    .cube-face.front,
    .cube-face.back,
    .cube-face.right,
    .cube-face.left,
    .cube-face.top,
    .cube-face.bottom {
        transform-origin: center;
    }

    .cube-face.front  { transform: rotateY(0deg) translateZ(75px); }
    .cube-face.back   { transform: rotateY(180deg) translateZ(75px); }
    .cube-face.right  { transform: rotateY(90deg) translateZ(75px); }
    .cube-face.left   { transform: rotateY(-90deg) translateZ(75px); }
    .cube-face.top    { transform: rotateX(90deg) translateZ(75px); }
    .cube-face.bottom { transform: rotateX(-90deg) translateZ(75px); }

    .skills-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 20px;
    }
}