/* ========================================
   01. 基础设置
======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: #f7f4ef;
    color: #383433;

    font-family:
        Georgia,
        "Times New Roman",
        "Yu Mincho",
        "Hiragino Mincho ProN",
        serif;

    overflow-x: hidden;
}


/* ========================================
   02. 第一页 HERO
======================================== */

.hero {
    width: 100%;
    height: 100vh;
    height: 100svh;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    padding: 40px 60px;
}


/* ---------- 背景层 ---------- */

.hero-bg {
    position: absolute;
    inset: 0;

    pointer-events: none;

    z-index: 0;

    transition: transform 0.8s ease-out;
}


/* 星轨 */

.orbit {
    position: absolute;

    left: 50%;

    border: 1px solid rgba(185, 163, 122, 0.22);

    border-radius: 50%;
}

.orbit-1 {
    width: 520px;
    height: 220px;

    top: 22%;

    animation: orbitOne 28s linear infinite;
}

.orbit-2 {
    width: 780px;
    height: 330px;

    top: 38%;

    animation: orbitTwo 38s linear infinite;
}


/* 星尘 */

.dust {
    position: absolute;

    color: #b9a37a;

    opacity: 0.35;

    animation: dustFloat 6s ease-in-out infinite;
}

.dust-1 {
    top: 22%;
    left: 17%;
}

.dust-2 {
    top: 68%;
    left: 20%;

    animation-delay: 1.5s;
}

.dust-3 {
    top: 27%;
    right: 17%;

    animation-delay: 2.4s;
}

.dust-4 {
    top: 70%;
    right: 21%;

    animation-delay: 3.2s;
}


/* ---------- 左上 / 右上 ---------- */

.hero-top {
    position: absolute;

    top: 35px;
    left: 50px;
    right: 50px;

    display: flex;
    justify-content: space-between;

    z-index: 2;

    font-size: 12px;
    letter-spacing: 4px;

    color: #8b8580;
}


/* ---------- 中央 ---------- */

.hero-center {
    position: relative;

    z-index: 2;

    text-align: center;

    transition: transform 0.8s ease-out;
}


.star {
    margin-bottom: 30px;

    font-size: 18px;

    color: #b9a37a;
}


h1 {
    margin: 0;

    font-size: clamp(55px, 7vw, 100px);

    font-weight: normal;

    letter-spacing: 12px;
}


.subtitle {
    margin-top: 30px;

    font-size: 14px;

    line-height: 2;

    letter-spacing: 4px;

    color: #68615d;
}


.jp-text {
    margin-top: 42px;

    font-size: 13px;

    line-height: 2.2;

    letter-spacing: 3px;

    color: #9a918a;
}


/* ---------- scroll ---------- */

.scroll {
    position: absolute;

    bottom: 35px;
    left: 50%;

    transform: translateX(-50%);

    z-index: 3;

    color: #aaa19a;

    font-size: 10px;
    letter-spacing: 3px;

    text-decoration: none;

    transition:
        opacity 0.4s ease,
        letter-spacing 0.4s ease;
}

.scroll:hover {
    opacity: 0.55;
    letter-spacing: 5px;
}


/* ========================================
   03. 首页进入动画
======================================== */

.intro {
    opacity: 0;

    filter: blur(6px);

    animation: introFade 1.5s ease forwards;
}


.intro-1 {
    animation-delay: 0.15s;
}

.intro-2 {
    animation-delay: 0.5s;
}

.intro-3 {
    animation-delay: 0.8s;
}

.intro-4 {
    animation-delay: 1.15s;
}

.intro-5 {
    animation-delay: 1.5s;
}

.intro-6 {
    animation-delay: 1.9s;
}


h1.intro {
    animation-name: titleIntro;
}


.star.intro {
    animation:
        introFade 1.4s ease 0.5s forwards,
        starBreath 3s ease-in-out 2s infinite;
}


.scroll.intro {
    animation:
        scrollIntro 1.4s ease 1.9s forwards,
        scrollFloat 2.4s ease-in-out 3.2s infinite;
}


