@font-face {
    font-family: 'Bainsley';
    src: url('../fonts/bainsley/Bainsley_Roman.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bainsley_Roman';
    src: url('../fonts/bainsley/Bainsley_Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bainsley';
    src: url('../fonts/bainsley/Bainsley_Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;

}

@font-face {
    font-family: 'Bainsley';
    src: url('../fonts/bainsley/Bainsley_Bold_Italic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    letter-spacing: 0.75px;
    font-family: 'Bainsley', 'Georgia', monospace;
}

html {
    overflow-y: scroll;
}

body {
    padding-top: 90px;
    transition: margin-left 0.3s;
    background-color: azure;
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
}

.numbers {
    font-size: 19px;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: yellow;
    color: blue;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    flex-direction: row;
}

.page-footer {
    background-color: yellow;
    padding: 1em;
    flex-shrink: 0;
    margin-top: 16px;
}

.page-footer p {
    margin-bottom: 8px;
}

.menu-btn {
    background: none;
    border: 1px;
    border-color: black;
    color: rgba(255, 115, 0, 0.4);
    font-size: 32px;
    margin-top: 2px;
    cursor: pointer;
    margin-right: 20px;
    display: none;
}

.top-bar-button {
    cursor: pointer;
    height: 42px;
}

.logo {
    height: 42px; 
    margin-right: auto; 
    margin-top: -4px;
}   

.side-menu {
    position: fixed;
    top: 68px;
    left: 0;
    width: 250px;
    height: calc(100vh - 68px);
    background-color: #FF7BD3;
    color: white;
    transform: translateX(-100%);
    transition: transform 0.3s;
    z-index: 999;
    overflow-y: auto;
    padding-top: 20px;
}

.side-menu.active {
    transform: translateX(0);
}

.menu-list {
    list-style: none;
}

.menu-list li::before {
    content: "";
}

.menu-item {
    padding: 6px 24px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #f2f2f2;
}

.menu-item a {
    color: white; 
    transition: all 0.3s;  
    font-size: 18px;
}

em {
    text-transform: uppercase;
    font-size: 12px;
}

em b {
    font-size: 19px;
}   

.content {
    transition: margin-left 0.3s;   
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    flex: 1 0 auto;
    
}

.page {
    display: flex;
    flex-direction: column;
    height: 100%;
    height: calc(100vh - 90px);
}

.navigation-button {
    padding: 16px 32px;
    color: black;
    cursor: pointer;
    border-radius: 5px;
    font-size: 18px;
}

#next-page-navigation-button {
    background-color: yellow;
    border: none;
}

#previous-page-navigation-button {
    background-color: azure;
    border: 1px solid rgba(0, 0, 0, 0.4);
}        

#next-page-navigation-button:hover {
    -webkit-box-shadow: 0px 0px 37px 5px rgba(255,255,121,0.86);
    -moz-box-shadow: 0px 0px 37px 5px rgba(255,255,121,0.86);
    box-shadow: 0px 0px 37px 5px rgba(255,255,121,0.86);
}

#previous-page-navigation-button:hover {
    -webkit-box-shadow: 0px 0px 37px 5px rgba(180, 180, 180, 0.36);
    -moz-box-shadow: 0px 0px 37px 5px rgba(180, 180, 180, 0.36);
    box-shadow: 0px 0px 37px 5px rgba(180, 180, 180, 0.36);        
}

#navigation-buttons-container {
    display: flex;
}

h1 {
    margin-bottom: 20px;
    font-size: 32px;
}

h2 {
    margin-bottom: 4px;
    font-size: 20px;
}

h3 {
    margin-bottom: 4px;
}

p {
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 18px;
}

.uppercase-style {
    text-transform: uppercase;
    font-size: 12px;
}

.uppercase-style .first-letter {
    font-size: 19px;
}

.skills {
    margin-block-end: 16px;
    list-style-type: none;
}

table {
    border-collapse: collapse;
    margin-bottom: 18px;
    margin-top: 8px;
    table-layout: fixed;
}

th, td {
    border: 1px solid black;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}     

table.weapons {
    width: 100%;
}

table.weapons td:first-child,
table.weapons th:first-child {
    width: auto;
}

table.weapons td:not(:first-child),
table.weapons th:not(:first-child) {
    width: 46px;
    text-align: center;
}

table.mien td:first-child, 
table.mien th:first-child {
    width: 46px;
    text-align: center;
}

table.mien td:nth-child(2), 
table.mien th:nth-child(2) {
    width: 100%;
    text-align: left;
}

table.weapons td:first-child, 
table.weapons th:first-child {
    text-align: center;
}

table.random-spells td:first-child, 
table.random-spells th:first-child {
    text-align: center;
}

table.oops td:first-child, 
table.oops th:first-child {
    max-width: 46px;
}       

table.oops td:first-child, 
table.oops th:first-child, 
table.oops th:nth-child(2) {
    text-align: center;
}

table.dragon-flame td:first-child,
table.dragon-flame th:first-child {
    text-align: center;
}

table.dragon-flame td:not(:first-child),
table.dragon-flame th:not(:first-child) {
    width: 9%;
}

