/* Global styles ported from the live bilingualmanga.org SvelteKit build
   (global.css + per-component <style> blocks). */

body {
    margin: 0;
    justify-content: center;
    text-align: center;
    color: whitesmoke;
    overflow-x: hidden;
    background: #1f1f1f;
    font-family: Arial, Helvetica, 'Noto Sans Symbols 2', sans-serif;
}
main { display: block; }
a { color: inherit; }

/* ---------- Header (Header.svelte .topnav) ---------- */
.topnav {
    overflow: hidden;
    background: #303030;
    height: 50px;
    border-bottom: 2px solid green;
    display: flex;
    justify-content: flex-end;
    text-align: right;
    margin-bottom: 2px;
    width: 100vw;
}
.topnav .logoa { float: left; }
.topnav #logoimg {
    position: absolute;
    padding: 0;
    margin: 0 1vw;
    left: 0;
}
.topnav #logoimg img { max-height: 50px; }
.topnav .options { margin: 0 2vw 0 0; display: flex; align-items: center; }
.topnav .options button {
    background-color: rgba(255, 255, 255, 0);
    border: 0;
    margin-top: 10px;
    border-radius: 10px;
    cursor: pointer;
}
.topnav .options button:hover { background-color: rgba(255, 255, 255, 0.3); }
.topnav .options > a {
    color: #f2f2f2;
    text-align: center;
    padding: 14px 10px;
    text-decoration: none;
    font-size: 17px;
}
.topnav .options > a:hover { background-color: rgba(255, 255, 255, 0.3); }

/* ---------- Search (Search.svelte + SearchLoader.svelte) ---------- */
#backdrop {
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(3px);
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
}
#search-box {
    display: block;
    width: 90vw;
    max-height: 70vh;
    background: #303030;
    border-radius: 5px;
    position: fixed;
    top: 10vh;
    left: 5vw;
    overflow: auto;
    overflow-x: hidden;
}
#search-box label { position: relative; display: block; }
#search-box label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    min-width: 50px;
    width: 10vh;
    background: url("/static/bm/search.svg") center / contain no-repeat;
}
#search-box input {
    margin: 2vh;
    height: 5vh;
    min-height: 30px;
    width: 70vw;
    padding-left: 50px;
    background-color: #484848;
    border-radius: 5px;
    border: 0;
    color: whitesmoke;
    box-sizing: border-box;
}
#search-box input:focus { border: 2px solid green; outline: 0; }
#search-box input::placeholder { color: whitesmoke; }
#search_inbox {
    background-color: #484848;
    border-radius: 5px;
    margin: 2vh;
    padding: 10px;
    font-weight: bold;
}
#B_title { color: whitesmoke; }
.search_results {
    display: block;
    margin: 2px 0;
    text-align: left;
    padding: 20px 10px;
    background: #303030;
    border-radius: 5px;
    border: #484848 solid 1px;
    color: #f2f2f2;
    text-decoration: none;
}
.search_results:hover { background-color: rgba(255, 255, 255, 0.3); }
#search_notfound {
    margin: 2px 0;
    text-align: center;
    padding: 20px 10px;
    font-weight: bold;
    background: #303030;
    border-radius: 5px;
    border: #484848 solid 1px;
}

/* ---------- Showcase (MangaShowcase.svelte) ---------- */
.lssel { margin-top: 25px; margin-bottom: 15px; }
.lssel > a {
    text-decoration: none;
    color: whitesmoke;
    font-size: 1.1rem;
    margin-right: 5px;
    padding: 10px;
    border-radius: 5px;
    background: #444;
}
.lssel > a:hover { background-color: rgba(255, 255, 255, 0.4); }
.cardholder {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    margin: 0 5vw;
}
#pagesnum { padding: 30px 0; width: 100%; min-width: 100%; }
#pagesnum > a {
    text-decoration: none;
    color: whitesmoke;
    font-size: 1.2rem;
    margin-right: 5px;
    padding: 5px;
    border-radius: 5px;
}
#pagesnum > a:hover { background-color: rgba(255, 255, 255, 0.4); }