/* ========================================
   04. 第二页以及后续页面
======================================== */

.content-section {
    width: min(100%, 1000px);

    min-height: 100vh;
    min-height: 100svh;

    margin: 0 auto;

    padding: 110px 70px;

    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: center;

    overflow: hidden;
}


/* 页码 */

.section-number {
    position: absolute;

    top: 65px;
    right: 70px;

    font-size: 11px;
    letter-spacing: 3px;

    color: #aaa19a;
}


/* ABOUT / GAMES */

.content-section h2 {
    margin: 0 0 25px;

    font-size: 12px;
    font-weight: normal;

    letter-spacing: 7px;

    color: #a89e97;
}


/* 中文大标题 */

.section-title {
    margin: 0 0 32px;

    font-size: 34px;

    font-weight: normal;

    letter-spacing: 4px;
}


/* 正文 */

.section-text {
    max-width: 540px;

    margin: 0;

    font-size: 14px;

    line-height: 2.4;

    letter-spacing: 2px;

    color: #77706c;
}


/* ========================================
   05. 第二页 About 特殊设计
======================================== */

.about-section::before {
    content: "";

    position: absolute;

    top: 0;
    left: 50%;

    width: 1px;
    height: 0;

    background: rgba(185, 163, 122, 0.38);

    transform: translateX(-50%);

    transition: height 1.3s ease;
}


.about-section.active::before {
    height: 75px;
}


/* About 内部依次出现 */

.about-section h2,
.about-section .section-title,
.about-section .section-text {
    opacity: 0;

    transform: translateY(28px);

    filter: blur(4px);

    transition:
        opacity 1s ease,
        transform 1.2s ease,
        filter 1s ease;
}


.about-section.active h2 {
    opacity: 1;

    transform: translateY(0);

    filter: blur(0);

    transition-delay: 0.2s;
}


.about-section.active .section-title {
    opacity: 1;

    transform: translateY(0);

    filter: blur(0);

    transition-delay: 0.45s;
}


.about-section.active .section-text {
    opacity: 1;

    transform: translateY(0);

    filter: blur(0);

    transition-delay: 0.7s;
}


/* ========================================
   06. 其他页面滚动动画
======================================== */

.reveal {
    opacity: 0;

    transform: translateY(55px);

    filter: blur(4px);

    transition:
        opacity 1.1s ease,
        transform 1.3s ease,
        filter 1.1s ease;
}


.reveal.active {
    opacity: 1;

    transform: translateY(0);

    filter: blur(0);
}


/* About 自己有内部动画，
   所以外层只负责页面出现 */

.about-section.reveal.active {
    opacity: 1;

    transform: translateY(0);

    filter: blur(0);
}


/* ========================================
   07. Games
======================================== */

.game-list {
    margin-top: 10px;

    display: flex;
    flex-direction: column;

    gap: 24px;
}


.game-list span {
    width: fit-content;

    font-size: 22px;

    letter-spacing: 3px;

    cursor: pointer;

    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}


.game-list span:hover {
    transform: translateX(12px);

    opacity: 0.55;
}


/* ========================================
   08. 页尾
======================================== */

footer {
    padding: 100px 30px;

    text-align: center;

    font-size: 10px;

    line-height: 2;

    letter-spacing: 3px;

    color: #aaa19a;
}


/* ========================================
   09. 动画定义
======================================== */

@keyframes introFade {

    from {
        opacity: 0;

        transform: translateY(20px);

        filter: blur(6px);
    }

    to {
        opacity: 1;

        transform: translateY(0);

        filter: blur(0);
    }

}


@keyframes titleIntro {

    from {
        opacity: 0;

        transform:
            translateY(25px)
            scale(0.96);

        letter-spacing: 22px;

        filter: blur(9px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);

        letter-spacing: 12px;

        filter: blur(0);
    }

}


@keyframes scrollIntro {

    from {
        opacity: 0;

        transform:
            translateX(-50%)
            translateY(15px);

        filter: blur(5px);
    }

    to {
        opacity: 1;

        transform:
            translateX(-50%)
            translateY(0);

        filter: blur(0);
    }

}


