/* --idk what im doing-- */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Josefin Sans', sans-serif !important;
}

html, body {
    height: 100%;
    font-family: 'Josefin Sans', sans-serif !important;
    background-color: #111;
    color: #fff;
    width: 100%;
    overflow-x: hidden; 
    scrollbar-width: thin; 
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100vw;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden; 
}

/* dont touch breaks idk how */
.main-content,
.reader-container,
#sidebar {
    max-width: 100vw;
    box-sizing: border-box;
}

.top-area {
    flex: 0 0 auto;
    width: 100%;
}

/* ----- Header stuff ----- */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5.6px 11.25px; /* não consigo passar disso */
    background-color: #1e1e1e;
    border-bottom: 0.75px solid #333; /* menos que 1px */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.square-logo {
    width: 28.1px;  /* Logo quadarado */
    height: 28.1px;
    object-fit: cover;
}

.rectangular-logo {
    height: 28.1px; /* logotype */
    object-fit: contain;
}

.header-right {
    display: flex;
    gap: 15px;
}

.header-button {
    color: #fff;
    text-decoration: none;
    font-size: 0.8em; /* Se essa merda não tiver como html5 no neocities eu
    mato alguem */
    padding: 5.08px 6.16px; /* mexer denovo */
    background-color: #007bff;
    border-radius: 5px;
    border: 1px solid #007bff;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header-button:hover {
    background-color: #0056b3;
}

/* ----- Sidebar ----- */
/* ughhhhhhhhhhhhhhhhhhhhhhhh essa merda não fica absolute não sei porque
tentar trocar sem mexer com posição de pixeis.
No mobile não verifiquei 

Tentei copiar com tutorial por isso não quero mexer muito*/
#sidebar {
    position: absolute;
    left: -300px; /* default */
    top: 0;
    width: 300px;
    height: 100%;
    background: #1e1e1e;
    z-index: 15;
    transition: left 0.3s ease;
    overflow-y: auto;
    border-right: 1px solid #333;
}

#sidebar.active {
    left: 0;
}

#sidebar .content {
    padding: 20px;
}

#sidebar .content h2 {
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #fff;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

#page-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-box {
    width: 40px;
    height: 40px;
    background-color: transparent;
    color: #f91b04;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9em;
    border-radius: 5px;
    border: 2px solid #f91b04;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.page-box:hover {
    background-color: #f91b04;
    color: #fff;
    transform: scale(1.1);
}

.page-box.read {
    background-color: #f91b04;
    color: #fff;
    border-color: #f91b04;
}


#reader-menu {
    display: flex;
    flex-direction: column;
    gap: 11px; 
    padding: 22px; /* 20px + 2px */ /* Não mexer muito */
    background-color: #1e1e1e;
    border-top: 1px solid #333;
}

.menu-button,
.dropdown-toggle {
    width: 100%;
    font-size: 1.1em;
    /*padding: 11px 22px;*/
    box-sizing: border-box;
    display: block;
    text-align: left;
    margin: 0;
}

.menu-button {
    background-color: #444 !important;
    color: #fff !important;
    border: none;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}
#reader-menu .flex-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Home */
.sidebar-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #333;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}


.sidebar-footer .sidebar-home-button {
    width: 100%;
    font-size: 1.1em;
    padding: 11px 22px;
    box-sizing: border-box;
    display: block;
    text-align: left;
    margin: 0;
    background-color: #444 !important;
    color: #fff !important;
    border: none;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
    text-decoration: none;
    border-radius: 0;
}

.sidebar-footer .sidebar-home-button:hover {
    background-color: #f91b04 !important;
    color: #fff !important;
}

.sidebar-footer .icon-square-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: #222;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.sidebar-footer .icon-square-button:hover {
    background: #333;
    border-color: #f91b04;
}
.sidebar-footer .icon-square-button img {
    display: block;
    width: 22px;
    height: 22px;
    pointer-events: none;
}

