@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Russo+One&display=swap');

body {
    font-family: 'Share Tech Mono', monospace;
    overscroll-behavior: none;
    font-size: 24px;
    text-align: center;
    background-color: #08203A;
    color: #8EE3F1;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    cursor: url("img/cursor.png"), auto;
    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Old versions of Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Prevent zoom on double tap for mobile */
    touch-action: manipulation;
    /* Safari mobile viewport fix */
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
}

/* Main container for proportional scaling */
.main-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Mobile optimization: allow content to fill width */
@media (max-width: 900px), (max-height: 900px), (pointer: coarse) {
    .main-container {
        justify-content: flex-start;
        align-items: center;
    }
    
    .content-wrapper {
        margin: 0;
        transform-origin: left center;
    }
}

/* More specific mobile portrait optimization */
@media (max-width: 900px) and (orientation: portrait) {
    .main-container {
        justify-content: flex-start;
        align-items: flex-start;
        padding: 0;
    }
    
    .content-wrapper {
        margin: 0;
        transform-origin: left top;
    }
}

/* Content wrapper with fixed PC proportions */
.content-wrapper {
    width: 1920px;
    height: 1080px;
    position: relative;
    transform-origin: center center;
    background-color: #08203A;
    display: flex;
    flex-direction: column;
}

/* Hide cursor on touch devices */
@media (pointer: coarse) {
    body {
        cursor: none;
    }
}

/* Fullscreen mode optimizations */
:fullscreen .main-container,
:-webkit-full-screen .main-container,
:-moz-full-screen .main-container,
:-ms-fullscreen .main-container {
    width: 100vw;
    height: 100vh;
}

:fullscreen,
:-webkit-full-screen,
:-moz-full-screen,
:-ms-fullscreen {
    overflow: hidden;
}

/* Hide fullscreen button in fullscreen mode */
:fullscreen #fullscreen-btn,
:-webkit-full-screen #fullscreen-btn,
:-moz-full-screen #fullscreen-btn,
:-ms-fullscreen #fullscreen-btn {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 16px;
    opacity: 0.8;
}

p {
    margin: 0;
}

.intro {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    z-index: 99999;
    background-color: #08203A;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fade-out ease-in 0.3s forwards;
    animation-delay: 4.5s;
}

.logo {
    position: relative;
    opacity: 1;
    animation: fade-out ease-in 1s forwards;
    animation-delay: 3.3s;
}

.logo-svg {
    position: absolute;
    z-index: 999999;
    height: 21px;
    top: 42px;
    right: 43px;
    opacity: 0;
    animation: fade-in ease-in 1s forwards;
    animation-delay: 2s;
}

.logo-svg path {
    fill: #8EE3F1;
}

.logo::after {
    content: '';
    position: absolute;
    left: 21px;
    bottom: 21px;
    width: 0;
    height: 2px;
    background-color: #8EE3F1;
    animation: grow ease-in 0.8s forwards;
    animation-delay: 2s;
}

.logo::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 21px;
    width: 0;
    margin-left: 80%;
    height: 2px;
    background-color: #8EE3F1;
    animation: grow ease-in 0.8s forwards;
    animation-delay: 1.5s;
}

.logo-text {
    position: absolute;
    top: 36px;
    left: 28px;
    font-family: 'Russo One', sans-serif;
    font-size: 28px;
    letter-spacing: 12px;
    z-index: 99999;
    opacity: 0;
    animation: fade-in ease-in 1s forwards;
    animation-delay: 2s;
}

.logo-text .e {
    color: #08203A;
}

.logo-bg {
    position: absolute;
    width: 0;
    top: 33px;
    left: 20px;
    height: 40px;
    background-color: #08203A;
    z-index: 9999;
    animation: grow linear 0.6s forwards;
    animation-delay: 1.5s;
}

.logo-circles {
    display: block;
    width: 200px;
    height: 100px;
    border: 2px solid #8EE3F1;
    border-radius: 100%;
    position: relative;
}

.logo-circles::before {
    content: '';
    width: 0;
    height: 100%;
    position: absolute;
    top: -2px;
    left: 50%;
    border: 2px solid #8EE3F1;
    border-radius: 100%;
    animation: scale72 linear 1s forwards;
    animation-delay: 1s;
    opacity: 0;
}

.logo-circles::after {
    content: '';
    width: 0;
    height: 100%;
    position: absolute;
    top: -2px;
    left: 50%;
    border: 2px solid #8EE3F1;
    border-radius: 100%;
    animation: scale33 linear 1s forwards;
    animation-delay: 1.8s;
    opacity: 0;
}

header {
    background-color: #08203A;
    border-bottom: 2px solid #8EE3F1;
    width: 100%;
    z-index: 99;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    height: 80px;
}

header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #08203A;
    display: block;
    border-bottom: 2px solid #8EE3F1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    width: 90%;
    border: 2px solid #8EE3F1;
    padding: 8px;
    margin: 20px 0;
}