@keyframes starBreath {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.55;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }

}


@keyframes scrollFloat {

    0%,
    100% {
        transform:
            translateX(-50%)
            translateY(0);
    }

    50% {
        transform:
            translateX(-50%)
            translateY(7px);
    }

}


@keyframes dustFloat {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.25;
    }

    50% {
        transform: translateY(-16px);
        opacity: 0.75;
    }

}


@keyframes orbitOne {

    from {
        transform:
            translateX(-50%)
            rotate(18deg);
    }

    to {
        transform:
            translateX(-50%)
            rotate(378deg);
    }

}


@keyframes orbitTwo {

    from {
        transform:
            translateX(-50%)
            rotate(-14deg);
    }

    to {
        transform:
            translateX(-50%)
            rotate(346deg);
    }

}


/* ========================================
   10. 手机
======================================== */

@media (max-width: 768px) {

    .hero {
        padding: 28px 24px;
    }


    .hero-top {
        top: 25px;
        left: 25px;
        right: 25px;
    }


    h1 {
        font-size: 52px;

        letter-spacing: 7px;
    }


    .subtitle {
        font-size: 11px;

        letter-spacing: 3px;
    }


    .jp-text {
        margin-top: 35px;

        font-size: 11px;

        letter-spacing: 2px;
    }


    .orbit-1 {
        width: 340px;
        height: 150px;
    }


    .orbit-2 {
        width: 500px;
        height: 230px;
    }


    .content-section {
        width: 100%;

        min-height: 100svh;

        padding: 90px 32px;
    }


    .section-number {
        top: 45px;
        right: 32px;
    }


    .section-title {
        font-size: 28px;

        margin-bottom: 28px;
    }


    .section-text {
        font-size: 13px;

        line-height: 2.3;

        letter-spacing: 1.5px;
    }


    .game-list span {
        font-size: 18px;
    }


    .about-section.active::before {
        height: 55px;
    }

}


/* 用户如果系统设置了减少动画，
   网站也会尊重这个设置 */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}

/* =========================================
   STAR ARCHIVE / GAMES
========================================= */

.games-archive {
    position: relative;
}

.archive-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.archive-subtitle {
    margin-top: 18px;

    font-size: 12px;
    letter-spacing: 3px;
    line-height: 2;

    color: rgba(74, 65, 59, 0.48);
}


/* =========================================
   GAME LIST
========================================= */

.game-list {
    margin-top: 80px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 36px;
}


/* =========================================
   ARCHIVE CARD
========================================= */

.game-card {
    position: relative;

    min-height: 430px;

    padding: 26px;

    border:
        1px solid
        rgba(132, 111, 88, 0.14);

    background:
        rgba(255, 253, 249, 0.28);

    overflow: hidden;

    transition:
        transform 0.6s cubic-bezier(.2,.7,.2,1),
        border-color 0.6s ease,
        box-shadow 0.6s ease;
}

.game-card::before {
    content: "✦";

    position: absolute;

    top: 21px;
    right: 24px;

    font-size: 12px;

    color: rgba(177, 145, 91, 0);

    transform:
        translateY(6px)
        rotate(-25deg);

    transition:
        color 0.5s ease,
        transform 0.6s ease;
}

.game-card::after {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    top: -145px;
    right: -120px;

    border:
        1px solid
        rgba(185, 156, 110, 0);

    border-radius: 50%;

    transition:
        border-color 0.8s ease,
        transform 1s ease;
}

.game-card:hover {
    transform:
        translateY(-7px);

    border-color:
        rgba(161, 128, 82, 0.3);

    box-shadow:
        0 24px 70px
        rgba(74, 59, 45, 0.06);
}

.game-card:hover::before {
    color:
        rgba(177, 145, 91, 0.8);

    transform:
        translateY(0)
        rotate(0deg);
}

.game-card:hover::after {
    border-color:
        rgba(185, 156, 110, 0.18);

    transform:
        scale(1.15);
}


/* =========================================
   ARCHIVE NUMBER
========================================= */

