/* =========================================================
   REEZBOND RPG
   CLASSIC FANTASY / MEDIEVAL DESIGN
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(circle at 50% 0%, #4b3923 0%, transparent 32%),
        radial-gradient(circle at 0% 100%, #24170e 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, #2b1b10 0%, transparent 40%),
        linear-gradient(180deg, #120e09, #080604 80%);

    color: #ead9b5;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 14px;

    overflow-x: hidden;
}

/* =========================================================
   OLD PARCHMENT / STONE TEXTURE
   ========================================================= */

body::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    opacity: .14;

    background-image:
        radial-gradient(#d8bd82 1px, transparent 1px),
        radial-gradient(#000 1px, transparent 1px);

    background-size: 7px 7px, 11px 11px;
    background-position: 0 0, 4px 4px;

    mix-blend-mode: overlay;

    z-index: -1;
}

/* =========================================================
   GLOBAL
   ========================================================= */

button {
    border: 2px solid #76552d;

    background:
        linear-gradient(
            180deg,
            #624724,
            #2b1c0e
        );

    color: #f1dfb5;

    border-radius: 4px;

    padding: 10px 15px;

    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;

    cursor: pointer;

    transition:
        .18s ease,
        box-shadow .18s ease,
        transform .18s ease;

    text-shadow:
        1px 1px 2px #000;

    box-shadow:
        inset 0 1px 0 #b89355,
        inset 0 -2px 4px #0009,
        0 3px 7px #000;
}

button:hover {
    transform: translateY(-2px);

    border-color: #d5ad5b;

    color: #fff1c7;

    background:
        linear-gradient(
            180deg,
            #79592d,
            #38230f
        );

    box-shadow:
        inset 0 1px 0 #f0cf82,
        0 0 12px #c9943d66,
        0 4px 10px #000;
}

button:active {
    transform: translateY(1px);

    box-shadow:
        inset 0 2px 5px #000,
        0 1px 3px #000;
}

button:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =========================================================
   MAIN CONTAINER
   ========================================================= */

.wrap {
    width: min(1400px, 100%);
    margin: auto;
    padding: 18px;
}

/* =========================================================
   TOP RPG HUD
   ========================================================= */

.top {
    position: sticky;
    top: 10px;
    z-index: 50;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    padding: 13px 16px;

    background:
        linear-gradient(
            180deg,
            #302315f5,
            #160f09f5
        );

    border: 2px solid #76572e;

    border-radius: 5px;

    box-shadow:
        inset 0 0 0 1px #241609,
        inset 0 0 25px #0008,
        0 8px 25px #000d;

    backdrop-filter: blur(5px);
}

/* Decorative gold corners */

.top::before,
.top::after {
    content: "";

    position: absolute;

    width: 18px;
    height: 18px;

    border-color: #c59b4b;
    border-style: solid;

    pointer-events: none;
}

.top::before {
    top: -2px;
    left: -2px;

    border-width: 3px 0 0 3px;
}

.top::after {
    right: -2px;
    bottom: -2px;

    border-width: 0 3px 3px 0;
}

/* =========================================================
   RPG TITLE
   ========================================================= */

h1 {
    margin: 0;

    font-size: clamp(22px, 3vw, 34px);

    letter-spacing: 2px;

    color: #e1b85b;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    text-shadow:
        1px 1px 0 #000,
        2px 2px 0 #000,
        0 0 12px #b67c2d66;
}

/* =========================================================
   PLAYER STAT HUD
   ========================================================= */

.stats {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;

    justify-content: flex-end;
}

.stat {
    min-width: 75px;

    padding: 8px 11px;

    text-align: center;

    background:
        linear-gradient(
            180deg,
            #3b2b1b,
            #1a1008
        );

    border: 1px solid #73542d;

    border-radius: 4px;

    box-shadow:
        inset 0 0 12px #000b,
        0 2px 6px #000;
}

.stat b {
    color: #e8d39b;
}

.stat:nth-child(1) b {
    color: #e2b85c;
}

.stat:nth-child(2) b {
    color: #d59c3c;
}

.stat:nth-child(3) b {
    color: #c8a76a;
}

.stat:nth-child(4) b {
    color: #86a86b;
}

.stat:nth-child(5) b {
    color: #b94c45;
}

/* =========================================================
   SCREENS
   ========================================================= */

.screen {
    display: none;

    animation: screenIn .35s ease;
}

.screen.on {
    display: block;
}

@keyframes screenIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   FANTASY PANELS
   ========================================================= */

.panel {
    position: relative;

    background:
        linear-gradient(
            135deg,
            #2d2115f7,
            #130d07f7
        );

    border: 2px solid #684b27;

    border-radius: 5px;

    padding: 18px;

    margin-top: 14px;

    box-shadow:
        inset 0 0 0 1px #120b05,
        inset 0 0 30px #000b,
        0 12px 30px #000c;

    overflow: hidden;
}

/* Gold divider */

.panel::before {
    content: "";

    position: absolute;

    top: 0;
    left: 5%;
    right: 5%;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #a97b35,
            #e2bc62,
            #a97b35,
            transparent
        );

    opacity: .9;
}

