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

body {
    font-family: 'Arial', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
    line-height: 1.6;
    height: 100vh;
}

.container {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Background Elements */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.line {
    position: absolute;
    background: linear-gradient(90deg, transparent, #333, transparent);
    opacity: 0.6;
}

.line-1 {
    width: 1px;
    height: 100%;
    left: 20%;
    top: 0;
}

.line-2 {
    width: 100%;
    height: 1px;
    top: 30%;
    left: 0;
}

.line-3 {
    width: 1px;
    height: 100%;
    right: 25%;
    top: 0;
}

.line-4 {
    width: 100%;
    height: 1px;
    bottom: 40%;
    left: 0;
}

.line-5 {
    width: 1px;
    height: 60%;
    left: 60%;
    top: 20%;
    background: linear-gradient(180deg, transparent, #444, transparent);
    opacity: 0.7;
}

.line-6 {
    width: 80%;
    height: 1px;
    top: 70%;
    right: 0;
    background: linear-gradient(90deg, transparent, #333, transparent);
    opacity: 0.6;
}

/* Dots - styles will be applied dynamically via JavaScript */
.dot {
    position: absolute;
    border-radius: 50%;
    transition: all 0.3s ease;
}





/* Glow effects - styles will be applied dynamically via JavaScript */
.glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.5s ease;
}

/* Particles */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 6px #00ff88, 0 0 12px #00ff88;
    opacity: 0.8;
}

/* Typewriter cursor animation */
.typewriter-cursor {
    color: #00ff88;
    font-weight: bold;
    animation: blink 1s infinite;
    display: inline;
    margin-left: 2px;
}

.typewriter-text {
    display: inline;
}

/* Enhanced Typewriter Animation */
.typewriter-word, .typewriter-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotateX(90deg) scale(0.8);
    transform-origin: center bottom;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: blur(3px);
}

.typewriter-word.word-visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    filter: blur(0px);
    animation: wordFlip 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.typewriter-char.char-visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    filter: blur(0px);
    animation: charBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes wordFlip {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(90deg) scale(0.8);
        filter: blur(3px);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-5px) rotateX(45deg) scale(1.1);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) scale(1);
        filter: blur(0px);
    }
}

@keyframes charBounce {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(90deg) scale(0.8);
        filter: blur(3px);
    }
    30% {
        opacity: 0.8;
        transform: translateY(-10px) rotateX(30deg) scale(1.2);
        filter: blur(1px);
    }
    60% {
        opacity: 1;
        transform: translateY(5px) rotateX(-10deg) scale(0.95);
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) scale(1);
        filter: blur(0px);
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    border-bottom: 1px solid #222;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.logo-text {
    font-family: 'Audiowide', cursive;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 3px;
    color: #00ff88;
}

.logo-line {
    display: none;
}

.nav {
    display: flex;
    gap: 3rem;
}

.nav-item {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: #00ff88;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: #00ff88;
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

.github-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.github-link svg {
    transition: transform 0.3s ease, color 0.3s ease;
}

.github-link:hover svg {
    transform: scale(1.1);
    color: #00ff88;
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    z-index: 10;
    padding: 0 4rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    min-height: 80vh;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 0; /* 移除gap，使用精确定位 */
    position: relative;
    height: 240px; /* 设置容器固定高度 */
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 5.5rem;
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -1px;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
}

.title-line {
    display: block;
    position: relative;
    overflow: hidden;
}

.title-line:first-child {
    color: #ffffff;
}

.title-line:last-child {
    color: #00ff88;
    margin-left: 2rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #888;
    max-width: 600px;
    line-height: 1.8;
    text-align: justify;
    min-height: 100px;
    display: flex;
    align-items: flex-start;
    position: absolute;
    top: 180px;
    left: 0;
}

.cta-button {
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    width: fit-content;
}

.cta-button:hover {
    border-color: #00ff88;
    color: #00ff88;
}

.button-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #00ff88;
    transition: width 0.3s ease;
}

.cta-button:hover .button-line {
    width: 100%;
}