/* ---------- Card (MangaCard.svelte) ---------- */
.mangacardhover {
    z-index: 100;
    border-radius: 5px;
    display: inline-block;
}
.mangacardhover:hover { background-color: black; margin: 3px; box-shadow: 0 0 10px white; }
.mangacard {
    display: flex;
    justify-content: center;
    height: 250px;
    width: 162px;
    min-width: 162px;
    max-width: 162px;
    min-height: 250px;
    max-height: 250px;
    border-radius: 5px;
    margin: 5px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.mangacard:hover { opacity: 0.45; }
.mangacarddiv {
    line-height: 1.2em;
    max-height: 2.4em;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    align-self: flex-end;
    margin-bottom: 0;
    padding: 0 2px 0 0;
    color: whitesmoke;
    background-color: rgba(0, 0, 0, 0.6);
    border: 0;
    white-space: initial;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 2px 2px 5px black;
}

/* ---------- Manga view banner (MangaView.svelte) ---------- */
#mainimagec {
    display: flex;
    height: 250px;
    max-height: 250px;
    width: 100vw;
    position: relative;
    z-index: 1;
    outline: none;
}
#mainimage { max-height: 250px; margin-left: 5vw; z-index: 3; border-radius: 3px; }
#spreads {
    position: absolute;
    top: 0; left: 0;
    background-color: rgba(0, 0, 0, 0.7);
    height: 100%; width: 100%;
    z-index: 2;
}
#mainimagetitle {
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 4;
    word-wrap: break-word;
    overflow: hidden;
    margin: 10px 0 10px 5px;
}

/* ---------- Meta (MangaMeta.svelte) ---------- */
#metac {
    display: block;
    text-align: left;
    margin: 5px 5vw 0;
    height: 50vh;
    max-width: 90vw;
    overflow: clip;
    border-bottom: rgb(28, 163, 28) solid 2px;
    border-radius: 5px;
}
#metac.expanded { height: auto; }
#metac .metae { overflow-wrap: break-word; }
#metac a {
    display: inline-block;
    text-decoration: none;
    padding: 7px;
    margin: 5px;
    color: whitesmoke;
    background: #333;
    border-radius: 5px;
}
#metac a:hover { background-color: rgba(255, 255, 255, 0.3); }
#meta-toggle {
    display: inline;
    border: 2px solid green;
    border-radius: 0 0 5px 5px;
    margin: 0;
    background-color: green;
    color: whitesmoke;
    cursor: pointer;
}
#meta-toggle:hover { background-color: rgba(0, 110, 0, 1); border-color: rgba(0, 110, 0, 1); }

/* ---------- Chapter selector (MangaChSel.svelte) ---------- */
#chlist { display: block; text-align: left; margin: 5px 5vw 0; max-width: 90vw; }
#chlist a { text-decoration: none; color: whitesmoke; }
#chlist .volhead {
    font-size: 1.15rem;
    margin: 10px 0;
}
#chlist .volhead button {
    text-align: left;
    color: whitesmoke;
    background: none;
    font-size: 1.15rem;
    border: 0;
    max-width: 90vw;
    width: 90vw;
    cursor: pointer;
}
#chlist .volhead button:hover { color: rgb(125, 125, 125); }
#chlist .arrowch { float: right; }
.chsingle {
    text-decoration: none;
    padding: 7px;
    margin: 5px;
    color: whitesmoke;
    background: #333;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
}
.chsingle:hover { background-color: rgba(255, 255, 255, 0.3); }

/* language switch button (MangaView) */
.chbtna {
    text-decoration: none;
    padding: 7px;
    margin: 5px;
    color: whitesmoke;
    background: #333;
    border-radius: 5px;
    border: 2px solid gray;
}

/* ---------- Advanced search ---------- */
.adv { text-align: left; margin: 0 5vw; color: whitesmoke; }
.adv .head { text-align: center; font-weight: bolder; font-size: 1.4rem; margin: 10px; }
.adv .head button {
    background: #333; color: whitesmoke; border: 0; border-radius: 5px;
    padding: 6px 12px; margin: 0 6px; cursor: pointer; font: inherit;
}
.adv > a {
    display: inline-block; text-decoration: none; padding: 7px; margin: 5px;
    color: whitesmoke; background: #333; border-radius: 5px;
}
.adv > a:hover { background-color: rgba(255, 255, 255, 0.3); }