/* Second decorative line */

.panel::after {
    content: "";

    position: absolute;

    bottom: 0;
    left: 8%;
    right: 8%;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #725027,
            transparent
        );
}

.panel h2 {
    margin-top: 5px;

    color: #d8ad59;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    text-shadow:
        1px 1px 2px #000,
        0 0 8px #a66d2d44;
}

/* =========================================================
   RPG TABS
   ========================================================= */

.tabs {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;

    margin-top: 15px;
}

.tabs button {
    position: relative;

    padding: 11px 15px;

    background:
        linear-gradient(
            180deg,
            #3b2b19,
            #1b1008
        );

    border-color: #654824;

    font-size: 13px;

    border-radius: 4px;
}

.tabs button.active {
    background:
        linear-gradient(
            180deg,
            #77572b,
            #38230f
        );

    border-color: #c69a4b;

    color: #ffe5a4;

    box-shadow:
        inset 0 0 12px #0008,
        0 0 12px #9c6b2d55;
}

/* =========================================================
   TAB CONTENT
   ========================================================= */

.tab {
    display: none;
}

.tab.on {
    display: block;

    animation: fadeTab .25s ease;
}

@keyframes fadeTab {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================================
   RPG CARDS
   ========================================================= */

.grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(210px, 1fr));

    gap: 12px;
}

.card {
    position: relative;

    background:
        linear-gradient(
            145deg,
            #392918,
            #170e07
        );

    border: 2px solid #604521;

    border-radius: 5px;

    padding: 14px;

    box-shadow:
        inset 0 0 18px #000b,
        0 7px 15px #000b;

    transition: .2s ease;
}

.card:hover {
    transform: translateY(-3px);

    border-color: #ad813b;

    box-shadow:
        inset 0 0 20px #000,
        0 10px 25px #000d,
        0 0 12px #a8752d33;
}

.card h3 {
    margin: 5px 0 8px;

    color: #d9ad5b;

    text-shadow:
        1px 1px 2px #000;
}

.card.selected {
    border-color: #b99750;

    box-shadow:
        0 0 18px #b58a3b55,
        inset 0 0 20px #a06d2715;
}

/* =========================================================
   ITEM CARDS
   ========================================================= */

.item {
    min-height: 145px;

    position: relative;
}

.item > div:first-child {
    filter:
        drop-shadow(0 2px 2px #000);
}

.item button {
    position: absolute;

    bottom: 10px;
    right: 10px;
}

/* =========================================================
   TAGS
   ========================================================= */

.tag {
    display: inline-block;

    padding: 4px 8px;

    border-radius: 3px;

    background:
        linear-gradient(
            180deg,
            #4a351d,
            #241507
        );

    border: 1px solid #76552c;

    color: #d8b66c;

    font-size: 11px;

    font-weight: bold;

    letter-spacing: .5px;

    text-shadow: 1px 1px 2px #000;
}

/* =========================================================
   HEALTH BARS
   ========================================================= */

.bar {
    position: relative;

    height: 16px;

    background:
        linear-gradient(
            180deg,
            #090604,
            #24130c
        );

    border: 2px solid #654321;

    border-radius: 2px;

    overflow: hidden;

    margin: 7px 0;

    box-shadow:
        inset 0 2px 5px #000;
}

.bar::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            #ffffff16,
            transparent
        );

    animation: barGlow 3s linear infinite;
}

