/* css/hunter/mobile-explore.css */

/* =========================
   Explore minigame flow v3
   - exploration stays as a map
   - memory game opens as a z-axis play panel instead of stretching the page
   - result modal makes rewards obvious after backend settlement
========================= */

.hunter-memory-result-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: grid;
    place-items: center;

    padding: 20px;
}

.hunter-memory-result-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 32%, rgba(251, 191, 36, .24), transparent 32%),
        rgba(13, 8, 5, .72);
    backdrop-filter: blur(8px);
}

.hunter-memory-result-card {
    position: relative;
    z-index: 1;
    width: min(380px, 100%);
    overflow: hidden;

    padding: 20px;
    border-radius: 26px;

    background:
        radial-gradient(circle at 78% 12%, rgba(251, 191, 36, .24), transparent 32%),
        linear-gradient(180deg, rgba(255, 251, 235, .98), rgba(255, 244, 214, .96));
    border: 2px solid rgba(245, 196, 92, .86);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        0 24px 60px rgba(0, 0, 0, .42);

    color: #431407;
    text-align: center;
}

.hunter-memory-result-card::after {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .62);
    pointer-events: none;
}

.hunter-memory-result-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;

    display: grid;
    place-items: center;

    border-radius: 22px;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .9), transparent 34%),
        linear-gradient(180deg, #fef3c7, #f59e0b);
    box-shadow: 0 10px 24px rgba(245, 158, 11, .28);

    font-size: 34px;
}

.hunter-memory-result-kicker {
    color: #d97706;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .18em;
}

.hunter-memory-result-card h3 {
    margin: 5px 0 6px;
    color: #431407;
    font-size: 24px;
    font-weight: 950;
    line-height: 1.12;
}

.hunter-memory-result-card p {
    margin: 0 auto 12px;
    color: #78350f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.55;
}

.hunter-memory-result-reward {
    display: grid;
    gap: 4px;

    margin: 12px 0;
    padding: 12px;

    border-radius: 18px;
    background:
        radial-gradient(circle at 88% 20%, rgba(251, 191, 36, .2), transparent 34%),
        rgba(255, 247, 237, .82);
    border: 1px solid rgba(245, 196, 92, .52);
}

.hunter-memory-result-reward span {
    color: #92400e;
    font-size: 11px;
    font-weight: 950;
}

.hunter-memory-result-reward strong {
    color: #111827;
    font-size: 17px;
    font-weight: 950;
}

.hunter-memory-result-reward em {
    color: #16a34a;
    font-size: 12px;
    font-style: normal;
    font-weight: 950;
}

.hunter-memory-result-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;

    margin: 10px 0 14px;
}

.hunter-memory-result-stats span {
    padding: 7px 6px;
    border-radius: 999px;
    background: rgba(67, 20, 7, .08);
    color: #78350f;
    font-size: 11px;
    font-weight: 900;
}

.hunter-memory-result-actions {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 8px;
}

.hunter-memory-result-btn {
    position: relative;
    z-index: 2;

    border: 0;
    border-radius: 999px;
    padding: 11px 12px;

    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
}

