
/* =========================================================
   STICKMAN: THE TYPING FIGHTER — DEDICATED AD SLOT LAYOUT
   Empty containers only. No HilltopAds code is included yet.
   ========================================================= */

.stf-ad-slot {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: auto;
}

/* HOME: lower-center blank area under the buttons. */
.home-screen > .stf-ad-slot--home {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 68vh;
    transform: translateX(-50%);
    width: min(300px, 84vw);
    height: 250px;
}

/* DIFFICULTY: right-side two-slot rail. */
.stf-difficulty-ad-rail {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.stf-ad-slot--difficulty {
    width: min(300px, 100%);
    height: 250px;
    flex: 0 0 250px;
}

/* PLAY: compact lower-left reservation, kept outside gameplay/typing controls. */
.game-screen > .stf-ad-slot--play {
    position: absolute;
    z-index: 8;
    left: max(24px, 8vw);
    bottom: 24px;
    width: 180px;
    height: 90px;
}

/* RESULT: two independent zones, only one visible according to result type. */
.result-screen .stf-ad-slot--result {
    position: absolute;
    z-index: 6;
    left: 50%;
    top: auto;
    bottom: 17%;
    transform: translateX(-50%);
    width: min(300px, 80vw);
    height: 250px;
    display: none;
    pointer-events: auto;
}

.result-screen[data-result="win"] .stf-ad-slot--result-win,
.result-screen[data-result="loss"] .stf-ad-slot--result-loss {
    display: flex;
}

/* HISTORY: reserve 40% right side while keeping cards in a 60% main column. */
.history-layout {
    grid-template-columns: minmax(0, 60fr) minmax(300px, 40fr);
    gap: 0;
}

.history-main-column {
    padding-right: 24px;
}

.stf-history-ad-rail {
    min-width: 0;
    min-height: 100%;
    padding: 34px 3vw 28px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    box-sizing: border-box;
}

.stf-ad-slot--history {
    width: min(300px, 100%);
    height: 250px;
    flex: 0 0 250px;
}

/* Empty slots stay visually transparent until actual ad code is inserted. */
.stf-ad-slot:empty {
    background: transparent;
    border: 0;
}

/* Responsive safety: do not squeeze gameplay or history on smaller screens. */
@media (max-width: 1000px) {
    .history-layout {
        grid-template-columns: 1fr;
    }

    .history-main-column {
        padding-right: 5vw;
    }

    .stf-history-ad-rail {
        min-height: auto;
        padding: 8px 5vw 24px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 800px) {
    .stf-difficulty-ad-rail {
        margin-top: 24px;
        gap: 18px;
    }

    .stf-ad-slot--difficulty {
        width: min(300px, 86vw);
        height: 250px;
    }

    .home-screen > .stf-ad-slot--home {
        top: 72vh;
        width: min(300px, 86vw);
        height: 250px;
    }

    .game-screen > .stf-ad-slot--play {
        left: 50%;
        transform: translateX(-50%);
        bottom: 78px;
        width: 180px;
        height: 90px;
    }

    .result-screen .stf-ad-slot--result {
        bottom: 13%;
        width: min(300px, 82vw);
        height: 200px;
    }
}

@media (max-width: 600px) {
    .home-screen > .stf-ad-slot--home {
        top: 74vh;
        height: 180px;
    }

    .result-screen .stf-ad-slot--result {
        bottom: 15%;
        height: 160px;
    }
}


@media (min-width: 801px) and (max-height: 820px) {
    .result-screen .stf-ad-slot--result {
        bottom: 20%;
        height: 180px;
    }
    .home-screen > .stf-ad-slot--home {
        top: 72vh;
    }
}


/* =========================================================
   AD SLOT PREVIEW MODE
   Visible placeholders are temporary and will be replaced
   by real HilltopAds code later.
   ========================================================= */
.stf-ad-slot {
  position: relative;
  border: 1px dashed rgba(255,255,255,.28);
  background:
    linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border-radius: 6px;
  color: rgba(255,255,255,.42);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.stf-ad-slot::before {
  content: "AD SLOT";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.stf-ad-slot::after {
  content: "HilltopAds placement";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  text-align: center;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .8px;
  color: rgba(255,255,255,.22);
  pointer-events: none;
}

/* Live HilltopAds slots: remove temporary preview labels once code is installed. */
.stf-ad-slot--live::before,
.stf-ad-slot--live::after {
    content: none;
}
.stf-ad-slot--live {
    border: 0;
    background: transparent;
}