.bar i {
    display: block;

    height: 100%;

    background:
        linear-gradient(
            180deg,
            #73a84b,
            #315b25
        );

    box-shadow:
        inset 0 1px 2px #c5ed8a88;

    transition: width .35s ease;
}

.enemybar i {
    background:
        linear-gradient(
            180deg,
            #a9443b,
            #5c1714
        );

    box-shadow:
        inset 0 1px 2px #ff9a7b55;
}

@keyframes barGlow {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

/* =========================================================
   COMBAT ARENA
   ========================================================= */

.combat {
    display: grid;

    grid-template-columns:
        minmax(180px, .9fr)
        minmax(300px, 1.7fr)
        minmax(180px, .9fr);

    gap: 18px;

    align-items: start;
}

.combat > div {
    min-width: 0;
}

.center {
    text-align: center;
}

/* =========================================================
   CHARACTER SPRITES
   ========================================================= */

.sprite {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 120px;

    font-size: 82px;

    text-shadow:
        2px 3px 3px #000,
        0 0 10px #d5ad5b33;

    animation: idleFloat 3s ease-in-out infinite;
}

.enemy .sprite {
    animation:
        enemyFloat 2.2s ease-in-out infinite;

    text-shadow:
        2px 3px 3px #000,
        0 0 15px #9c302855;
}

@keyframes idleFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes enemyFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1.04);
    }
}

/* =========================================================
   COMBAT ACTION BUTTONS
   ========================================================= */

.actions {
    display: flex;

    gap: 8px;

    justify-content: center;

    flex-wrap: wrap;

    margin: 13px 0;
}

.actions button {
    min-width: 115px;
    min-height: 43px;
}

.actions button:nth-child(1) {
    border-color: #a94b35;
}

.actions button:nth-child(2) {
    border-color: #a97b35;
}

.actions button:nth-child(3) {
    border-color: #638348;
}

.actions button:nth-child(4) {
    border-color: #80649b;
}

.actions button:nth-child(5) {
    border-color: #6e7e83;
}

.actions button:nth-child(6) {
    border-color: #c39a48;
}

/* =========================================================
   BATTLE LOG
   ========================================================= */

.log {
    height: 155px;

    overflow-y: auto;

    background:
        linear-gradient(
            180deg,
            #0d0905,
            #1b1008
        );

    border: 2px solid #52391d;

    border-radius: 3px;

    padding: 10px;

    font-size: 13px;

    text-align: left;

    box-shadow:
        inset 0 0 20px #000;
}

.log div {
    padding: 4px 2px;

    border-bottom: 1px solid #c29a4a12;
}

.log b {
    color: #d6ad5b;
}

/* Scrollbar */

.log::-webkit-scrollbar {
    width: 7px;
}

.log::-webkit-scrollbar-track {
    background: #0b0704;
}

.log::-webkit-scrollbar-thumb {
    background: #674921;

    border-radius: 2px;

    border: 1px solid #2b1a0c;
}

/* =========================================================
   PARTY
   ========================================================= */

.party {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;
}

.party .card {
    min-height: 190px;
}

.dead {
    opacity: .35;

    filter:
        grayscale(1)
        sepia(.3);
}

.dead::after {
    content: "FALLEN";

    position: absolute;

    top: 10px;
    right: 10px;

    color: #b94a43;

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 1px;
}

/* =========================================================
   COLORS / TEXT
   ========================================================= */

.muted {
    color: #9d8c70;
}

.small {
    font-size: 12px;
}

.big {
    font-size: 24px;

    font-weight: 900;
}

.gold {
    color: #e2b85b;

    text-shadow:
        1px 1px 2px #000,
        0 0 8px #9d6a2b55;
}

.crit {
    color: #e4b84e;

    text-shadow:
        1px 1px 2px #000,
        0 0 10px #b8792755;
}

.boss {
    color: #b94a43;

    text-shadow:
        1px 1px 2px #000,
        0 0 10px #7e211c55;
}

/* =========================================================
   NOTICES
   ========================================================= */

