/* The dungeon page: no header, no footer, just a bare dark page with a fixed menu */
body {
    margin: 0;
    background-color: #181c24;
    color: #e8edf2;
    font-family: Segoe UI, Frutiger, Frutiger Linotype, Dejavu Sans, Helvetica Neue, Arial, sans-serif;
}

.dungeon-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    box-sizing: border-box;
    background-color: #0f1218;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.dungeon-back {
    color: #e8edf2;
    font-weight: 700;
    text-decoration: none;
}

.dungeon-back:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* The engine of the fights (speech-bubble.js) puts the timer and the loot in this section */
.dungeon {
    position: relative;
    min-height: 100vh;
    padding: 90px 16px 160px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-x: clip;
}

.dungeon h1 {
    margin: 20px 0 6px;
    font-size: 2.4rem;
    font-weight: 800;
    text-align: center;
}

.dungeon-subtitle {
    margin: 0 0 70px;
    font-style: italic;
    text-align: center;
    opacity: 0.7;
}

/* The row gap leaves room for the life bar and the effects above each floor */
.dungeon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 90px 20px;
    max-width: 820px;
    margin: 0 auto;
}

.dungeon-floor {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
}

/* Floors that appear once the boss of the previous ones is beaten (data-unlock-after) */
.dungeon-floor.is-floor-locked {
    display: none;
}

.dungeon-floor img {
    max-width: 100%;
    max-height: 100px;
}

/* Keeps the width of the page when the scroll is locked during a fight */
html {
    scrollbar-gutter: stable;
}

html.fight-scroll-lock body {
    touch-action: none;
}

/* The zoom on the image of a floor during its fight (fightZoom), and the fury mark following it */
.dungeon-floor img {
    transition: scale 0.4s ease-in-out;
}

.dungeon-floor .anger-mark {
    transition: top 0.4s ease-in-out, right 0.4s ease-in-out;
}

/* During a fight: the timer at the top of the screen, under the navigation bar (48px), and the give up button
   on the right, at the height of the timer's middle */
.fight-timer.is-top {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
}

.fight-giveup.is-top-right {
    position: fixed;
    top: 92px;
    right: 16px;
    left: auto;
    width: auto;
    padding: 6px 12px;
    font-size: 0.8rem;
    transform: translateY(-50%);
}

/* The fight hint and the timer were made for a light page */
.dungeon .fight-hint {
    color: #e8edf2;
}

.dungeon .fight-timer-track {
    stroke: rgba(255, 255, 255, 0.2);
}

.dungeon .fight-timer-seconds {
    color: #ffffff;
}

.dungeon .fight-timer.is-urgent .fight-timer-seconds {
    color: #ff5a5f;
}
