:root {
    --bg-color: #F7F0E3;
    --text-color: #000000;
    --card-bg: #ffb84d80;
    --nav-bg: rgba(255, 255, 255, 0.06);
    --nav-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --box-shadow-color: rgba(0, 0, 0, 0.15);
    --link-color: #ff9900;
    --border-light: rgba(255, 255, 255, 0.2);
}
.dark {
    --bg-color: #1a1a2e;
    --text-color: #e0e0e0;
    --card-bg: rgba(255, 184, 77, 0.25);
    --nav-bg: rgba(0, 0, 0, 0.5);
    --nav-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    --box-shadow-color: rgba(0, 0, 0, 0.4);
    --link-color: #ffaa33;
    --border-light: rgba(255, 255, 255, 0.08);
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
::-webkit-scrollbar { width: 0; height: 0; }

body {
    padding-top: 75px;
    margin: 0;
}
@keyframes fadeInPage {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOutPage {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}
.whole-page {
    display: block;
    background-color: var(--bg-color);
    margin: 0;
    animation: fadeInPage 0.35s ease-out both;
}
.whole-page.fade-out {
    animation: fadeOutPage 0.3s ease-in forwards !important;
}
.main-page {
    padding: 1mm;
    font-family: sans-serif;
    font-weight: 600;
    font-size: 5mm;
    color: var(--text-color);
    background-color: var(--card-bg);
    border-radius: 1mm;
    text-align: center;
    min-width: 6cm;
    max-width: 90%;
    margin: 0 auto;
    width: max-content;
}
.icon {
    max-height: 5mm;
    margin: 1mm;
}
.randomText {
    padding: 4px 6px;
    color: var(--text-color);
    background-color: var(--card-bg);
    border-radius: 2mm;
    font-size: 16px;
    font-family: sans-serif;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    text-align: center;
    width: fit-content;
    margin: 10px auto 0 auto;
    transition: 0.8s;
}
.randomText:hover { opacity: 0.8; }
.randomText:active { transform: scale(0.9); }
.top-nav {
    margin: auto;
    position: fixed;
    display: flex;
    overflow: auto;
    top: 10px;
    left: 3%;
    right: 5%;
    width: 80%;
    padding: 8px 32px;
    justify-content: space-between;
    font-weight: 900;
    font-size: 2cap;
    border-radius: 2mm;
    background-color: var(--nav-bg);
    backdrop-filter: blur(2px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--nav-shadow);
    z-index: 114514;
}
.top-nav a {
    margin: 0 1mm;
    color: var(--link-color);
    text-decoration: none;
    padding: 0 1mm;
    border-radius: 2mm;
    text-shadow: 0 1px 0 #0000001a, 0 -1px 0 #ffffff80;
}
.top-nav a:hover { background-color: #4b4b4b10; }
.top-nav a:active { background-color: #4b4b4b40; }
@keyframes RollNews {
    0% { opacity: 0; }
    2% { opacity: 1; }
    24% { opacity: 1; }
    26% { opacity: 0; }
    100% { opacity: 0; }
}
.news-roll {
    width: 1000px;
    height: 300px;
    margin: 0 auto 10px auto;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-radius: 2mm;
}
.news:nth-child(1) { animation-delay: -12s; }
.news:nth-child(2) { animation-delay: -8s; }
.news:nth-child(3) { animation-delay: -4s; }
.news:nth-child(4) { animation-delay: 0s; }
.news {
    position: absolute;
    display: inline-block;
    width: 1000px;
    height: 300px;
    background-color: var(--bg-color);
    animation: RollNews 16s ease-in-out infinite;
    text-align: center;
}
.news img {
    width: 1000px;
    height: 300px;
    object-fit: cover;
}
.morepage-title {
    font-family: sans-serif;
    font-weight: 600;
    font-size: 8mm;
    color: var(--text-color);
    text-align: center;
    margin: 0 auto;
    text-shadow: #00000026 1.95px 1.95px 2.6px;
    animation: ImComingFromTheRight 0.3s ease-out both;
}
.morepage-link {
    margin: 0 auto;
    width: 1170px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
}
.morepage-link a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 1mm;
    width: 150px;
    box-shadow: var(--box-shadow-color) 1.95px 1.95px 2.6px;
    transition: transform 0.2s cubic-bezier(0.3, 0.2, 0.2, 2), box-shadow 0.2s ease;
    animation: ImComingFromTheBottom 0.5s ease-out both;
}
.morepage-link a:nth-child(1) { animation-delay: 0.00s; }
.morepage-link a:nth-child(2) { animation-delay: 0.04s; }
.morepage-link a:nth-child(3) { animation-delay: 0.08s; }
.morepage-link a:nth-child(4) { animation-delay: 0.12s; }
.morepage-link a:nth-child(5) { animation-delay: 0.16s; }
.morepage-link a:nth-child(6) { animation-delay: 0.2s; }
.morepage-link a:nth-child(7) { animation-delay: 0.24s; }
.morepage-link a:nth-child(8) { animation-delay: 0.28s; }
.morepage-link a:nth-child(9) { animation-delay: 0.32s; }
.morepage-link a:nth-child(10) { animation-delay: 0.36s; }
.morepage-link a:nth-child(11) { animation-delay: 0.4s; }
.morepage-link a:nth-child(12) { animation-delay: 0.44s; }
.morepage-link a:nth-child(13) { animation-delay: 0.48s; }
.morepage-link a:nth-child(14) { animation-delay: 0.52s; }
.morepage-link a:nth-child(15) { animation-delay: 0.56s; }
.morepage-link a:nth-child(16) { animation-delay: 0.6s; }
.morepage-link a:nth-child(17) { animation-delay: 0.64s; }
.morepage-link a:nth-child(18) { animation-delay: 0.68s; }
.morepage-link a:nth-child(19) { animation-delay: 0.72s; }
.morepage-link a:nth-child(20) { animation-delay: 0.76s; }
.morepage-link a:nth-child(21) { animation-delay: 0.8s; }
.morepage-link a:nth-child(22) { animation-delay: 0.84s; }
.morepage-link a:nth-child(23) { animation-delay: 0.88; }
.morepage-link a:nth-child(24) { animation-delay: 0.92s; }
.morepage-link img {
    width: 150px;
    height: 210px;
    object-fit: cover;
    border-radius: 1mm;
}
.morepage-link p {
    text-align: center;
    font-weight: 900;
    font-size: 8px;
    width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.morepage-link a:hover {
    transform: translateY(-1px);
    box-shadow: 4px 4px 8px var(--box-shadow-color);
}
.morepage-link a:active {
    box-shadow: inset 0 2px 4px #0000001a;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0px); }
}
.videoplayer {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    width: 1000px;
    text-align: center;
    border-radius: 1mm;
}
.videoplayer p {
    font-size: 8mm;
    font-weight: 800;
    margin: 0 auto 10px auto;
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
    color: var(--link-color);
    text-shadow: 0 8px 20px #00000026;
    animation: float 5s ease-in-out infinite;
}
.videoplayer-main {
    margin: 0 auto;
    width: 1000px;
    display: flex;
    flex-direction: row;
    border-radius: 1mm;
}
.videoplayer-video {
    display: flex;
    width: 750px;
    border-radius: 1mm;
    overflow: hidden;
    animation: ImComingFromTheLeft 0.5s ease-out both;
}
.videoplayer-choose {
    padding-top: 15px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-start;
    align-content: flex-start;
    width: 250px;
    border-radius: 1mm;
    background-color: #80808058;
    gap: 10px;
    animation: ImComingFromTheTop 0.5s ease-out both;
    animation-delay: 0.2s;
}
.videoplayer-choose a {
    margin-left: 20px;
    text-decoration: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    text-align: center;
    width: 50px;
    height: 25px;
    line-height: 25px;
    background-color: #8080801a;
    font-weight: 500;
    border-radius: 1mm;
    box-shadow: var(--box-shadow-color) 1.95px 1.95px 2.6px;
    transition: transform 0.4s cubic-bezier(0, 0, 0, 2), box-shadow 0.2s ease;
}
.videoplayer-choose a:hover {
    background-color: #80808012;
    transform: translateY(-1px);
    box-shadow: 4px 4px 8px #00000033;
}
.videoplayer-choose a:active {
    background-color: #80808034;
    box-shadow: inset 0 2px 4px #00000033;
}
.gacha-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 10px;
    background: var(--card-bg);
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--box-shadow-color) 0 4px 20px;
    transition: background 0.3s;
}
.gacha-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--link-color);
}
.gacha-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
.gacha-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--link-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.gacha-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.gacha-btn:active { transform: scale(0.96); }
.gacha-result {
    margin: 25px 0;
    min-height: 120px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 12px;
    transition: background 0.3s;
}
.gacha-card {
    width: 100px;
    height: 140px;
    perspective: 800px;
    cursor: default;
}
.gacha-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.6s ease;
}
.gacha-card.flipped .gacha-card-inner {
    transform: rotateY(180deg);
}
.gacha-card-front, .gacha-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
}
.gacha-card-front {
    background: #2c3e50;
    color: white;
    transform: rotateY(180deg);
}
.gacha-card-back {
    background: #34495e;
    color: white;
    transform: rotateY(0deg);
    font-size: 40px;
}
.gacha-card[data-rarity="夯"] .gacha-card-front {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #2c3e50;
}
.gacha-card[data-rarity="QwQ"] .gacha-card-front {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
    border-color: #9B59B6;
}
.gacha-card[data-rarity="67"] .gacha-card-front {
    background: linear-gradient(135deg, #3498DB, #2980B9);
    border-color: #3498DB;
}
.gacha-card[data-rarity="lol"] .gacha-card-front {
    background: linear-gradient(135deg, #9fe95a, #64a428);
    border-color: #9B59B6;
}
.gacha-card-front .card-name {
    font-size: 14px;
    margin-top: 5px;
}
.gacha-card-front .card-rarity {
    font-size: 12px;
    opacity: 0.9;
}
.gacha-card-front img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
    margin-bottom: 6px;
    background: #2c3e50;
}
.dark .gacha-card-front img {
    border-color: rgba(255,255,255,0.5);
}
@keyframes rareFlip {
    0% { transform: rotateY(0deg) scale(1); }
    40% { transform: rotateY(90deg) scale(1.15); box-shadow: 0 0 60px gold; }
    100% { transform: rotateY(180deg) scale(1.05); box-shadow: 0 0 40px gold; }
}
.gacha-card.rare.flipped .gacha-card-inner {
    animation: rareFlip 0.8s ease forwards;
}
@keyframes highlightPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.gacha-card.card-highlight .gacha-card-inner {
    animation: highlightPulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.4);
    border: 3px solid #FFD700;
}
.gacha-card.rare.card-highlight .gacha-card-inner {
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.9), 0 0 100px rgba(255, 215, 0, 0.6);
}
.dark .gacha-card.card-highlight .gacha-card-inner {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), 0 0 80px rgba(255, 215, 0, 0.6);
}
.whole-page,
.main-page,
.top-nav,
.top-nav a,
.morepage-link a,
.videoplayer p,
.videoplayer-choose a,
.morepage-link a:hover,
.videoplayer-choose a:hover {
    transition: background-color 0.8s ease, color 1.6s ease, box-shadow 0.8s ease, border-color 0.8s ease;
}
@keyframes ImComingFromTheBottom {
    0% { opacity: 0; transform: translateY(11.4514mm); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes ImComingFromTheTop {
    0% { opacity: 0; transform: translateY(-67px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes ImComingFromTheLeft {
    0% { opacity: 0; transform: translateX(-11.4514mm); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes ImComingFromTheRight {
    0% { opacity: 0; transform: translateX(10mm); }
    100% { opacity: 1; transform: translateX(0); }
}