.notice {
    padding: 11px 13px;

    border-radius: 3px;

    background:
        linear-gradient(
            135deg,
            #392918,
            #1c1008
        );

    border: 1px solid #664a25;

    margin: 8px 0;

    box-shadow:
        inset 0 0 12px #0007;
}

.notice.danger {
    border-color: #853c34;

    color: #df8278;
}

.notice.good {
    border-color: #587743;

    color: #a9c887;
}

/* =========================================================
   ACTIVE BLESSING
   ========================================================= */

.activeBlessing {
    margin: 12px 0;

    padding: 11px 15px;

    border: 2px solid #a17b39;

    border-radius: 4px;

    background:
        linear-gradient(
            90deg,
            #332513,
            #191006
        );

    color: #e1c47c;

    text-align: center;

    box-shadow:
        inset 0 0 15px #0008,
        0 0 12px #9c6b2d22;
}

/* =========================================================
   BLESSING OVERLAY
   ========================================================= */

.blessingOverlay {
    position: fixed;

    inset: 0;

    z-index: 99999;

    background:
        radial-gradient(
            circle at center,
            #4c361dcc,
            #050301f2
        );

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    overflow: auto;

    backdrop-filter: blur(5px);
}

.blessingPanel {
    width: min(1150px, 100%);

    max-height: 95vh;

    overflow: auto;

    background:
        linear-gradient(
            145deg,
            #342516,
            #120b06
        );

    border: 3px solid #9a7135;

    border-radius: 5px;

    padding: 25px;

    box-shadow:
        inset 0 0 40px #000,
        0 0 30px #000,
        0 0 70px #8d5d2522;
}

.blessingPanel > h2 {
    text-align: center;

    color: #e1b65b;

    font-size: 27px;

    margin: 5px 0 8px;

    text-shadow:
        1px 2px 2px #000,
        0 0 15px #a66f2c55;
}

.blessingGrid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(190px, 1fr));

    gap: 13px;

    margin-top: 20px;
}

.blessingCard {
    background:
        linear-gradient(
            145deg,
            #3a2a19,
            #170d06
        );

    border: 2px solid #654a26;

    border-radius: 4px;

    padding: 16px;

    text-align: center;

    cursor: pointer;

    transition: .2s ease;

    box-shadow:
        inset 0 0 15px #0008,
        0 5px 12px #000;
}

.blessingCard:hover {
    transform: translateY(-5px) scale(1.01);

    border-color: #c29a4c;

    box-shadow:
        inset 0 0 15px #000,
        0 0 18px #9b6c2d44;
}

.blessingCard .blessingIcon {
    font-size: 46px;

    filter:
        drop-shadow(0 3px 3px #000);
}

.blessingCard h3 {
    margin: 7px 0 9px;

    color: #ddb35f;
}

.blessingTag {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 3px;

    background: #3c2a18;

    border: 1px solid #76572c;

    color: #cdb06d;

    font-size: 10px;

    font-weight: 900;
}

.blessingCard p {
    min-height: 76px;

    color: #b8a687;

    line-height: 1.45;
}

.blessingCard button {
    width: 100%;

    margin-top: 6px;

    border-color: #9c7437;
}

/* =========================================================
   LOGIN
   ========================================================= */

.loginBox {
    max-width: 550px;

    margin: 28px auto 0;

    text-align: center;

    padding: 25px;

    border: 2px solid #684b27;

    border-radius: 5px;

    background:
        linear-gradient(
            145deg,
            #332516,
            #160d06
        );

    box-shadow:
        inset 0 0 25px #0009,
        0 10px 30px #000b;
}

.userLoggedIn {
    font-size: 18px;

    color: #9ebd6e;

    margin-bottom: 8px;
}

.loginSmall {
    color: #9e8c6e;

    font-size: 13px;
}

.twitchButton {
    font-size: 19px;

    padding: 15px 30px;

    background:
        linear-gradient(
            135deg,
            #693ca8,
            #321866
        );

    border-color: #9165c6;

    margin-top: 12px;

    box-shadow:
        0 4px 12px #000;
}

.twitchButton:hover {
    box-shadow:
        0 0 20px #7140a855,
        0 5px 12px #000;
}

/* =========================================================
   START SCREEN
   ========================================================= */

#start .panel {
    min-height: 420px;

    display: flex;

    flex-direction: column;

    justify-content: center;
}

