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

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.front-page {
    min-height: 100vh;
    overflow-y: auto;
    background: #000;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

.snow-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.snow-container:not(.custom-effect) .snowflake {
    position: absolute;
    top: -10px;
    color: #fff;
    font-size: 1em;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
    animation: fall linear infinite;
    opacity: 0.8;
}

.snow-container.custom-effect {
    overflow: hidden;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0.3;
    }
}

.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
}

.background-content {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden;
    z-index: 0;
    transform: none !important;
    will-change: auto;
    pointer-events: none;
    contain: strict;
}

.background-img {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    transform: none !important;
    will-change: auto;
}

.background-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.18);
    z-index: 1;
}

.front-content {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: block;
    padding: 0;
}

.content-wrapper {
    text-align: center;
    width: min(1000px, 100%);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 130px;
    margin: 0 auto;
}

.title-stack {
    width: 100%;
    min-height: clamp(520px, 58vh, 640px);
    min-height: clamp(520px, 58svh, 640px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-top: clamp(150px, 16vh, 200px);
}

.button-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.animate-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

.logo-box {
    margin-bottom: 45px;
    animation-delay: 0.2s;
}

.logo-box[hidden],
[hidden] {
    display: none !important;
}

.logo-box img {
    height: 80px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.main-title {
    color: #fff;
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-shadow: 0 4px 40px rgba(0,0,0,1);
    line-height: 1.3;
    animation-delay: 0.5s;
}

.sub-title {
    color: rgba(255, 255, 255, 1);
    font-size: 19px;
    margin-bottom: 40px;
    font-weight: 500;
    letter-spacing: 1px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8);
    animation-delay: 0.8s;
}

.lets-go-text {
    color: rgba(255, 255, 255, 1);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 70px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.9);
    letter-spacing: 4px;
    text-transform: uppercase;
    animation-delay: 1.1s;
}

.button-section-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 2px;
    margin: -46px 0 22px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.75);
    animation-delay: 1.25s;
}

.btn-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    animation-delay: 1.4s;
    margin-top: -18px;
    padding: 18px 4px 30px;
    border-bottom: 0;
    overflow: visible;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.36) transparent;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    width: 100%;
}

.btn-row.is-scrollable {
    overflow: visible;
}

.btn-row.has-divider {
    flex-wrap: nowrap;
}

.front-divider {
    flex: 0 0 auto;
    width: 156px;
    max-width: 68%;
    height: 1px;
    margin: 0 auto;
    background: rgba(255,255,255,0.5);
}

.btn-row::-webkit-scrollbar {
    width: 6px;
}

.btn-row::-webkit-scrollbar-track {
    background: transparent;
}

.btn-row::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.32);
    border-radius: 999px;
}

.glass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    padding: 16px 32px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 315px;
    min-height: 58px;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex: 0 0 auto;
}

.btn-label {
    position: relative;
    z-index: 2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.glass-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: 0.6s;
    z-index: 1;
}

.glass-btn:hover::before {
    left: 100%;
}

.corner-badge {
    position: absolute;
    top: 10px;
    right: -30px;
    transform: rotate(35deg);
    min-width: 120px;
    padding: 4px 34px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    z-index: 3;
    text-transform: uppercase;
    background: var(--badge-color, #434343);
    color: #fff;
}

.corner-badge.hot {
    --badge-color: #ff0844;
}

.corner-badge.outdated {
    --badge-color: #434343;
    color: #ccc;
    font-size: 10px;
}

.btn-system {
    background: rgba(109, 131, 242, 0.32);
    border: 2px solid rgba(196, 181, 253, 0.62);
    animation: pulse-glow 3.2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow:
            0 8px 22px rgba(109, 131, 242, 0.34),
            0 0 32px rgba(139, 92, 246, 0.24),
            inset 0 1px 0 rgba(255,255,255,0.28);
    }
    50% {
        box-shadow:
            0 10px 28px rgba(109, 131, 242, 0.44),
            0 0 46px rgba(139, 92, 246, 0.32),
            inset 0 1px 0 rgba(255,255,255,0.36);
    }
}

.btn-system:hover {
    transform: translateY(-6px) scale(1.06);
    background: rgba(109, 131, 242, 0.55);
    border-color: rgba(221, 214, 254, 1);
    box-shadow:
        0 16px 38px rgba(109, 131, 242, 0.44),
        0 0 58px rgba(139, 92, 246, 0.34),
        inset 0 1px 0 rgba(255,255,255,0.5);
}

.btn-mzf {
    background: rgba(108, 117, 125, 0.15);
    border: 1px solid rgba(255,255,255,0.15);
    opacity: 0.8;
}

.btn-mzf:hover {
    transform: translateY(-3px) scale(1.02);
    background: rgba(108, 117, 125, 0.25);
    box-shadow:
        0 8px 20px rgba(108, 117, 125, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.image-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.image-modal-backdrop.active {
    display: flex;
}

.image-modal-card {
    position: relative;
    width: min(560px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
}

.image-modal-card img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 64px);
    object-fit: contain;
    border-radius: 14px;
    background: rgba(0,0,0,0.25);
    box-shadow: 0 20px 70px rgba(0,0,0,0.45);
}

.image-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 50%;
    background: rgba(17,24,39,0.92);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

.footer-link {
    position: fixed;
    bottom: 35px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 14px;
    z-index: 20;
    pointer-events: none;
}

.footer-link a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    transition: color 0.3s;
    pointer-events: auto;
}

.footer-link a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .front-content {
        padding-top: clamp(46px, 8vh, 68px);
        padding-bottom: 92px;
    }
    .content-wrapper {
        min-height: 0;
        display: block;
        margin-top: 0;
        padding: 15px;
    }
    .title-stack {
        min-height: 0;
        display: block;
        padding-top: 0;
    }
    .button-stack {
        display: block;
    }
    .logo-box {
        margin-bottom: 34px;
    }
    .logo-box img {
        height: 60px;
    }
    .main-title {
        font-size: 32px;
        letter-spacing: 2px;
        margin-bottom: 15px;
    }
    .sub-title {
        font-size: 16px;
        margin-bottom: 25px;
    }
    .lets-go-text {
        font-size: 18px;
        margin-bottom: 40px;
    }
    .button-section-title {
        margin: -22px 0 16px;
        font-size: 13px;
    }
    .btn-row {
        gap: 20px;
        border-bottom: none;
        padding: 16px 0 0;
        margin-top: -16px;
        width: 100%;
    }
    .front-divider {
        width: 150px;
        max-width: calc(100vw - 96px);
        height: 1px;
        margin: 0 auto;
    }
    .glass-btn {
        padding: 15px 26px;
        font-size: 15px;
        min-width: 228px;
        min-height: 54px;
        border-radius: 12px;
    }
    .corner-badge {
        padding: 3px 28px;
        font-size: 10px;
        right: -26px;
        min-width: 104px;
    }
    .corner-badge.outdated {
        font-size: 9px;
    }
    .footer-link {
        bottom: 20px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 28px;
    }
    .glass-btn {
        min-width: min(228px, calc(100vw - 44px));
        padding: 14px 20px;
    }
}