/* Hero Visual - Irregular Beauty */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.visual-grid {
    position: relative;
    width: 400px;
    height: 300px;
    transform: rotate(12deg) scale(1.1);
    animation: floatGrid 8s ease-in-out infinite;
}

.grid-item {
    position: absolute;
    background: linear-gradient(135deg, #111, #222);
    border: 1px solid #333;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: irregularFloat 6s ease-in-out infinite;
}

/* Irregular positioning and sizing */
.grid-item.item-1 {
    width: 80px;
    height: 80px;
    top: 20px;
    left: 30px;
    transform: rotate(-15deg);
    animation-delay: 0s;
}

.grid-item.item-2 {
    width: 100px;
    height: 60px;
    top: 10px;
    left: 150px;
    transform: rotate(25deg);
    animation-delay: -1s;
    border-radius: 50px;
}

.grid-item.item-3 {
    width: 70px;
    height: 90px;
    top: 40px;
    left: 280px;
    transform: rotate(-8deg);
    animation-delay: -2s;
    clip-path: polygon(0% 0%, 100% 20%, 80% 100%, 20% 80%);
}

.grid-item.item-4 {
    width: 90px;
    height: 70px;
    top: 150px;
    left: 20px;
    transform: rotate(18deg);
    animation-delay: -3s;
    border-radius: 20px 50px;
}

.grid-item.item-5 {
    width: 110px;
    height: 85px;
    top: 180px;
    left: 140px;
    transform: rotate(-22deg);
    animation-delay: -4s;
    clip-path: circle(40px at 50% 50%);
}

.grid-item.item-6 {
    width: 75px;
    height: 95px;
    top: 120px;
    left: 290px;
    transform: rotate(35deg);
    animation-delay: -5s;
    border-radius: 0 30px 0 30px;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.2), transparent);
    transition: left 0.8s ease;
}

.grid-item:hover {
    transform: scale(1.1) rotate(0deg);
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.grid-item:hover::before {
    left: 100%;
}

/* Floating animations */
@keyframes floatGrid {
    0%, 100% {
        transform: rotate(12deg) scale(1.1) translateY(0px);
    }
    50% {
        transform: rotate(8deg) scale(1.15) translateY(-10px);
    }
}

@keyframes irregularFloat {
    0%, 100% {
        transform: translateY(0px) rotate(var(--initial-rotation, 0deg));
    }
    25% {
        transform: translateY(-8px) rotate(calc(var(--initial-rotation, 0deg) + 5deg));
    }
    50% {
        transform: translateY(-15px) rotate(calc(var(--initial-rotation, 0deg) - 3deg));
    }
    75% {
        transform: translateY(-5px) rotate(calc(var(--initial-rotation, 0deg) + 8deg));
    }
}



/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem 2rem;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.9);
        backdrop-filter: blur(10px);
        z-index: 20;
    }
    
    .nav {
        gap: 2rem;
    }
    
    .main-content {
        padding: 0 2rem;
        padding-top: 140px;
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        min-height: calc(100vh - 140px);
    }
    
    .hero-title {
        font-size: 3rem;
        height: 120px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        max-width: 100%;
        text-align: left;
        position: relative;
        top: auto;
    }
    
    .visual-grid {
        transform: rotate(10deg) scale(0.8);
        width: 300px;
        height: 220px;
    }
    
    .grid-item.item-1 {
        width: 60px;
        height: 60px;
        top: 15px;
        left: 20px;
    }
    
    .grid-item.item-2 {
        width: 75px;
        height: 45px;
        top: 8px;
        left: 110px;
    }
    
    .grid-item.item-3 {
        width: 50px;
        height: 65px;
        top: 30px;
        left: 200px;
    }
    
    .grid-item.item-4 {
        width: 65px;
        height: 50px;
        top: 110px;
        left: 15px;
    }
    
    .grid-item.item-5 {
        width: 80px;
        height: 60px;
        top: 130px;
        left: 100px;
    }
    
    .grid-item.item-6 {
        width: 55px;
        height: 70px;
        top: 90px;
        left: 210px;
    }
}