.hunter-memory-result-btn.primary {
    background: linear-gradient(180deg, #facc15, #f59e0b);
    color: #431407;
    box-shadow: 0 9px 18px rgba(245, 158, 11, .28);
}

.hunter-memory-result-btn.secondary {
    background: rgba(67, 20, 7, .08);
    color: #78350f;
}

.hunter-memory-result-modal.is-failed .hunter-memory-result-icon {
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .88), transparent 34%),
        linear-gradient(180deg, #e5e7eb, #94a3b8);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

@media (max-width: 768px) {
    .hunter-page .hunter-explore-room {
        min-height: 100%;
        overflow: hidden !important;
        padding-bottom: 12px;

        background:
            linear-gradient(90deg, rgba(255, 224, 138, .065) 1px, transparent 1px) 0 0 / 28px 28px,
            linear-gradient(180deg, rgba(255, 224, 138, .08), transparent 32%),
            radial-gradient(circle at 22% 20%, rgba(34, 197, 94, .16), transparent 24%),
            radial-gradient(circle at 78% 70%, rgba(251, 191, 36, .18), transparent 30%),
            linear-gradient(180deg, #21120c 0%, #4b2512 46%, #160d09 100%);
    }

    .hunter-page .hunter-explore-room .hunter-tab-scene-title {
        margin-bottom: 8px;
    }

    .hunter-page .hunter-explore-room .hunter-subtab-bar {
        position: relative;
        top: auto;
        z-index: 16;
        margin-bottom: 10px;
        background: rgba(13, 8, 5, .72);
        border-color: rgba(245, 196, 92, .56);
    }

    .hunter-page .hunter-explore-room .hunter-subtab-panel {
        min-height: 0;
    }

    .hunter-page .hunter-explore-room .hunter-subtab-panel[data-hunter-subtab-panel="mine"].active {
        display: grid;
        gap: 10px;
    }

    .hunter-page .hunter-explore-room .hunter-subtab-panel[data-hunter-subtab-panel="memory"].active {
        position: absolute;
        left: 10px;
        right: 10px;
        top: 134px;
        bottom: 10px;
        z-index: 12;

        display: flex;
        flex-direction: column;

        overflow: hidden;
        border-radius: 26px;
        background:
            radial-gradient(circle at 72% 8%, rgba(251, 191, 36, .18), transparent 32%),
            linear-gradient(180deg, rgba(18, 13, 12, .98), rgba(64, 32, 18, .96));
        border: 1px solid rgba(245, 196, 92, .52);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .12),
            0 20px 42px rgba(0, 0, 0, .34);
    }

    .hunter-page .hunter-explore-room .hunter-subtab-panel[data-hunter-subtab-panel="memory"].active::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background:
            linear-gradient(90deg, rgba(255, 224, 138, .04) 1px, transparent 1px) 0 0 / 24px 24px,
            radial-gradient(ellipse at 50% 110%, rgba(0, 0, 0, .36), transparent 52%);
    }

    .hunter-page .hunter-explore-room .hunter-minigame-shell {
        position: relative;
        z-index: 1;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 10px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-game-card {
        min-height: 100%;
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 12px;
        border-radius: 22px;
        background:
            radial-gradient(circle at top right, rgba(251, 191, 36, .14), transparent 36%),
            linear-gradient(180deg, rgba(17, 24, 39, .90), rgba(44, 24, 16, .88));
        border-color: rgba(245, 196, 92, .44);
    }

    .hunter-page .hunter-explore-room .hunter-memory-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 74px;
        align-items: start;
        gap: 8px;
        margin-bottom: 8px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-header h3 {
        font-size: 16px;
        line-height: 1.2;
    }

    .hunter-page .hunter-explore-room .hunter-memory-desc {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .hunter-page .hunter-explore-room .hunter-memory-timer-box {
        width: auto;
        min-width: 0;
        padding: 7px 6px;
        background: rgba(15, 23, 42, .76);
    }

    .hunter-page .hunter-explore-room .hunter-memory-meta-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        margin: 6px 0 8px;
    }

    .hunter-page .hunter-explore-room #hunterMemoryGameMeta {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .hunter-page .hunter-explore-room .hunter-memory-stage-list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 8px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-stage-pill {
        min-height: 54px;
        padding: 7px 8px;
        border-radius: 14px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-stage-pill strong {
        font-size: 11px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-stage-pill span,
    .hunter-page .hunter-explore-room .hunter-memory-stage-pill em {
        font-size: 9px;
        line-height: 1.25;
    }

    .hunter-page .hunter-explore-room .hunter-memory-status {
        margin-bottom: 8px;
        min-height: 18px;
        font-size: 11px;
        color: #fde68a;
    }

    .hunter-page .hunter-explore-room .hunter-memory-board {
        flex: 1 1 auto;
        align-content: center;
        gap: 6px;
        min-height: 0;
    }

    .hunter-page .hunter-explore-room .hunter-memory-card-tile {
        border-radius: 12px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-card-icon {
        font-size: 22px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-card-label {
        display: none;
    }
}

@media (max-width: 420px) {
    .hunter-page .hunter-explore-room .hunter-subtab-panel[data-hunter-subtab-panel="memory"].active {
        left: 8px;
        right: 8px;
        top: 124px;
        bottom: 8px;
        border-radius: 22px;
    }

    .hunter-page .hunter-explore-room .hunter-minigame-shell {
        padding: 8px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-game-card {
        padding: 10px;
        border-radius: 19px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-header {
        grid-template-columns: minmax(0, 1fr) 66px;
        gap: 7px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-header h3 {
        font-size: 14px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-desc {
        -webkit-line-clamp: 1;
    }

    .hunter-page .hunter-explore-room .hunter-memory-timer-value {
        font-size: 13px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-meta-row {
        grid-template-columns: 1fr;
    }

    .hunter-page .hunter-explore-room .hunter-memory-start-btn {
        width: 100%;
    }

    .hunter-page .hunter-explore-room .hunter-memory-stage-list {
        gap: 5px;
    }

    .hunter-page .hunter-explore-room .hunter-memory-stage-pill {
        min-height: 48px;
        padding: 6px;
    }

    .hunter-memory-result-card {
        padding: 18px;
        border-radius: 24px;
    }

    .hunter-memory-result-card h3 {
        font-size: 22px;
    }

    .hunter-memory-result-actions {
        grid-template-columns: 1fr;
    }
}

