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

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #ffffff;
}

/* Global Glow Border (Restore) */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 50px 10px rgba(60, 100, 255, 0.3);
    /* Restored to a more visible level */
    pointer-events: none;
    z-index: 9999;
}

body {
    background-image:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px);
    background-size: 20px 20px;
    color: #000000;
    line-height: 1.4;
}

/* Hero Section - 全屏显示 */
:root {
    --hero-height: 100vh;
    --hero-width: 100vw;
}

.hero {
    position: relative;
    width: var(--hero-width);
    height: var(--hero-height);
    overflow: hidden;
    background-color: #ffffff;
    background-image:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px);
    background-size: 20px 20px;
}

.hero-mirror-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    transition: opacity 0.3s ease-out;
    z-index: 2;
}

.hero-image-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.hero-center-image {
    max-width: 30vw;
    max-height: 25vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 1;
    transition: filter 0.3s ease-out;
}

.hero-image-caption {
    margin-top: 20px;
    font-size: 14px;
    color: #000000;
    text-align: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 1;
    transition: filter 0.3s ease-out;
}

.hero-layer {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
}

.hero-layer:active {
    cursor: grabbing;
}

.hero-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: noiseMove 20s infinite;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
    opacity: 0.25;
    /* Reduced from default/inherited */
}

.hero-layer::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px);
    animation: noiseEdge 15s infinite;
    pointer-events: none;
    z-index: 2;
    mask:
        radial-gradient(ellipse at center, black 60%, transparent 100%),
        linear-gradient(black, black);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
    opacity: 0.15;
    /* Subtler edge noise */
}

@keyframes noiseMove {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translate(10px, -15px) scale(1.1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-15px, 10px) scale(0.9);
        opacity: 0.4;
    }

    75% {
        transform: translate(15px, 15px) scale(1.05);
        opacity: 0.45;
    }
}

@keyframes noiseEdge {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.5;
    }

    33% {
        transform: translate(2px, -2px) rotate(0.5deg);
        opacity: 0.7;
    }

    66% {
        transform: translate(-2px, 2px) rotate(-0.5deg);
        opacity: 0.6;
    }
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) scale(1);
    object-fit: cover;
    object-position: center center;
    cursor: grab;
    /* transition removed to allow smooth JS physics control */
    transform-origin: center center;
}

.hero-video:active {
    cursor: grabbing;
}

.hero-layer {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
}

.hero-layer:active {
    cursor: grabbing;
}

.hero-original {
    grid-column: 1;
    grid-row: 1;
}

.hero-flip-h {
    grid-column: 2;
    grid-row: 1;
    transform: scaleX(-1);
}

.hero-flip-v {
    grid-column: 1;
    grid-row: 2;
    transform: scaleY(-1);
}

.hero-flip-both {
    grid-column: 2;
    grid-row: 2;
    transform: scale(-1, -1);
}

/* Hero Header Overlay */
.hero-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 40px;
    background: transparent;
    z-index: 10;
}

.hero-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.hero-site-title {
    font-size: 18px;
    font-weight: 500;
    color: #000000;
    text-decoration: none;
    transition: opacity 0.2s;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hero-site-title:hover {
    opacity: 0.7;
}

.hero-nav {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 3px;
    font-size: 14px;
    line-height: 1.4;
    color: #000000;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nav-sep {
    color: rgba(0, 0, 0, 0.3);
}

.hero-nav a {
    color: rgba(0, 0, 0, 1);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.hero-nav a:hover {
    text-decoration: none;
    opacity: 0.6;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
    gap: 3px;
}

.lang-switcher-btn {
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.5);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 0;
}

.lang-switcher-btn:hover {
    color: rgba(0, 0, 0, 0.8);
}

.lang-switcher-btn.active {
    color: #000000;
    font-weight: 500;
}


/* Responsive */
@media (max-width: 560px) {
    :root {
        --hero-height: 100vh;
    }

    .hero-header {
        position: relative;
        padding: 20px;
        background: #ffffff;
    }

    .hero-site-title {
        color: #000000;
    }

    .hero-nav {
        color: #000000;
    }

    .hero-nav a {
        color: #0066cc;
    }

    .hero-header-content {
        flex-direction: column;
    }
}