/* -----------------------------------------
   FONTS — must be at the top
----------------------------------------- */

@font-face {
    font-family: 'HKGrotesk';
    src: url('fonts/HKGrotesk-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Hackney';
    src: url('fonts/Hackney.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* -----------------------------------------
   THEME
----------------------------------------- */

body.iframe-body {
    background: #151415;
    color: #F0E5CA;
    font-family: 'HKGrotesk', sans-serif;
    padding: 20px 0;
    margin: 0;

    /* prevents invisible overlays from blocking clicks */
    position: static;
    z-index: auto;
}

/* Headings */
body.iframe-body h1,
body.iframe-body h2,
body.iframe-body h3 {
    font-family: 'Hackney', sans-serif;
    color: #FFC792;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Inline h3 style */
.inline-h3 {
    font-family: 'Hackney', sans-serif;
    font-size: 1.4em;
    font-weight: 600;
    color: #FFC792;
}

/* Paragraphs */
body.iframe-body p {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Links */
body.iframe-body a {
    color: #FFD69D;
    text-decoration: none;
    transition: 0.2s;
}

body.iframe-body a:hover {
    color: #fff;
}


/* -----------------------------------------
   FIC INFO BOXES
----------------------------------------- */

.fic-info-box {
    border: 1px solid #FFC792;
    padding: 15px;
    margin-bottom: 25px;
    background: #151415;
    color: #F0E5CA;
    width: 100%;
    box-sizing: border-box;
}

.fic-info-box p {
    margin: 6px 0;
}

.fic-info-box .fic-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Hackney', sans-serif;
    color: #FFC792;
    font-size: 24px;
}


/* -----------------------------------------
   FUN PAGES
----------------------------------------- */

.blinkies img,
.stamps img,
.adoptables img {
  image-rendering: pixelated;
  display: inline-block;
  margin: 4px;
  border: 1px solid #FFC792;
}

.blinkies img { width: 150px !important; }
.stamps img   { width: 99px !important; }
.adoptables img { width: auto !important; }

/* -----------------------------------------
   SCROLLBAR
----------------------------------------- */

/* Firefox */
html, body {
    scrollbar-width: thin;
    scrollbar-color: #0b0b0b transparent;
}

/* Chrome, Edge, Safari */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 2px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: #151415;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: #0b0b0b;
    border-radius: 8px;
}

/* -----------------------------------------
   ficContent base size (for slider)
----------------------------------------- */

#ficContent {
    font-size: 18px;
}


/* -----------------------------------------
   TAG STYLING
----------------------------------------- */

.fic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 15px 0;
}

.tag {
    border: 1px solid #FFDDB0; /* slightly lighter than #FFC792 */
    padding: 2px 6px;          /* minimal padding */
    font-size: 14px;
    color: #F0E5CA;
    background: #151415;
    border-radius: 2px;        /* barely rounded — almost sharp */
    line-height: 1.3;
    display: inline-block;
}



/* -----------------------------------------
   CONTROLS TOGGLE PANEL
----------------------------------------- */

.controls-wrapper {
    margin-bottom: 20px;
}

.controls-toggle {
    font-family: 'Hackney', sans-serif;
    color: #FFD69D;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

#controlsPanel {
    margin-top: 12px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    max-height: 500px; /* visible by default */
    opacity: 1;
}

/* Hidden state */
#controlsPanel.hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}



/* -----------------------------------------
   MOBILE RESPONSIVE
----------------------------------------- */

@media (max-width: 768px) {

    /* BODY */
    body.iframe-body {
        padding: 10px 8px;
        font-size: inherit;
        line-height: 1.6;
    }

.chapter-select {
        width: 100%;
        padding: 0 10px;
    }


    /* HEADINGS */
    body.iframe-body h1 {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 15px;
        text-align: center;
    }

    body.iframe-body h2 {
        font-size: 26px;
        margin-bottom: 12px;
        text-align: center;
    }

    body.iframe-body h3 {
        font-size: 20px;
        margin-bottom: 10px;
        text-align: center;
    }

    /* PARAGRAPHS */
    body.iframe-body p {
        font-size: inherit;
        margin-bottom: 18px;
    }

    /* LINKS */
    body.iframe-body a {
        font-size: 16px;
        word-break: break-word;
    }

    /* INLINE H3 */
    .inline-h3 {
        font-size: 1.2em;
    }

    body.window-content{
        padding: 10px 8px;
        font-size: inherit;
        line-height: 1.6;
    }

    /* SCROLLBAR */
    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        width: 4px;
    }

    html::-webkit-scrollbar-thumb,
    body::-webkit-scrollbar-thumb {
        background: #0b0b0b;
    }
}

/* -----------------------------------------
   TEXT SIZE SLIDER
----------------------------------------- */

/* Slider container */
.font-slider {
    width: 200px;
    max-width: 100%;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Track */
#fontSizeSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #2a292a;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Thumb — contained inside track */
#fontSizeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: #FFC792;
    border-radius: 3px;
    margin-top: -2px; /* centers inside 6px track */
    cursor: pointer;
}

#fontSizeSlider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #FFC792;
    border-radius: 3px;
    cursor: pointer;
}

/* Label */
.font-size-label {
    color: #FFD69D;
    font-family: 'Hackney', sans-serif;
    font-size: 18px;
}

/* MOBILE slider */
@media (max-width: 750px) {
    .font-slider {
        width: 90%;
        padding: 0 10px;
    }
}
