/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f8f8f8;
    --gray-medium: #666666;
    --gray-dark: #333333;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;
    
    /* Timing */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    font-weight: 400;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Sparkling Canvas */
#sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}

/* Logo Header */
.logo-header {
    position: fixed;
    top: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo {
    max-height: 32px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

/* Container */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-xl);
    position: relative;
    z-index: 2;
}

/* Content */
.content {
    text-align: center;
    max-width: 1200px; /* 增加宽度防止自动换行 */
    width: 100%;
    animation: fadeInUp 1.2s ease-out;
}

/* Typography */
.heading {
    font-size: clamp(2.2rem, 7vw, 4.5rem); /* 稍微减小字体以确保一行放得下 */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-xl);
    color: var(--black);
    word-wrap: break-word; /* 只在必要时断词 */
}

.highlight {
    position: relative;
    color: var(--black);
    display: inline-block;
}

.subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 400;
    color: var(--gray-medium);
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1.2s ease-out 0.3s both;
}

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


/* Hover Effects */
.heading:hover .highlight {
    animation: textShimmer 0.8s ease-in-out;
}

@keyframes textShimmer {
    0%, 100% {
        color: var(--black);
    }
    50% {
        color: var(--gray-medium);
    }
}

/* Typing Cursor */
.cursor {
    font-weight: 400;
    color: #0088FF;
    animation: none; /* Controlled by JavaScript */
}

/* Footer */
.footer {
    position: fixed;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    color: var(--gray-medium);
    margin: 0;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-lg);
    }
    
    .heading {
        margin-bottom: var(--spacing-lg);
    }
    
    .subtitle {
        font-size: 1.125rem;
    }
    
    .logo {
        max-height: 50px;
    }
    
    .logo-header {
        top: var(--spacing-lg);
    }
    
    .footer {
        bottom: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--spacing-md);
    }
    
    .heading {
        letter-spacing: -0.01em;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    #sparkles {
        display: none;
    }
}

/* Print Styles */
@media print {
    #sparkles {
        display: none;
    }
    
    .container {
        min-height: auto;
        padding: 2rem;
    }
    
    .heading,
    .subtitle {
        color: var(--black) !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --gray-medium: var(--black);
    }
    
    .subtitle {
        color: var(--black);
    }
}