#start h2 {
    font-size: clamp(28px, 5vw, 48px);

    letter-spacing: 2px;

    color: #e0b75c !important;

    text-shadow:
        2px 2px 0 #000,
        0 0 15px #a66d2d55;
}

#start p {
    color: #b6a485;

    font-size: 15px;

    line-height: 1.6;
}

/* =========================================================
   MODALS
   ========================================================= */

.modal {
    position: fixed;

    inset: 0;

    background: #000d;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 15px;

    z-index: 100000;

    backdrop-filter: blur(4px);
}

.modal.on {
    display: flex;
}

.modal .panel {
    max-width: 760px;

    width: 100%;

    margin: 0;

    box-shadow:
        0 0 50px #000,
        inset 0 0 30px #000;
}

/* =========================================================
   RPG FIXED BUTTON
   ========================================================= */

.rpg-fixed-button {
    position: fixed;

    left: 15px;
    bottom: 15px;

    z-index: 99999;
}

.rpg-button {
    display: block;

    width: 240px;

    padding: 15px;

    background:
        linear-gradient(
            135deg,
            #382714,
            #160c05
        );

    border: 2px solid #a07837;

    border-radius: 4px;

    text-decoration: none;

    color: #f0d59a;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    box-shadow:
        inset 0 0 15px #000,
        0 5px 12px #000;

    transition: .3s ease;
}

.rpg-button:hover {
    transform: scale(1.05);

    color: #ffe9ae;

    border-color: #d3aa5c;

    box-shadow:
        inset 0 0 15px #000,
        0 0 18px #9d6b2d55,
        0 7px 15px #000;
}

.rpg-description {
    text-align: center;
}

.rpg-description strong {
    display: block;

    font-size: 21px;

    color: #dcb15b;

    text-shadow:
        1px 1px 2px #000;

    margin-bottom: 8px;
}

.rpg-description p {
    margin: 0;

    font-size: 13px;

    line-height: 1.4;

    color: #c0ad8d;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 950px) {

    .top {
        position: relative;

        flex-direction: column;

        align-items: stretch;
    }

    .stats {
        justify-content: center;
    }

    h1 {
        text-align: center;
    }

    .combat {
        grid-template-columns: 1fr;
    }

    .combat > div {
        width: 100%;
    }

    .combat .center:nth-child(2) {
        order: -1;
    }

    .party {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .sprite {
        min-height: 90px;

        font-size: 62px;
    }
}

@media (max-width: 600px) {

    .wrap {
        padding: 9px;
    }

    .top {
        padding: 11px;

        border-radius: 4px;
    }

    h1 {
        font-size: 20px;

        letter-spacing: 1px;
    }

    .stats {
        display: grid;

        grid-template-columns:
            repeat(3, 1fr);

        width: 100%;
    }

    .stat {
        min-width: 0;

        padding: 7px 4px;

        font-size: 12px;
    }

    .tabs {
        display: grid;

        grid-template-columns:
            repeat(2, 1fr);
    }

    .tabs button {
        width: 100%;
    }

    .panel {
        padding: 13px;

        border-radius: 4px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .party {
        grid-template-columns: 1fr;
    }

    .combat {
        gap: 10px;
    }

    .sprite {
        font-size: 58px;

        min-height: 75px;
    }

    .actions {
        display: grid;

        grid-template-columns:
            repeat(2, 1fr);
    }

    .actions button {
        width: 100%;

        min-width: 0;
    }

    .log {
        height: 130px;
    }

    .blessingPanel {
        padding: 15px;
    }

    .blessingGrid {
        grid-template-columns: 1fr;
    }

    .blessingCard p {
        min-height: auto;
    }

    .rpg-fixed-button {
        left: 8px;

        bottom: 8px;
    }

    .rpg-button {
        width: 200px;

        padding: 11px;
    }

    .rpg-description strong {
        font-size: 17px;
    }

    .rpg-description p {
        font-size: 11px;
    }
}

@media (max-width: 380px) {

    .stats {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .actions {
        grid-template-columns: 1fr;
    }

    .tabs {
        grid-template-columns: 1fr;
    }
}