.game-archive-number {
    font-size: 10px;

    letter-spacing: 4px;

    color:
        rgba(88, 75, 67, 0.42);

    margin-bottom: 26px;
}


/* =========================================
   COVER
========================================= */

.game-cover-frame {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 10;

    overflow: hidden;

    margin-bottom: 34px;

    background:
        rgba(198, 181, 159, 0.09);
}

.game-cover {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    filter:
        saturate(0.82)
        contrast(0.96);

    transition:
        transform 1.2s cubic-bezier(.2,.7,.2,1),
        filter 0.8s ease;
}

.game-card:hover .game-cover {
    transform:
        scale(1.035);

    filter:
        saturate(0.95)
        contrast(1);
}


/* no cover */

.game-cover-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}

.game-cover-placeholder::before,
.game-cover-placeholder::after {
    content: "";

    position: absolute;

    width: 45%;
    height: 65%;

    border:
        1px solid
        rgba(177, 145, 91, 0.2);

    border-radius: 50%;
}

.game-cover-placeholder::before {
    transform: rotate(58deg);
}

.game-cover-placeholder::after {
    transform: rotate(-58deg);
}

.game-cover-placeholder span {
    position: relative;
    z-index: 1;

    color:
        rgba(161, 128, 82, 0.65);

    font-size: 18px;
}


/* =========================================
   TEXT
========================================= */

.game-title {
    margin: 0;

    font-size: 27px;
    font-weight: 400;

    letter-spacing: 2px;

    color:
        rgba(48, 43, 40, 0.94);
}

.game-review {
    margin:
        20px 0 0;

    min-height: 56px;

    font-size: 13px;

    line-height: 2.1;

    letter-spacing: 1.2px;

    color:
        rgba(67, 60, 56, 0.62);

    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* =========================================
   CARD FOOTER
========================================= */

.game-meta {
    margin-top: 30px;

    padding-top: 19px;

    border-top:
        1px solid
        rgba(106, 91, 77, 0.1);

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.game-rating {
    font-size: 11px;

    letter-spacing: 3px;

    color:
        rgba(104, 87, 68, 0.62);
}

.game-view-note {
    appearance: none;

    border: none;
    background: none;

    padding: 0;

    cursor: pointer;

    font-family: inherit;

    font-size: 9px;

    letter-spacing: 3px;

    color:
        rgba(73, 64, 57, 0.48);

    transition:
        color 0.4s ease,
        letter-spacing 0.4s ease;
}

.game-card:hover .game-view-note {
    color:
        rgba(73, 64, 57, 0.85);

    letter-spacing:
        3.8px;
}


/* =========================================
   ADMIN
========================================= */

.archive-admin-button,
.game-edit-button {

    appearance: none;

    border: none;

    background: none;

    color:
        rgba(83, 70, 61, 0.5);

    font-family: inherit;

    font-size: 9px;

    letter-spacing: 3px;

    cursor: pointer;

    transition:
        color 0.35s ease;
}

.archive-admin-button:hover,
.game-edit-button:hover {
    color:
        rgba(83, 70, 61, 0.95);
}

.game-edit-button {
    position: absolute;

    top: 23px;
    right: 56px;

    z-index: 2;
}


/* =========================================
   LOGIN STAR
========================================= */

/*
现有首页 .star 不需要改 HTML
登录功能会自动绑定到它
*/

.hero .star {
    cursor: pointer;

    transition:
        transform 0.6s ease,
        color 0.5s ease,
        text-shadow 0.5s ease;
}

.hero .star:hover {
    transform:
        rotate(45deg)
        scale(1.35);

    color:
        rgba(177, 145, 91, 0.95);

    text-shadow:
        0 0 18px
        rgba(190, 156, 101, 0.2);
}


/* =========================================
   MODAL
========================================= */

.archive-modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 24px;
}

.archive-modal.active {
    display: flex;
}

.archive-modal-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(47, 42, 38, 0.2);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);
}

