/* Hadiah edisi - hanya dimuat di halaman game. */

.reward-card {
    width: min(850px, 100%);
    max-height: min(92dvh, 800px);
    display: grid;
    grid-template-columns: minmax(270px, 0.9fr) minmax(380px, 1.1fr);
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(132, 219, 91, 0.22);
    border-radius: 28px;
    background:
        radial-gradient(circle at 5% 0%, rgba(100, 201, 75, 0.18), transparent 34%),
        linear-gradient(145deg, #111912, #0c100d 72%);
    color: #f7faf7;
    color-scheme: dark;
    box-shadow:
        0 32px 90px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.reward-card .modal-close {
    z-index: 5;
    top: 13px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(8, 13, 9, 0.72);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.reward-hero {
    position: relative;
    align-self: center;
    width: calc(100% - 40px);
    min-height: 0;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background:
        radial-gradient(circle at 24% 14%, rgba(255, 255, 255, 0.28), transparent 28%),
        radial-gradient(circle at 82% 82%, rgba(223, 242, 89, 0.2), transparent 32%),
        linear-gradient(145deg, #1c6b3c, #3a9a56 55%, #77b95c);
    box-shadow:
        0 22px 45px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.reward-hero::after {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 58% 0 0;
    background: linear-gradient(to top, rgba(5, 17, 9, 0.62), transparent);
    pointer-events: none;
}

.reward-hero img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    display: block;
    object-fit: contain;
    object-position: center;
    background: #f3f5ef;
}

.reward-hero img[hidden] {
    display: none;
}

.reward-hero-placeholder {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: rotate(-4deg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.reward-hero-placeholder svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.reward-hero-placeholder[hidden] {
    display: none;
}

.reward-edition-chip {
    position: absolute;
    z-index: 2;
    left: 14px;
    bottom: 14px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(7, 24, 12, 0.74);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.reward-card-body {
    min-width: 0;
    max-height: min(92dvh, 800px);
    padding: 34px 30px 30px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.reward-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.reward-heading-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.reward-card h2 {
    margin: 0 0 8px;
    color: #88dc64;
    font-size: clamp(27px, 4vw, 35px);
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.reward-description {
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 13px;
    line-height: 1.58 !important;
}

.reward-rank {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid rgba(136, 220, 100, 0.22);
    border-radius: 999px;
    background: rgba(93, 174, 69, 0.13);
    color: #a9ec8d;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.reward-rank[hidden] {
    display: none;
}

.reward-eligibility-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 750;
}

.reward-eligibility-note svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: #87d968;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.reward-claim-form {
    position: relative;
    display: grid;
    gap: 13px;
    margin-top: 18px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(139, 222, 103, 0.2);
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0%, rgba(119, 198, 87, 0.12), transparent 38%),
        linear-gradient(145deg, rgba(82, 155, 61, 0.13), rgba(255, 255, 255, 0.025));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 18px 38px rgba(0, 0, 0, 0.16);
}

.reward-claim-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    width: 68px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, #63bd4a, #b1ea74);
    box-shadow: 0 0 16px rgba(137, 222, 100, 0.38);
}

.reward-claim-intro {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reward-claim-seal {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(149, 229, 111, 0.28);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(106, 196, 78, 0.26), rgba(63, 132, 49, 0.12));
    color: #a8e98b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.reward-claim-seal svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.reward-claim-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.reward-claim-copy strong {
    color: #f7faf7;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.reward-claim-copy small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.35;
}

.reward-field {
    display: grid;
    gap: 6px;
}

.reward-field[hidden] {
    display: none;
}

.reward-field > span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.015em;
}

.reward-field input,
.reward-field select,
.reward-field textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    outline: none;
    background: rgba(4, 10, 5, 0.55);
    color: #fff;
    font: inherit;
    font-size: 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.reward-field input,
.reward-field select {
    height: 45px;
    padding: 0 12px;
}

.reward-field textarea {
    min-height: 94px;
    padding: 11px 12px;
    line-height: 1.45;
    resize: vertical;
}

.reward-field input::placeholder,
.reward-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

.reward-field input:focus,
.reward-field select:focus,
.reward-field textarea:focus {
    border-color: #78cb5b;
    background: rgba(5, 13, 6, 0.76);
    box-shadow: 0 0 0 3px rgba(120, 203, 91, 0.14);
}

.reward-field input:-webkit-autofill,
.reward-field input:-webkit-autofill:hover,
.reward-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    box-shadow: 0 0 0 1000px #131c14 inset;
    transition: background-color 9999s ease-out;
}

.reward-field select option {
    background: #121913;
    color: #fff;
}

.reward-field select option:disabled {
    color: #849087;
}

.reward-form-message {
    min-height: 18px;
    margin: 0 !important;
    color: #ffaaa2 !important;
    font-size: 11px;
    font-weight: 750;
}

.reward-form-message:empty {
    display: none;
}

.reward-form-message.success {
    color: #a4e788 !important;
}

.reward-form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.reward-submit,
.reward-later,
.result-reward-button {
    border-radius: 12px;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
}

.reward-submit {
    min-height: 47px;
    padding: 0 18px;
    border: 1px solid rgba(208, 255, 185, 0.16);
    background: linear-gradient(135deg, #3d963f, #65bd4c);
    color: #fff;
    box-shadow:
        0 10px 24px rgba(66, 158, 65, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.reward-submit:hover {
    background: linear-gradient(135deg, #348638, #59ad44);
}

.reward-submit:disabled {
    cursor: wait;
    opacity: 0.62;
}

.reward-later {
    min-height: 47px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.7);
}

.reward-later:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.reward-privacy {
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.42) !important;
    font-size: 9px;
    line-height: 1.45 !important;
    text-align: center;
}

.result-reward-button {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 2px 0 14px;
    padding: 10px 16px;
    border: 0;
    background: linear-gradient(135deg, #2f7f45, #55a64d);
    color: #fff;
    box-shadow: 0 11px 24px rgba(47, 127, 69, 0.22);
}

.result-reward-button[hidden] {
    display: none;
}

.result-reward-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.result-reward-button span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.result-reward-button strong {
    font-size: 13px;
}

.result-reward-button small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 700;
}

@media (max-width: 700px) {
    #rewardModal.modal {
        align-items: flex-end;
        padding: 0;
    }

    #rewardModal .modal-backdrop {
        background: rgba(0, 0, 0, 0.66);
    }

    .reward-card {
        width: 100%;
        max-height: 94dvh;
        display: block;
        overflow-x: hidden;
        overflow-y: auto;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 26px 26px 0 0;
    }

    .reward-hero {
        width: min(62vw, 250px);
        margin: 23px auto 3px;
        border-radius: 21px;
    }

    .reward-card-body {
        max-height: none;
        padding: 19px 17px calc(19px + env(safe-area-inset-bottom));
        overflow: visible;
    }

    .reward-card h2 {
        font-size: 27px;
    }

    .reward-claim-form {
        margin-top: 15px;
        padding: 16px;
        gap: 12px;
    }

    .reward-field textarea {
        min-height: 82px;
    }
}

@media (max-width: 390px) {
    .reward-heading {
        flex-wrap: wrap;
    }

    .reward-rank {
        order: -1;
    }

    .reward-form-actions {
        grid-template-columns: 1fr;
    }

    .reward-later {
        min-height: 41px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reward-field input,
    .reward-field select,
    .reward-field textarea {
        transition: none;
    }
}