.header-content div {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content div p {
    margin-left: 40px;
}

.header-content .lumen {
    font-family: 'Russo One', sans-serif;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 8px;
    position: relative;
    width: 110px;
    height: 28px;
}

.header-content .lumen .circles {
    border-radius: 100%;
    height: 80px;
    width: 120px;
    position: absolute;
    border: 2px solid #8EE3F1;
    height: 68px;
    width: 108px;
    top: -45px;
    left: -21px;
}

.header-content .lumen .circles::before {
    content: '';
    width: 72%;
    height: 100%;
    position: absolute;
    top: -2px;
    left: 14%;
    border: 2px solid #8EE3F1;
    border-radius: 100%;
}

.header-content .lumen .circles::after {
    content: '';
    width: 33%;
    height: 100%;
    position: absolute;
    border: 2px solid #8EE3F1;
    border-radius: 100%;
    left: 31%;
    top: -2px;
}

.lumen-text {
    background-color: #08203A;
    padding: 2px;
    margin-bottom: 2px;
    position: absolute;
    left: -7px;
    z-index: 999;
}

.header-percent {
    color: transparent;
    -webkit-text-stroke: 1px #8EE3F1;
}

section {
    width: 100%;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(30, 1fr);
    grid-template-rows: repeat(13, 1fr);
    overflow: hidden;
    gap: 1px;
    padding: 20px;
    justify-content: center;
    align-content: center;
    box-sizing: border-box;
}

footer {
    border-top: 2px solid #8EE3F1;
    width: 100%;
    background-color: #08203A;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
    height: 120px;
}

footer>div {
    width: 100%;
}

footer .code {
    margin-top: 16px;
    padding-top: 8px;
    font-size: 16px;
    border-top: 1px solid #8EE3F1;
}

.footer-container {
    display: grid;
    width: 90%;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 40px;
    grid-row-gap: 8px;
}

.footer-container div {
    border: 2px solid #8EE3F1;
    font-size: 20px;
    padding: 4px 0;
    position: relative;
}

.footer-container div::before {
    content: '';
    position: absolute;
    height: 100%;
    left: 0;
    top: 0;
    background-color: #8EE3F1;
    z-index: -1;
}

/* 98%的进度条文字颜色设置为背景色 */
.footer-container div.b11 {
    color: #08203A;
}

.footer-container div.b30::before {
    width: 27%;
}

.footer-container div.b11::before {
    width: 98%;
}

.footer-container div.b9::before {
    width: 0%;
}

.footer-container div.b27::before {
    width: 7%;
}

.footer-container div.b18::before {
    width: 12%;
}

/* 当进度条覆盖文字时的样式 */
.footer-container div {
    color: #8EE3F1;
    mix-blend-mode: difference;
}

section>div {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 100;
    font-size: 18px;
    border: none;
    background: none;
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    box-sizing: border-box;
    line-height: 1;
    transition: transform 0.3s ease;
    min-height: 0;
    min-width: 0;
}

section>div.matrix-bit {
    transform: scale(1.5);
    z-index: 100;
    font-weight: 600;
}

section>div.matrix-bit.center {
    transform: scale(2.0);
    z-index: 101;
    font-weight: 700;
}

section>div.matrix-bit.near-center {
    transform: scale(1.8);
    z-index: 100;
    font-weight: 600;
}

section>div.matrix-bit.edge {
    transform: scale(1.3);
    z-index: 99;
    font-weight: 500;
}

section>div.b-20 {
    animation: float-bottom-20 6s ease-in-out infinite;
}

section>div.l-20 {
    animation: float-left-20 6s ease-in-out infinite;
}

section>div.d-1 {
    animation-delay: 1s;
}

section>div.d-1_5 {
    animation-delay: 1.5s;
}

section>div.du-2 {
    animation-duration: 3s;
}

section>div.du-8 {
    animation-duration: 4s;
}

@keyframes float-bottom-20 {
    0% {
        padding-bottom: 0;
        padding-top: 0;
    }

    50% {
        padding-bottom: 10px;
        padding-top: 0;
    }

    100% {
        padding-bottom: 0;
        padding-top: 0;
    }
}

@keyframes float-left-20 {
    0% {
        padding-left: 0;
        padding-right: 0;
    }

    50% {
        padding-left: 10px;
        padding-right: 0;
    }

    100% {
        padding-left: 0;
        padding-right: 0;
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

@keyframes grow {
    0% {
        width: 0;
        margin-left: 80%;
    }

    100% {
        width: 80%;
        margin-left: 0;
    }
}

@keyframes scale {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes scale33 {
    0% {
        opacity: 1;
        width: 0;
        left: 50%;
    }

    100% {
        width: 33%;
        left: 33%;
        opacity: 1;
    }
}

@keyframes scale72 {
    0% {
        opacity: 1;
        width: 0;
        left: 50%;
    }

    100% {
        width: 72%;
        left: 14%;
        opacity: 1;
    }
}