#reader-menu .menu-button,
#reader-menu .dropdown-toggle,
.sidebar-footer .sidebar-home-button {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-weight: bold;
    border-radius: 5px;
    background-color: #444 !important;
    color: #fff !important;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    display: block;
    text-align: left;
    margin: 0;
}
#reader-menu .menu-button,
#reader-menu .dropdown-toggle,
.sidebar-footer .sidebar-home-button {
    font-size: 1.1em;
    padding: 11px 22px;
    height: 44px;
    line-height: 22px;
}
#reader-menu .icon-square-button,
.sidebar-footer .icon-square-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: #222;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border-radius: 0; 
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    box-sizing: border-box;
    vertical-align: middle;
}

#reader-menu .menu-button:hover,
#reader-menu .dropdown-toggle:hover,
.sidebar-footer .sidebar-home-button:hover {
    background-color: #f91b04 !important;
    color: #fff !important;
    transform: scale(1.05);
    z-index: 1;
}

#reader-menu .icon-square-button:hover,
.sidebar-footer .icon-square-button:hover {
    background: #f91b04 !important;
    border-color: #f91b04 !important;
    transform: scale(1.1);
    z-index: 1;
}

/* ----- hovers ----- */
.menu-button,
.header-button,
.dropdown-item,
.home-button {
    background-color: #444 !important;
    color: #fff !important;
    border: none;
    transition: background-color 0.3s, color 0.3s;
}

.menu-button:hover,
.header-button:hover,
.dropdown-item:hover,
.home-button:hover {
    background-color: #f91b04 !important;
    color: #fff !important;
}

.header-button:hover,
.menu-button:hover,
.dropdown-item:hover,
.home-button:hover,
.page-box:hover,
.nav-button:hover {
    background-color: #f91b04 !important;
    color: #fff !important;
}
.home-button:hover,
.page-box:hover,
.nav-button:hover {
    background-color: #f91b04 !important;
    color: #fff !important;
}

.nav-button:hover {
    color: #f91b04 !important;
    background-color: transparent !important;
}

/* ----- Reader Container ----- */
.reader-container {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: 100%;
    margin-left: 0;
    transition: margin-left 0.3s;
    /* fucking não da pra remover uma borda que é porco percebivel */
    border: none;
}

#mangaPage {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

#sidebar.active ~ .reader-container {
    margin-left: 300px;
}

.click-area {
    position: absolute;
    top: 0;
    height: 100%;
    z-index: 10;
}

.click-area.left {
    left: 0;
    width: 33.33%;
}

.click-area.center {
    left: 33.33%;
    width: 33.33%;
}

.click-area.right {
    right: 0;
    width: 33.33%;
}

.click-area:hover {
    cursor: pointer;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

::-webkit-scrollbar-track {
    background: #222;
}

.page-navigation-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5.6px 11.25px; 
    background-color: #1e1e1e;
    border-bottom: 0.56px solid #333; 
    color: #fff;
    font-size: 0.9em; 
    gap: 11.25px; 
}

.nav-button {
    color: #fff;
    cursor: pointer;
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.nav-button:hover {
    color: #007bff;
}

.main-content {
    flex: 0 0 100vh;
    height: 100vh;
    width: 100%;
    display: flex;
    min-height: 0;
    position: relative;
}

.icon-square-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: #222;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.icon-square-button:hover {
    background: #333;
    border-color: #f91b04;
}
.icon-square-button img {
    display: block;
    width: 22px;
    height: 22px;
    pointer-events: none;
}

#settings-dropdown-menu {
    background: #222;
    border: 1px solid #444;
    border-radius: 0 0 6px 6px;
    min-width: 160px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    padding: 0;
    margin-top: 2px;
    display: none;
    flex-direction: column;
}
#settings-dropdown-menu .dropdown-item {
    width: 100%;
    padding: 10px 20px;
    background: none;
    border: none;
    color: #fff;
    text-align: left;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
#settings-dropdown-menu .dropdown-item:hover {
    background: #f91b04;
    color: #fff;
}