html {
    scroll-behavior: auto;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1 {
    font-family: "Raleway", sans-serif
}

body,
html {
    margin: 0;
    min-height: 100%;
}

body {
    background: #0b1020;
    color: white;
    overflow: hidden;
}

.page-shell {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100svh;
    height: 100dvh;
    overflow: hidden;
    background-image: url('bg.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.bgimg {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.bgimg>.w3-display-middle {
    top: auto;
    bottom: clamp(24px, 7vh, 72px);
    transform: translateX(-50%);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-image-link {
    display: inline-block;
    width: 200px;
    text-align: center;
    color: white;
    text-decoration: none;
    padding: 14px 10px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.08), 0 10px 25px rgba(0, 0, 0, 0.16);
    transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
}

.nav-image-link:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.1), 0 18px 35px rgba(0, 0, 0, 0.28);
    filter: brightness(1.08);
}

.nav-image-link img {
    width: 100%;
    max-height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
    border-radius: 12px;
}

.nav-image-link span {
    display: block;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.info-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    background: rgba(9, 14, 22, 0.08);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: transform, opacity;
    overflow-y: auto;
}

.info-content.alt {
    background: rgba(17, 24, 35, 0.12);
}

.info-content.visible {
    opacity: 1;
    transform: translateX(0);
}

.bgimg.hidden {
    opacity: 0;
    transform: scale(1.04);
}

.info-content-inner {
    max-width: 760px;
    padding: 36px 42px;
    border-radius: 22px;
    background: rgba(12, 17, 27, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.info-content h2 {
    font-size: 2.2rem;
    margin-bottom: 18px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.info-content p {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.05rem;
}

.rank-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 30px;
}

.rank-card {
    min-width: 180px;
    padding: 18px 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 700;
}

.terms-panel {
    width: min(1000px, 92vw);
    max-width: 100%;
    max-height: calc(100dvh - 160px);
    align-self: center;
    margin: auto;
    padding: 24px 28px 18px;
    border: 3px solid #f1b52d;
    border-radius: 18px;
    background: rgba(10, 14, 20, 0.88);
    box-shadow: 0 0 0 4px rgba(58, 128, 255, 0.28), 0 0 28px rgba(7, 113, 255, 0.24);
}

.terms-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px;
    color: #f4f2d9;
}

.terms-header h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    letter-spacing: 0.08em;
    text-shadow: 0 0 12px rgba(44, 195, 255, 0.8);
}

.terms-header span {
    color: #7de2ff;
    font-size: 1.5rem;
    text-shadow: 0 0 12px rgba(76, 210, 255, 0.85);
}

.terms-intro {
    width: min(760px, 100%);
    margin: 0 auto 18px !important;
    color: #bdefff;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.6 !important;
    text-align: center;
}

.terms-body {
    max-height: min(58vh, 580px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 8px 4px 2px;
    text-align: left;
}

.info-content,
.terms-body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.info-content::-webkit-scrollbar,
.terms-body::-webkit-scrollbar {
    display: none;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.terms-item {
    padding: 14px 16px;
    border: 1px solid rgba(103, 210, 255, 0.3);
    border-left: 3px solid #f1b52d;
    border-radius: 10px;
    background: rgba(16, 28, 40, 0.78);
}

.terms-item h3 {
    margin: 0 0 7px;
    color: #ffda70;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.terms-item p {
    margin: 0;
    color: #e5f4ff;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: normal;
    line-height: 1.55;
}

.rank-panel {
    width: min(1100px, 92vw);
    max-width: 100%;
    margin: auto;
    padding: 24px 28px 18px;
    border: 4px solid #f1b52d;
    border-radius: 18px;
    background: rgba(10, 14, 20, 0.86);
    box-shadow: 0 0 0 4px rgba(58, 128, 255, 0.35), 0 0 28px rgba(7, 113, 255, 0.3);
    position: relative;
}

.rank-panel::before,
.rank-panel::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 3px solid #f1b52d;
    background: rgba(17, 30, 44, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 152, 255, 0.24);
}

.rank-panel::before {
    top: -12px;
    left: 18px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.rank-panel::after {
    top: -12px;
    right: 18px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.rank-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 8px auto 22px;
    padding: 10px 18px;
    border: 4px solid #f1b52d;
    border-radius: 16px;
    background: rgba(20, 34, 48, 0.9);
    box-shadow: inset 0 0 18px rgba(0, 123, 255, 0.22), 0 0 18px rgba(42, 179, 255, 0.15);
}

.rank-header .rank-icon {
    color: #7de2ff;
    font-size: 2.2rem;
    text-shadow: 0 0 14px rgba(76, 210, 255, 0.85);
}

.rank-header h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4.4rem);
    letter-spacing: 0.12em;
    font-weight: 900;
    color: #f4f2d9;
    text-shadow: 0 0 12px rgba(44, 195, 255, 0.9), 0 0 26px rgba(44, 195, 255, 0.55);
}

