@charset "utf-8";

:root {
    --fortune-gold-100: #fff7df;
    --fortune-gold-300: #f2d191;
    --fortune-gold-500: #d7a45e;
    --fortune-gold-700: #9f6632;
    --fortune-ink: #2b2119;
    --fortune-blue: #6c7ba8;
}

.right_fixed_btn a[href="fortunewheel.html"] img {
    width: 37px;
    height: 41px;
    object-fit: contain;
}

body.fortune-page {
    min-width: 960px;
    background: #f0f6ff;
}

.fortune-page .head_navbar,
.fortune-page .head_navbar.scrolled {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.fortune-page .header_wrap {
    max-width: 1220px;
    margin: 0 auto;
}

.fortune-page .fortune-nav-actions {
    align-items: center;
}

.fortune-page .fortune-nav-actions .login_btn {
    min-height: 36px;
}

.fortune-page .fortune-main {
    position: relative;
    isolation: isolate;
    min-height: 970px;
    padding: 104px 24px 70px;
    overflow: hidden;
    background: url("../images/fortunewheel/bg-fw.png") center top / cover no-repeat;
}

.fortune-page .fortune-main::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: auto 0 0;
    height: 18%;
    background: linear-gradient(to bottom, rgba(240, 246, 255, 0), rgba(240, 246, 255, 0.96));
    pointer-events: none;
}

.fortune-page .fortune-game {
    width: min(100%, 720px);
    margin: 0 auto;
    text-align: center;
}

.fortune-page .fortune-wheel-stage {
    position: relative;
    width: clamp(500px, 34vw, 613px);
    aspect-ratio: 1;
    margin: 0 auto;
    filter: drop-shadow(0 18px 24px rgba(96, 53, 16, 0.18));
}

.fortune-page .fortune-wheel-stage img {
    position: absolute;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.fortune-page .fortune-wheel-disc,
.fortune-page .fortune-wheel-rim {
    inset: 0;
    width: 100%;
    height: 100%;
}

.fortune-page .fortune-wheel-disc {
    z-index: 1;
    transform: rotate(var(--wheel-rotation, 0deg));
    transition: transform 4.8s cubic-bezier(0.11, 0.68, 0.08, 1);
    will-change: transform;
}

.fortune-page .fortune-wheel-rim {
    z-index: 2;
}

.fortune-page .fortune-wheel-pointer {
    z-index: 3;
    top: 36.55%;
    left: 50%;
    width: 13.88%;
    transform: translateX(-50%);
    filter: drop-shadow(0 3px 3px rgba(68, 26, 0, 0.3));
}

.fortune-page .fortune-controls {
    display: grid;
    grid-template-columns: 150px 185px 150px;
    justify-content: center;
    gap: 10px;
    margin: 30px auto 0;
}

.fortune-page .fortune-token,
.fortune-page .fortune-button {
    min-height: 54px;
    border: 1px solid var(--fortune-gold-700);
    border-radius: 16px;
    box-shadow: 0 5px 12px rgba(97, 58, 23, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
}

.fortune-page .fortune-token {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fortune-ink);
    background: linear-gradient(180deg, #f5ddb6, #d5a36a);
}

.fortune-page .fortune-button {
    padding: 10px 20px;
    color: var(--fortune-ink);
    background: linear-gradient(180deg, #f6dfba, #d4a069);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.fortune-page .fortune-button--primary {
    color: #8f5b2b;
    background: linear-gradient(180deg, #ffffff, #eef2f8);
}

.fortune-page .fortune-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(97, 58, 23, 0.24), inset 0 1px 0 #fff;
    filter: brightness(1.03);
}

.fortune-page .fortune-button:active:not(:disabled) {
    transform: translateY(0);
}

.fortune-page .fortune-button:focus-visible,
.fortune-page .fortune-modal-close:focus-visible {
    outline: 3px solid #2458b8;
    outline-offset: 3px;
}

.fortune-page .fortune-button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.45);
    opacity: 0.64;
}

.fortune-page .fortune-result {
    width: fit-content;
    min-height: 35px;
    margin: 16px auto 0;
    padding: 7px 18px;
    border: 1px solid rgba(159, 102, 50, 0.45);
    border-radius: 999px;
    color: #6d3c1e;
    background: rgba(255, 248, 226, 0.88);
    box-shadow: 0 4px 12px rgba(87, 47, 15, 0.12);
    font-weight: 600;
}

.fortune-page .fortune-result[hidden] {
    display: none;
}

.fortune-page .fortune-modal .modal-dialog {
    max-width: 620px;
}

.fortune-page .fortune-modal .modal-content {
    overflow: hidden;
    border: 1px solid #d9ac67;
    border-radius: 20px;
    background: linear-gradient(145deg, #fffdf7, #f8e8ca);
    box-shadow: 0 24px 60px rgba(75, 43, 15, 0.28);
}

.fortune-page .fortune-modal .modal-header {
    padding: 20px 24px;
    color: #fff;
    border-bottom: 1px solid #d3a25c;
    background: linear-gradient(135deg, #8d5427, #d4a45f 60%, #f0cf94);
}

.fortune-page .fortune-modal .modal-title {
    font-weight: 700;
}

.fortune-page .fortune-modal .modal-body {
    padding: 24px 28px 28px;
    color: #5c4939;
    line-height: 1.7;
}

.fortune-page .fortune-modal ol {
    margin: 0;
    padding-left: 22px;
}

.fortune-page .fortune-modal li + li {
    margin-top: 10px;
}

.fortune-page .fortune-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #6e401f;
    background: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    line-height: 1;
}

@media (max-width: 1280px) {
    .fortune-page .fortune-wheel-stage {
        width: 520px;
    }

    .fortune-page .navbar_ul li {
        padding-inline: 0.22rem;
    }

    .fortune-page .navbar_ul li a {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fortune-page .fortune-wheel-disc {
        transition-duration: 180ms;
    }

    .fortune-page .fortune-button,
    .fortune-page a {
        transition-duration: 0.01ms !important;
    }
}
