@import url('https://fonts.googleapis.com/css2?family=Eater&family=Sofia+Sans+Extra+Condensed:ital,wght@0,1..1000;1,1..1000&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: #d0d6dc;
  background-color: #0a0e12;
  background-image: url('/images/background.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  line-height: 1.6;
}

body, body * {
  font-family: 'Sofia Sans Extra Condensed', Arial, Helvetica, sans-serif;
}

a {
  color: #c4a35a;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #d4b86a;
  text-decoration: underline;
}

header {
  background: linear-gradient(135deg, #11181f 0%, #16202a 100%);
  border-bottom: 2px solid rgba(196, 163, 90, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 0;
  height: 88px;
  z-index: 100;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

header > .header-container {
  width: 1350px;
  max-width: 1350px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

header > .header-container > .logo-box {
  width: 260px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header > .header-container > .logo-box .panel {
  width: 16px;
  height: 28px;
}

header > .header-container > .logo-box .panel.back {
  cursor: pointer;
  background: transparent url('/images/chevron-left.png') left center no-repeat;
  background-size: contain;
  opacity: 33%;
  transition: all 0.3s ease;
}

header > .header-container > .logo-box .panel.back:hover,
header > .header-container > .logo-box .panel.back:focus,
header > .header-container > .logo-box .panel.back:active {
  opacity: 66%;
  transform: translateX(-5px);
}

header > .header-container a {
  display: inline-block;
  line-height: 0;
}

header > .header-container .logo {
  height: 50px;
  width: auto;
  display: inline-block;
  filter: brightness(0.85) saturate(0.9);
  transition: filter 0.3s ease;
}

header > .header-container .logo:hover {
  filter: brightness(1) saturate(1);
}

header > .header-container h1 {
  display: inline-block;
  font-size: 36px;
  font-weight: 500;
  color: #c4a35a;
  /* letter-spacing: -0.3px; */
  text-shadow: 0 0 30px rgba(196, 163, 90, 0.08);
  text-transform: uppercase;
  padding: 0;
  margin: 0;
}

header > .header-container h1 > a {
  text-decoration-thickness: 2px !important;
  text-underline-offset: 8px !important;
}

main {
  max-width: 1350px;
  margin: 32px auto;
  padding: 32px 24px;
  box-sizing: border-box;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  column-gap: 32px;
  min-height: 70vh;
}

aside {
  flex: 0 0 260px;
  position: sticky;
  top: 96px;
  z-index: 90;
  max-width: 260px;
}

aside > .aside-block {
  background: linear-gradient(145deg, #11181f, #17212b);
  border-radius: 18px;
  padding: 32px 20px;
  border: 1px solid rgba(196, 163, 90, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(196, 163, 90, 0.04);
  margin-bottom: 24px;
}

aside > .aside-block:last-child {
  margin-bottom: 0;
}

aside > .aside-block h2 {
  font-size: 26px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #c4a35a;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid rgba(196, 163, 90, 0.1);
  padding-bottom: 6px;
}

aside > .aside-block .content-item {
  text-decoration: none;
  display: block;
  padding: 12px 14px;
  margin-bottom: 6px;
  border-radius: 10px;
  font-size: 24px;
  font-weight: 500;
  color: #a8b3b8;
  transition: all 0.3s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
  text-overflow: ellipsis;
  overflow-x: hidden;
  white-space: nowrap;
}

aside > .aside-block .content-item:hover {
  background: rgba(196, 163, 90, 0.04);
  color: #c4a35a;
  text-decoration: none;
  transform: translateX(5px);
  border-left-color: #c4a35a;
}

aside > .aside-block .content-item.active {
  background: rgba(196, 163, 90, 0.08);
  color: #d4b86a;
  font-weight: 600;
  border-left-color: #c4a35a;
}

aside > .aside-block .content-item.content-item-chapter {
  font-size: 20px;
  padding: 8px 14px;
}

main section {
  flex: 1;
  background: linear-gradient(145deg, #11181f, #17212b);
  border-radius: 18px;
  padding: 32px 32px;
  border: 1px solid rgba(196, 163, 90, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(196, 163, 90, 0.04);
  min-height: 400px;
  z-index: 90;
}

main section h2 {
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #c4a35a;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 32px;
  border-bottom: 2px solid rgba(196, 163, 90, 0.1);
  padding-bottom: 14px;
}

main section h2.toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-top: 32px;
}

main section h2.toggle:first-child {
  margin-top: 0;
}

main section h2.toggle > span {
  display: inline-block;
}

main section h2.toggle > .chevron {
  display: block;
  width: 24px;
  height: 24px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  opacity: 0.33
}

main section h2.toggle > .chevron.chevron-up {
  background-image: url('/images/chevron-up.png');
}

main section h2.toggle > .chevron.chevron-down {
  background-image: url('/images/chevron-down.png');
}

main section .chapters.collapsed, #image-view.collapsed {
  display: none;
}

main section .banner-block {
  background-color: #fff;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(196, 163, 90, 0.06);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 260px;
}

main section .banner-block.not-implemented {
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

main section .banner-block > .left,
main section .banner-block.not-implemented > .center {
  color: #333;
}

main section .banner-block.not-implemented > .center {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  row-gap: 32px;
  width: 100%;
  padding-bottom: 48px;
}

main section .banner-block > .left > h1,
main section .banner-block.not-implemented > .center > h1 {
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 0;
}

main section .banner-block.not-implemented > .center > h1 {
  margin-bottom: 0;
}

main section .banner-block.not-implemented > .center > .image-frame {
  width: fit-content;
  border: 3px solid #333;
  line-height: 0;
}

main section .banner-block.not-implemented > .center > .image-frame > img {
  border: 2px solid #fff;
  width: 500px;
  height: auto;
}

main section .banner-block > .left > p,
main section .banner-block.not-implemented > .center > p {
  font-size: 24px;
  font-weight: 400;
}

main section .banner-block.not-implemented > .center > p {
  text-align: center;
}

main section .banner-block > .right {
  width: 291px;
  height: 200px;
  background: transparent url('/images/banner-writer.jpg') center right no-repeat;
  background-size: contain;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

main section .home-info {
  font-size: 30px;
  margin-top: 32px;
  margin-bottom: 64px;
}

main section .home-info a {
  text-decoration-thickness: 1px !important;
  text-underline-offset: 6px !important;
}

main section .home-info > h3 {
  font-size: 48px;
  font-weight: 600;
  color: #c4a35a;
  line-height: 50px;
  margin-bottom: 16px;
}

main section .home-info > ul {
  list-style-type: disc;
  font-weight: 200;
  margin-left: 74px;
  margin-bottom: 32px;
}

main section .home-info > ul > li {
  line-height: 38px;
}

main section .home-info > .start {
  margin-top: 24px;
  text-align: right;
}

main section .home-info > .start > button,
main section .banner-block.not-implemented > .center > button {
  border-width: 0;
  border-radius: 8px;
  padding: 8px 32px;
  background-color: #0069a8;
  color: #fafaf5;
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

main section .home-info > .start > button:hover,
main section .banner-block.not-implemented > .center > button:hover {
  background-color: #0084d1;
  color: #fffff8;
}

.chapter-card {
  display: flex;
  gap: 20px;
  padding: 16px 14px;
  margin-bottom: 16px;
  border-radius: 14px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.015);
}

.chapter-card:hover {
  background: rgba(196, 163, 90, 0.04);
  border-color: rgba(196, 163, 90, 0.1);
  transform: translateX(7px);
}

.chapter-card > a {
  line-height: 0;
}

.chapter-preview {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: #17212b;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(196, 163, 90, 0.1);
  transition: all 0.3s ease;
}

.chapter-card:hover .chapter-preview {
  border-color: rgba(196, 163, 90, 0.3);
}

.chapter-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chapter-info {
  flex: 1;
  min-width: 0;
}

.chapter-info > summary {
  font-size: 20px;
  line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #a8b3b8;
  background: rgba(196, 163, 90, 0.04);
  padding: 18px 26px;
  border-radius: 16px;
  /* margin-bottom: 2.5rem; */
  border-left: 5px solid #c4a35a;
}

.chapter-title-link {
  font-size: 26px;
  font-weight: 600;
  color: #c4a35a;
  display: inline-block;
  margin-bottom: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.chapter-title-link:hover {
  color: #d4b86a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
}

article > h1 {
  font-size: 38px;
  font-weight: 600;
  color: #c4a35a;
  margin-bottom: 20px;
  line-height: 1.2;
}

article > summary {
  font-size: 24px;
  color: #a8b8c8;
  background: rgba(196, 163, 90, 0.04);
  padding: 20px 30px;
  border-radius: 16px;
  margin-bottom: 40px;
  border-left: 5px solid #c4a35a;
  margin-left: 48px;
  width: calc(100% - 2*48px);
}

article > .content {
  font-size: 30px;
  line-height: 1.4;
  color: #c8d0d8;
}

article > .content p {
  font-weight: 200;
  margin-bottom: 32px;
  text-align: justify;
  text-indent: 48px;
}

article > .content > p:first-of-type::first-letter {
  font-size: 40px;
  font-weight: 400;
  color: #c4a35a;
  margin-right: 3px;
}

article > .content p > a {
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
}

article > .content h3 {
  font-weight: 400;
  color: #c4a35a;
  margin-left: 48px;
}

article > .content > .image {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 24px;
  padding: 32px 0;
  border-radius: 16px;
  background-color: rgba(196, 163, 90, 0.04);
  border: 1px solid rgba(196, 163, 90, 0.06);
  margin-left: 48px;
  margin-right: 48px;
}

article > .content > .image > img {
  display: block;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

article > .content > .image > em {
  display: block;
  text-align: center;
  font-size: 24px;
  color: #a8b8c8;
  font-style: italic;
  font-weight: 300;
}

article > .content > table {
  border-collapse: collapse;
  border: 1px solid rgba(196, 163, 90, 0.08);
  border-radius: 16px;
  margin-bottom: 32px;
  margin-left: 48px;
  width: calc(100% - 2*48px);
}

article > .content > table > thead {
  border-bottom: 1px solid rgba(196, 163, 90, 0.08);
  background-color: rgba(196, 163, 90, 0.04);
}

article > .content > table > thead th {
  text-align: left;
  padding: 16px 0 16px 32px;
  font-size: 30px;
  font-weight: 500;
}

article > .content > table > tbody td {
  text-align: left;
  padding: 8px 0 8px 32px;
  font-size: 30px;
  font-weight: 150;
}

article > .content > table > tbody td strong {
  font-weight: 500;
}

article > .content > ul {
  list-style-type: disc;
  font-weight: 200;
  margin-left: 74px;
  margin-bottom: 32px;
}

article > .content > ol {
  list-style-type: decimal;
  font-weight: 200;
  margin-left: 68px;
  margin-right: 48px;
  margin-bottom: 32px;
}

article > .content > ol > li {
  padding-left: 8px;
  margin-bottom: 16px;
}

article > .content > ol > li:last-child {
  margin-bottom: 0;
}

article > .content > ol > li > p {
  text-indent: 0;
  margin-bottom: 0;
}

article > .content > pre {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  margin-top: 8px;
  margin-bottom: 32px;
  margin-left: 48px;
  margin-right: 48px;
  text-wrap: wrap;

  padding: 32px;
  border-radius: 16px;
  background-color: rgba(196, 163, 90, 0.04);
  border: 1px solid rgba(196, 163, 90, 0.06);
}

.likely {
  margin-top: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end !important;
  padding: 8px 16px;
  background-color: #c8d0d8; /* rgba(255, 255, 255, 0.75); */
  color: #333;
  border-radius: 8px;
  margin-left: 48px;
  width: calc(100% - 2*48px);
}

.likely > span {
  display: block;
  font-size: 18px;
}

nav.chapter {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  margin-bottom: 48px;
  margin-left: 48px;
  width: calc(100% - 2*48px);
}

nav.chapter > a {
  display: block;
  font-size: 28px;
  font-weight: 200;
  text-decoration: none;
  transition: all 0.3s ease;
  /*
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  */
}

nav.chapter > a:hover {
  text-decoration: none;
}

nav.chapter > a.left:hover {
  transform: translateX(-5px);
}

nav.chapter > a.right:hover {
  transform: translateX(5px);
}

nav.chapter > a.down:hover {
  transform: translateY(5px);
}

#image-view {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(10, 15, 20, 0.25);
  backdrop-filter: blur(6px) brightness(50%);
  padding: 48px;
}

#image-view img {
  border: 2px solid rgba(196, 163, 90, 0.12);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

#image-view img.horizontal {
  height: 100%;
  width: auto;
}

#image-view img.vertical {
  height: auto;
  width: 100%;
}

#image-view .close {
  position: absolute;
  top: 20px;
  right: 20px;
  height: 35px;
  width: 35px;
  cursor: pointer;
  opacity: 33%;
  transition-property: opacity;
  transition-timing-function: ease-in-out;
  transition-duration: 300ms;
  background-image: url('/images/close-icon.svg');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
}

#image-view .close:hover,
#image-view .close:focus,
#image-view .close:active {
  opacity: 66%;
}

.overflow-y-hidden {
  overflow-y: hidden;
}

.bg-shader {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 15, 20, 0.75);
  backdrop-filter: blur(6px) brightness(25%);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0e12;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(196, 163, 90, 0.4);
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 163, 90, 0.6);
}