.two-column-container {
    display: flex;
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.two-column-container .left {
    flex: 0 0 calc(60% - 10px);
}

.two-column-container .right {
    flex: 0 0 calc(40% - 10px);
}

li {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 10px;
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    padding-left: 12px;
    position: relative;
    margin-bottom: 0px;
}

ul li::before {
    content: "·";
    position: absolute;
    left: 0px;
    top: 0;
}

ul li:last-child {
    margin-bottom: 16px;
}

ol {
    list-style: none;
    counter-reset: my-counter;
    padding-left: 0;
}

ol li {
    counter-increment: my-counter;
    position: relative;
    padding-left: 22px;
}

ol li::before {
    content: counter(my-counter) ".";
    font-weight: bold;
    position: absolute;
    left: 0;
    width: 0;
    text-align: right;
}

ol li:last-child {
    margin-bottom: 16px;
}

.footnotes li {
    font-size: 16px;
    padding-left: 0px;
}

.footnotes li::before {
    content: "";
}

.footnotes li:last-child {
    margin-bottom: 26px;
}

.collapse-button {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-right: 14px;
    margin-left: 4px;
    padding-top: 4px;
    font-size: 16px;
    line-height: 12px;
}

:target::before {
    content: "";
    display: block;
    height: 18px;
    margin-top: -18px;
}

.clear-btn {
    position: absolute;
    right: 66px;
    top: 6px;
    font-size: 24px;
    color: #999999;
    cursor: pointer;
    user-select: none;
}

#search_container {
    position: relative;
    display: flex;
    width: 100%;
}

#searchInput {
    width: 100%;
    padding: 8px 12px;
    padding-right: 30px; 
    font-size: 18px;
    border: 3px solid rgba(255, 115, 0, 0.4);
    border-radius: 8px;
    margin-bottom: 16px;
    outline: none;
    background-color: white;
}

.expandable-panel {
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff00 100%);
    color: black;
    transition: background-color 0.3s ease;
}

.panel-header:hover {
    background: white;
}

.panel-header.open {
    background: white;
}

.arrow {
    margin-left: 8px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.arrow.open {
    transform: rotate(180deg);
}

.panel-content {
    padding: 0;
    height: 0;
    overflow: hidden;
    transition: height 0.5s ease;
    background: white;
}

.panel-inner {
    padding: 20px 20px 0 20px;
}

.overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.5);
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease;
z-index: 10;
}

.side-panel {
  position: fixed;
  /* right: 20px; */
  bottom: -100%;
  width: 100%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  border-radius: 8px 8px 0 0;
  padding: 20px;
  transition: bottom 0.4s ease;
  z-index: 11;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-panel.active {
  bottom: 0px;
}

.side-panel  p:last-child {
    margin-bottom: 0;
}
    
        /* Mobile */
@media (max-width: 768px) {
    .side-menu {
        height: 100vh;
        height: 100dvh;
        padding-bottom: 100px;
    }

    .menu-btn {
        display: block;
    }

    .logo {
        margin-right: initial;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    body.menu-open .side-menu {
        transform: translateX(0);
    }
    
    body.menu-open .overlay {
        opacity: 1;
        visibility: visible;
    }

    .content {
        padding: 0 20px;
        margin-bottom: 24px;
    }

    #navigation-buttons-container {
        flex-direction: column;
        justify-content: flex-start;
        gap: 16px;
    } 
    
    .mobile {
        display: block;
    }

    .mobile-table {
        display: table;
    }

    .desktop {
        display: none;
    }

    table {
        font-size: 16px;
    }

    th, td {
        padding: 7px;
    }

    table.random-spells, table.mien {
        width: 80%;
    }

    table.random-spells td:nth-child(1), 
    table.random-spells th:nth-child(1) {
        width: 40px;
    }

    table.mein td:nth-child(1), 
    table.mein th:nth-child(1) {
        width: 40px;
    }

    table.weapons td:not(:first-child),
    table.weapons th:not(:first-child) {
        width: 9%;
    }

    .two-column-container {
        flex-direction: column-reverse;
        gap: 0;
    }

    .two-column-container .left,
    .two-column-container .right {
        flex: 0 0 100%;
    }

    .clear-btn {
        right: 62px;
    }

    #image-not-found {
        width: calc(100vw - 40px)
    }
}

/* Desktop */
@media (min-width: 769px) {
    .side-menu {
        transform: translateX(0);
    }

    #navigation-buttons-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .content {
        margin-bottom: 24px;
    }

    .mobile {
        display: none;
    }

    
    .mobile-table {
        display: none;
    }

    .desktop {
        display: block;
    }

    table {
        font-size: 18px;
    }

    table.random-spells td:nth-child(1), 
    table.random-spells th:nth-child(1),
    table.random-spells td:nth-child(3), 
    table.random-spells th:nth-child(3) {
        max-width: 46px;
        text-align: center;
    }

    table.random-spells td:nth-child(2), 
    table.random-spells th:nth-child(2),
    table.random-spells td:nth-child(4), 
    table.random-spells th:nth-child(4) {
        width: 50%;
    }

    .page-footer {
        margin-left: 250px
    }

    #image-not-found {
        min-width: 600px;
    }
}
        