.rank-subtitle {
    margin: 0 auto 22px;
    padding: 10px 16px;
    border: 2px solid rgba(73, 207, 255, 0.9);
    border-radius: 10px;
    background: rgba(10, 20, 30, 0.7);
    color: #80e9ff;
    font-weight: 700;
    text-align: center;
    box-shadow: inset 0 0 12px rgba(78, 213, 255, 0.16);
}

.section-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px 16px;
    border: 2px solid rgba(72, 200, 255, 0.9);
    border-radius: 10px;
    background: rgba(9, 19, 28, 0.8);
    color: #9fe8ff;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: none;
    box-shadow: inset 0 0 12px rgba(78, 213, 255, 0.1);
}

.section-label::before,
.section-label::after {
    content: "✦";
    color: #7adfff;
    text-shadow: 0 0 10px rgba(122, 223, 255, 0.8);
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 18px;
}

.rank-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-tier {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 110px;
    padding: 14px 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(17, 24, 34, 0.96), rgba(9, 14, 20, 0.92));
    border: 3px solid rgba(66, 201, 255, 0.85);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(14, 59, 89, 0.8);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.rank-tier:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.rank-tier::after {
    content: ">";
    position: absolute;
    right: 22px;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.78);
}

.rank-tier.tier-nova {
    border-color: #4ec6ff;
    background: linear-gradient(180deg, rgba(17, 28, 38, 0.94), rgba(7, 17, 24, 0.96));
    box-shadow: inset 0 0 16px rgba(78, 198, 255, 0.18), 0 0 0 2px rgba(13, 56, 92, 0.8), 0 0 16px rgba(74, 193, 255, 0.12);
}

#packages .package-dip-pass {
    border-color: #f3b640;
    background: linear-gradient(180deg, rgba(30, 24, 13, 0.95), rgba(15, 13, 9, 0.96));
    box-shadow: inset 0 0 16px rgba(243, 182, 64, 0.18), 0 0 0 2px rgba(92, 61, 0, 0.7), 0 0 16px rgba(243, 182, 64, 0.12);
}

.rank-tier.tier-noble {
    border-color: #f3b640;
    background: linear-gradient(180deg, rgba(30, 24, 13, 0.95), rgba(15, 13, 9, 0.96));
    box-shadow: inset 0 0 16px rgba(243, 182, 64, 0.18), 0 0 0 2px rgba(92, 61, 0, 0.7), 0 0 16px rgba(243, 182, 64, 0.12);
}

.rank-tier.tier-overlord {
    border-color: #b46cf7;
    background: linear-gradient(180deg, rgba(28, 16, 34, 0.95), rgba(15, 10, 20, 0.96));
    box-shadow: inset 0 0 16px rgba(180, 108, 247, 0.18), 0 0 0 2px rgba(70, 21, 93, 0.7), 0 0 16px rgba(180, 108, 247, 0.12);
}