.archive-modal-card {
    position: relative;

    z-index: 2;

    width: min(540px, 100%);

    max-height: 88vh;

    overflow-y: auto;

    padding:
        52px 50px;

    background:
        rgb(248, 245, 239);

    border:
        1px solid
        rgba(114, 96, 78, 0.17);

    box-shadow:
        0 40px 100px
        rgba(61, 50, 41, 0.12);

    animation:
        archiveModalIn
        0.55s
        cubic-bezier(.2,.7,.2,1)
        both;
}

@keyframes archiveModalIn {

    from {
        opacity: 0;

        transform:
            translateY(18px)
            scale(0.985);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}

.modal-close {
    position: absolute;

    top: 17px;
    right: 22px;

    border: 0;

    background: none;

    cursor: pointer;

    font-family: inherit;

    font-size: 24px;

    font-weight: 200;

    color:
        rgba(64, 55, 49, 0.42);
}

.modal-symbol {
    margin-bottom: 20px;

    font-size: 18px;

    color:
        rgba(175, 143, 89, 0.9);
}

.modal-label {
    margin:
        0 0 18px;

    font-size: 9px;

    letter-spacing: 4px;

    color:
        rgba(79, 67, 59, 0.45);
}

.archive-modal-card h3 {
    margin:
        0 0 12px;

    font-size: 30px;

    font-weight: 400;

    letter-spacing: 1px;
}

.modal-description {
    margin:
        0 0 38px;

    font-size: 12px;

    letter-spacing: 2px;

    color:
        rgba(76, 66, 60, 0.48);
}


/* =========================================
   FORM
========================================= */

.archive-modal-card form {
    display: grid;

    gap: 22px;
}

.archive-modal-card label {
    display: grid;

    gap: 10px;

    font-size: 8px;

    letter-spacing: 3px;

    color:
        rgba(76, 64, 55, 0.52);
}

.archive-modal-card input,
.archive-modal-card textarea {

    width: 100%;

    box-sizing: border-box;

    border: none;

    border-bottom:
        1px solid
        rgba(80, 67, 56, 0.18);

    border-radius: 0;

    outline: none;

    padding:
        12px 2px;

    background:
        transparent;

    color:
        rgba(45, 40, 37, 0.9);

    font-family: inherit;

    font-size: 14px;

    line-height: 1.8;

    transition:
        border-color 0.3s ease;
}

.archive-modal-card textarea {
    resize: vertical;
}

.archive-modal-card input:focus,
.archive-modal-card textarea:focus {
    border-color:
        rgba(151, 119, 77, 0.6);
}

.form-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 24px;
}

.modal-primary-button {
    margin-top: 12px;

    min-height: 48px;

    border:
        1px solid
        rgba(98, 79, 63, 0.2);

    background:
        rgba(255, 255, 255, 0.18);

    color:
        rgba(62, 52, 45, 0.76);

    font-family: inherit;

    font-size: 9px;

    letter-spacing: 4px;

    cursor: pointer;

    transition:
        background 0.35s ease,
        border-color 0.35s ease;
}

.modal-primary-button:hover {
    background:
        rgba(255, 255, 255, 0.6);

    border-color:
        rgba(98, 79, 63, 0.35);
}

.modal-danger-button {
    border: 0;

    background: none;

    cursor: pointer;

    color:
        rgba(145, 80, 74, 0.58);

    font-family: inherit;

    font-size: 9px;

    letter-spacing: 3px;
}

.editor-actions {
    display: flex;

    flex-direction: column;

    gap: 14px;
}

.form-message {
    min-height: 16px;

    margin: 0;

    font-size: 11px;

    line-height: 1.6;

    color:
        rgba(145, 80, 74, 0.75);
}


/* =========================================
   UTIL
========================================= */

.hidden {
    display: none !important;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .archive-heading {
        align-items:
            flex-start;

        flex-direction:
            column;
    }

    .game-list {
        margin-top:
            54px;

        grid-template-columns:
            1fr;

        gap:
            26px;
    }

    .game-card {
        min-height:
            auto;

        padding:
            20px;
    }

    .game-title {
        font-size:
            22px;
    }

    .archive-modal-card {
        padding:
            44px 25px 34px;
    }

    .form-grid {
        grid-template-columns:
            1fr;
    }

}