/* ===== Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

body {
  margin: 0;
  background-color: var(--mdui-color-surface);
  color: var(--mdui-color-on-surface);
}

a {
  color: rgb(var(--mdui-color-primary));
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.spacer {
  flex-grow: 1;
}

/* ===== Preloader ===== */
#preloader {
  background: #1a1a1a;
  overflow: hidden;
  position: fixed;
  inset: 0;
  z-index: 999999;
}

#preloader .dot {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  width: 160px;
  height: 100px;
  margin-top: -50px;
  margin-left: -80px;
  border-radius: 5px;
  background-color: #000;
  animation: dot1 3s cubic-bezier(0.55, 0.3, 0.24, 0.99) infinite;
}

#preloader .dot:nth-child(2) {
  z-index: 11;
  width: 150px;
  height: 90px;
  margin-top: -45px;
  margin-left: -75px;
  border-radius: 3px;
  background-color: #555;
  animation-name: dot2;
}

#preloader .dot:nth-child(3) {
  z-index: 12;
  width: 40px;
  height: 20px;
  margin-top: 50px;
  margin-left: -20px;
  border-radius: 0 0 5px 5px;
  background-color: #999;
  animation-name: dot3;
}

@keyframes dot1 {

  3%,
  97% {
    width: 160px;
    height: 100px;
    margin-top: -50px;
    margin-left: -80px;
  }

  30%,
  36% {
    width: 80px;
    height: 120px;
    margin-top: -60px;
    margin-left: -40px;
  }

  63%,
  69% {
    width: 40px;
    height: 80px;
    margin-top: -40px;
    margin-left: -20px;
  }
}

@keyframes dot2 {

  3%,
  97% {
    width: 150px;
    height: 90px;
    margin-top: -45px;
    margin-left: -75px;
  }

  30%,
  36% {
    width: 70px;
    height: 96px;
    margin-top: -48px;
    margin-left: -35px;
  }

  63%,
  69% {
    width: 32px;
    height: 60px;
    margin-top: -30px;
    margin-left: -16px;
  }
}

@keyframes dot3 {

  3%,
  97% {
    width: 40px;
    height: 20px;
    margin-top: 50px;
    margin-left: -20px;
  }

  30%,
  36% {
    width: 8px;
    height: 8px;
    margin-top: 49px;
    margin-left: -5px;
    border-radius: 8px;
  }

  63%,
  69% {
    width: 16px;
    height: 4px;
    margin-top: -37px;
    margin-left: -8px;
    border-radius: 10px;
  }
}

/* ===== Navigation Drawer ===== */
#nav-drawer mdui-list {
  padding-top: 4rem;
}

/* ===== Content ===== */
.content-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 120px;
}

@media (min-width: 768px) {
  .content-wrapper {
    padding: 32px 32px 120px;
  }
}

/* ===== Section ===== */
.content-section {
  background: var(--mdui-color-surface-variant);
  border: 1px solid var(--mdui-color-outline-variant, rgba(var(--mdui-color-on-surface), var(--mdui-state-layer-hover)));
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(var(--mdui-color-on-surface), var(--mdui-state-layer-hover));
}

@media (min-width: 768px) {
  .content-section {
    padding: 32px;
    border-radius: 20px;
  }
}

.content-section:hover {
  box-shadow: 0 4px 16px rgba(var(--mdui-color-on-surface), var(--mdui-state-layer-dragged));
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.section-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.section-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.section-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--mdui-color-on-surface);
}

.d-none {
  display: none !important;
}

.text-center {
  text-align: center !important;
}

ul li {
  padding: 8px 0;
}

.bar-btn {
  margin: auto auto 0 8px;
}

.mdui-table.table-container {
  margin: 0;
}

.table-container mdui-button {
  margin: 16px 8px 0 0;
}


/* ===== Back to top ===== */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 4.5rem;
  right: 1.75rem;
  z-index: 666;
}

#back-to-top.visible {
  display: block;
}

/* ===== Small screens ===== */
@media (max-width: 480px) {
  .section-header {
    gap: 12px;
  }

  .section-title {
    font-size: 1.05rem;
  }
}