.rank-tier.tier-conqueror {
    border-color: #ff7b44;
    background: linear-gradient(180deg, rgba(32, 18, 12, 0.95), rgba(15, 10, 8, 0.96));
    box-shadow: inset 0 0 16px rgba(255, 123, 68, 0.18), 0 0 0 2px rgba(89, 35, 7, 0.7), 0 0 16px rgba(255, 123, 68, 0.12);
}

.tier-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.18);
    transform: rotate(45deg);
    margin-left: 10px;
}

.tier-icon::before {
    content: "◆";
    display: block;
    transform: rotate(-45deg);
}

.tier-nova .tier-icon {
    color: #7adfff;
}

.tier-noble .tier-icon {
    color: #ffcf53;
}

.tier-overlord .tier-icon {
    color: #d9a4ff;
}

.tier-conqueror .tier-icon {
    color: #ff9d56;
}

#packages .package-dip-pass .tier-icon {
    color: #ffcf53;
}

#packages .package-dip-pass .tier-copy h3 {
    font-size: clamp(1.5rem, 1.8vw, 2.2rem);
}

#packages .package-pass-price {
    font-size: clamp(1.35rem, 2vw, 2rem);
    text-align: center;
}

#packages .package-weekly-drop {
    border-color: #5ee68a;
    background: linear-gradient(180deg, rgba(13, 36, 24, 0.95), rgba(8, 20, 14, 0.96));
    box-shadow: inset 0 0 16px rgba(94, 230, 138, 0.18), 0 0 0 2px rgba(18, 101, 49, 0.7), 0 0 16px rgba(94, 230, 138, 0.14);
}

#packages .package-weekly-drop .tier-icon {
    color: #78f59b;
}

#packages .package-weekly-drop .tier-copy h3 {
    font-size: clamp(1.5rem, 1.8vw, 2.2rem);
}

#packages .package-explorer-pack .tier-copy h3 {
    font-size: clamp(1.5rem, 1.8vw, 2.2rem);
}

#packages .package-grinder-pack .tier-copy h3 {
    font-size: clamp(1.5rem, 1.8vw, 2.2rem);
}

.tier-copy {
    flex: 1;
    text-align: left;
    padding-right: 44px;
}

.tier-copy h3 {
    margin: 0 0 4px;
    font-size: clamp(1.8rem, 2.2vw, 2.8rem);
    letter-spacing: 0.06em;
    color: #eefcff;
    text-shadow: 0 0 12px rgba(110, 226, 255, 0.7);
}

.tier-copy p {
    margin: 0;
    color: #dfeaff;
    line-height: 1.35;
    font-size: 0.96rem;
}

.rank-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-box {
    background: rgba(8, 11, 17, 0.8);
    border: 2px solid rgba(76, 198, 255, 0.8);
    border-radius: 10px;
    padding: 14px 16px 10px;
}

.sidebar-box h3 {
    margin: 0 0 12px;
    text-align: center;
    font-size: 1.5rem;
    color: #c8f8ff;
    text-shadow: 0 0 12px rgba(70, 197, 255, 0.6);
}

