* {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

*::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

*::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background-color: #FFFFFF80;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #FFFFFF;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    width: 100vw;
    height: 100vh;
    color: #FFFFFF;
    background-color: #000000;
    overflow: hidden;
}

a {
    color: hsl(180, 50%, 70%);
    text-decoration: none;
    transition: color 0.25s;
}

a:hover {
    color: hsl(180, 50%, 50%);
}

input,
button {
    color: inherit;
    background: none;
    border: none;
    outline: none;
    font: inherit;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
}

button {
    cursor: pointer;
}

i {
    margin-right: 0.5em;
    width: 1em;
    height: 1em;
    text-align: center;
    line-height: 1em;
    font-style: normal;
    font-weight: normal;
}

i::before {
    display: flex;
    justify-content: center;
    align-items: center;
}

ol,
ul {
    list-style-position: inside;
}

img {
    color: transparent;
    font-size: 0;
    text-indent: -9999px;
}

noscript {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #00000080;
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    z-index: 1000;
}

/*----- 背景 -----*/
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.1);
    transition: transform 1s;
    z-index: 1;
}

.background img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loaded .background {
    transform: scale(1);
}

.background::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000040;
    z-index: 1;
}

/*----- 加载动画 -----*/
.loading {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background-color: #00000080;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
    z-index: 100;
    cursor: wait;
}

.loading.show {
    opacity: 1;
    visibility: visible;
}

#loading-animate {
    margin-bottom: 0.5rem;
    width: 4rem;
    height: 4rem;
    border-radius: 100%;
    border: 0.3rem solid #FFFFFFBF;
    border-top-color: #00000020;
    border-right-color: #00000020;
    border-bottom-color: #00000020;
}

.show #loading-animate {
    animation: loading infinite 0.75s linear;
}

@keyframes loading {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(360deg);
    }
}

/*----- 内容 -----*/
.main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    font-size: 1rem;
    filter: blur(10px);
    opacity: 0;
    transition: blur 1s, opacity 1s;
    z-index: 5;
}

.loaded .main {
    filter: none;
    opacity: 1;
}

/*----- Hero -----*/
.hero {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 1rem;
    box-sizing: border-box;
    border-radius: 0.5rem;
}

#avatar {
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    object-fit: cover;
}


#signature {
    display: flex;
    text-align: center;
}

#signature span {
    filter: blur(20px);
    transform: scale(2);
    opacity: 0;
    transition: 1.5s var(--delay);
}

.loaded #signature span {
    filter: blur(0);
    transform: scale(1);
    opacity: 1;
}

.card-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.card-link {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 6rem;
    height: 6rem;
    box-sizing: border-box;
    flex-shrink: 0;
    gap: 0.5rem;
    border-radius: 0.75rem;
    color: #FFFFFF;
    background-color: #00000020;
    backdrop-filter: blur(5px) saturate(150%);
    text-wrap: nowrap;
    transition: background-color 0.25s, transform 0.25s;
}

.card-link:hover {
    background-color: #00000040;
}

.card-link:active {
    transform: scale(0.9);
}

.card-link>i {
    margin-right: 0;
    font-size: 1.5rem;
}

.card-link>span {
    height: 1em;
    line-height: 1em;
    opacity: 0.8;
}

/*----- 卡片 -----*/
.cards {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    background-color: #00000040;
    backdrop-filter: blur(10px);
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
}

.cards.show {
    opacity: 1;
    visibility: visible;
}

.card {
    position: absolute;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 800px;
    max-width: 100%;
    height: 600px;
    max-height: 100%;
    box-sizing: border-box;
    border-radius: 1rem;
    background-color: #00000080;
    transform: scale(1.2);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
    overflow: hidden;
    pointer-events: none;
}

.card.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.card-header {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-wrap: nowrap;
}

.card-btns {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-btns button,
.card-btns a {
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    height: 2rem;
    box-sizing: border-box;
    border-radius: 0.5rem;
    color: #FFFFFF;
    background-color: #FFFFFF20;
    transition: background-color 0.25s;
}

.card-btns button:hover,
.card-btns a:hover {
    background-color: #FFFFFF40;
}

.close-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2rem;
    border-radius: 50% !important;
    background-color: #FFFFFF20;
    font-size: 1.5rem;
    transition: background-color 0.25s, transform 0.25s !important;
}

.close-btn::before,
.close-btn::after {
    content: "";
    position: absolute;
    width: 50%;
    height: 2px;
    border-radius: 1px;
    background-color: #FFFFFF;
    transition: transform 0.25s;
}

.close-btn::before {
    transform: rotate(45deg);
}

.close-btn::after {
    transform: rotate(-45deg);
}

.close-btn:hover::before,
.close-btn:hover::after {
    transform: rotate(0);
}

.close-btn:active {
    transform: scale(0.9);
}

.card-content {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    flex: 1;
    box-sizing: border-box;
    overflow-y: auto;
}

.active .card-content {
    animation: cards-fade-in 0.5s ease-out;
}

@keyframes cards-fade-in {
    from {
        transform: translateY(50%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/*----- 页脚 -----*/
footer {
    position: absolute;
    bottom: 1rem;
    left: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9em;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 0.25rem 0.5rem;
    font-size: 0.9em;
}

.footer-links a {
    color: inherit;
    text-wrap: nowrap;
    opacity: 0.5;
    transition: opacity 0.25s;
}

.footer-links a:hover {
    opacity: 1;
}

/* ----- 模态框 ----- */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    background-color: #00000040;
    backdrop-filter: blur(10px);
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
}

.modal-container.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 500px;
    min-height: 150px;
    max-width: 90%;
    max-height: 60%;
    box-sizing: border-box;
    gap: 1rem;
    border-radius: 1rem;
    background-color: #00000080;
    transform: scale(1.2);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
    overflow: hidden;
    pointer-events: none;
}

.show .modal {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.modal-content,
.modal-note {
    max-width: 100%;
    max-height: 300px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-note {
    font-size: 0.8em;
    opacity: 0.8;
}

.modal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.modal-actions button {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background-color: #FFFFFF20;
    transition: background-color 0.25s;
}

.modal-actions button:hover {
    background-color: #FFFFFF40;
}

.modal-actions button.hidden {
    display: none;
}

/* ----- 竖屏提示 ----- */
.horizontal-notice {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 1rem;
    background-color: #000000;
    transform: scale(1.2);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
    z-index: 100;
    pointer-events: none;
}

@media screen and (max-height: 500px) {
    .horizontal-notice {
        transform: scale(1);
        opacity: 1;
        pointer-events: auto;
    }
}

/* ----- 响应式 ----- */
@media screen and (max-width: 767px) {
    #avatar {
        width: 8rem;
        height: 8rem;
    }

    .card-links {
        width: 80%;
        gap: 0.5rem;
    }

    .card-link {
        padding: 0.5rem;
        justify-content: center;
        width: 3rem;
        height: 3rem;
    }

    .card-link>i {
        font-size: 1rem;
    }

    .card-link>span {
        display: none;
    }

    .card {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .card-btns button,
    .card-btns a {
        width: 2rem;
    }

    .card-btns button i,
    .card-btns a i {
        margin: 0;
    }

    .card-btns button span,
    .card-btns a span {
        display: none;
    }
}