.benefit-list {
    column-count: 2;
    column-gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-list li {
    break-inside: avoid;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #e5f4ff;
    font-size: 0.91rem;
    line-height: 1.3;
    position: relative;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.01em;
    margin: 0 0 7px;
}

.benefit-list li::before {
    content: "✦";
    flex: 0 0 auto;
    line-height: 1.3;
    color: #7adfff;
    text-shadow: 0 0 10px rgba(122, 223, 255, 0.8);
}

.benefit-list {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.benefit-list.is-updating {
    opacity: 0.3;
    transform: translateY(4px);
}

.price-box {
    background: rgba(7, 15, 21, 0.9);
    border: 3px solid rgba(72, 200, 255, 0.95);
    border-radius: 12px;
    padding: 16px 18px 12px;
    text-align: center;
    box-shadow: inset 0 0 18px rgba(91, 219, 255, 0.08), 0 0 0 3px rgba(14, 38, 72, 0.7);
}

.price-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 12px;
    color: #9fe8ff;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: none;
}

.price-label::before,
.price-label::after {
    content: "✦";
    color: #7adfff;
    text-shadow: 0 0 10px rgba(122, 223, 255, 0.8);
}

.price-box .price {
    display: block;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #baffd3;
    text-shadow: 0 0 16px rgba(118, 255, 171, 0.7);
}

.buy-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    border: 2px solid rgba(86, 255, 158, 0.9);
    border-radius: 10px;
    padding: 14px 18px;
    background: linear-gradient(180deg, #42d86b, #1ca857);
    color: #0a1b12;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 0 16px rgba(66, 216, 107, 0.35), inset 0 0 12px rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.action-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 20px;
    background: #f1c40f;
    color: #111;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.25s ease;
}

.action-link:hover {
    transform: scale(1.04);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding: 12px 22px;
    border-radius: 12px;
    border: 3px solid rgba(74, 205, 255, 0.95);
    background: rgba(18, 30, 44, 0.9);
    box-shadow: inset 0 0 12px rgba(100, 220, 255, 0.18), 0 0 0 3px rgba(31, 127, 255, 0.2);
    color: #dffbff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.83rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 12px rgba(100, 220, 255, 0.22), 0 0 18px rgba(31, 127, 255, 0.35);
    border-color: rgba(113, 222, 255, 1);
}

@media (max-width: 600px) {
    .page-shell {
        background-position: center center;
        background-size: cover;
    }

    .bgimg {
        padding: 20px 12px;
    }

    .main-nav {
        gap: 12px;
    }

    .nav-image-link {
        width: min(150px, 42vw);
        padding: 10px 8px;
    }

    .nav-image-link img {
        max-height: 90px;
        margin-bottom: 8px;
    }

    .nav-image-link span {
        font-size: 14px;
    }

    .info-content {
        align-items: flex-start;
        padding: 52px 10px 18px;
    }

    #terms {
        padding: 34px 10px;
    }

    .rank-panel {
        width: 100%;
        padding: 16px 10px 14px;
        border-width: 3px;
        border-radius: 14px;
    }

    .terms-panel {
        width: 100%;
        max-height: calc(100dvh - 110px);
        padding: 16px 10px 14px;
        border-width: 2px;
        border-radius: 14px;
    }

    .terms-header {
        gap: 8px;
        margin-bottom: 12px;
    }

    .terms-header span {
        font-size: 1.1rem;
    }

    .terms-intro {
        font-size: 0.88rem !important;
        line-height: 1.5 !important;
    }

    .terms-body {
        max-height: calc(100dvh - 240px);
        padding-right: 4px;
    }

    .terms-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .terms-item {
        padding: 11px 12px;
    }

    .terms-item h3 {
        font-size: 0.92rem;
    }

    .terms-item p {
        font-size: 0.82rem;
    }

    .rank-header {
        gap: 8px;
        margin: 4px auto 14px;
        padding: 8px 10px;
        border-width: 3px;
    }

    .rank-header h2 {
        font-size: clamp(1.6rem, 9vw, 2.5rem);
    }

    .rank-header .rank-icon {
        font-size: 1.5rem;
    }

    .rank-subtitle {
        margin-bottom: 14px;
        padding: 8px 10px;
        font-size: 0.88rem;
    }

    .rank-layout {
        grid-template-columns: 1fr;
    }

    .rank-tier {
        min-height: 88px;
        gap: 10px;
        padding: 10px 12px;
    }

    .tier-icon {
        width: 40px;
        height: 40px;
        margin-left: 4px;
    }

    .tier-copy h3 {
        font-size: 1.45rem;
    }

    .tier-copy p {
        font-size: 0.82rem;
    }

    .benefit-list {
        column-count: 1;
    }

    .benefit-list li {
        font-size: 0.86rem;
    }

    .price-box {
        padding: 12px 14px 10px;
    }
}