/* FONTS */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Inter-Bold.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Inter-Italic.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Inter-BoldItalic.woff2") format("woff2");
}

/* VARIABLES */
:root {
  --size-xs: 0.25rem;
  --size-sm: 0.5rem;
  --size-md: 1rem;
  --size-lg: 2rem;
  --size-xl: 3rem;
  --size-2xl: 4rem;
  --size-3xl: 6rem;

  --sidebar-width: 240px;
  --max-page-width: 800px;

  --color-bg-primary: #16203b;
  --color-bg-secondary: #3c1155;
  --color-bg-tertiary: #743f93;

  --color-text-primary: #ffffff;
  --color-text-secondary: #90a1b9;
  
  --color-button-primary: #9810fa;
  --color-button-secondary: #aa1dfc;
  --color-button-tertiary: #daa6fc;
}

/* ELEMENTS */
* {
  margin: 0;
  border: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 100%;
}

body {
  background: radial-gradient(ellipse at 50% 0%, var(--color-bg-tertiary), var(--color-bg-primary));
  background-color: var(--color-bg-secondary);
  background-repeat: repeat-x;
  background-size: cover;
  color: var(--color-text-primary);
}

section {
  margin-bottom: var(--size-lg);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--size-lg);
}

h2 {
  font-size: calc(1.5 * var(--size-md));
}

p, ol, ul {
  margin-bottom: var(--size-md);
}

ol, ul {
  padding-left: var(--size-md);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

input,
textarea,
select,
label {
  display: block;
}

input,
textarea {
  width: 100%;
  border-top: 1px solid var(--color-bg-primary);
  border-bottom: 1px solid var(--color-button-tertiary);
  border-radius: var(--size-sm);
  padding: var(--size-md);
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

input::placeholder,
textarea::placeholder,
select::placeholder {
  color: var(--color-text-primary);
  opacity: 0.5;
}

input[type="range"] {
  padding: 0;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

textarea {
  resize: vertical;
}

label {
  margin-bottom: var(--size-xs);
  display: block;
  cursor: pointer;
}

main {
  padding: var(--size-lg);
  flex: 1;
}

main > section {
  margin-bottom: var(--size-lg);
}

main p,
main ol,
main ul {
  line-height: 1.5;
}

button {
  border-top: 1px solid var(--color-button-tertiary);
  border-radius: var(--size-sm);
  padding: var(--size-sm) var(--size-md);
  background: linear-gradient(to top, var(--color-button-primary), var(--color-button-secondary));
  font-weight: bold;
  color: var(--color-text-primary);
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:hover {
  background: var(--color-button-secondary);
}

/* UTILITY CLASSES */
.m-0 {
  margin: 0;
}

.mb-md {
  margin-bottom: var(--size-md);
}

.p-md {
  padding: var(--size-md);
}

.py-md {
  padding: var(--size-md) 0;
}

.pb-md {
  padding-bottom: var(--size-md);
}

.overflow-y-auto {
  overflow-y: auto;
}

.text-bold {
  font-weight: bold;
}

.text-italic {
  font-style: italic;
}

.text-center {
  text-align: center;
}

.text-large {
  font-size: larger;
}

.text-small {
  font-size: smaller;
}

.text-subdued {
  color: var(--color-text-secondary);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.justify-start {
  justify-content: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-md {
  gap: var(--size-md);
}

.flex-1 {
  flex: 1;
}

/* LAYOUT STYLES */
/* .layout-full .sidebar {
  display: none;
} */

.layout-column .page {
  margin: 0 var(--sidebar-width);
}

.layout-full .page {
  margin: 0;
}

.info-links {
  margin: 0;
  list-style: none;

  display: flex;
  gap: var(--size-md);
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--color-bg-secondary);

  display: flex;
  flex-direction: column;
  align-items: stretch;

  position: fixed;
  top: 0;
  left: 0;
  z-index: 1020;

  transition: transform 0.3s ease;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  padding: var(--size-md);
  display: flex;
  align-items: center;
}

.sidebar-header a {
  text-decoration: none;
}

.sidebar-header h1 {
  padding: var(--size-md);
  font-size: var(--size-md);
  text-transform: uppercase;
}

.sidebar-menu {
  padding: var(--size-md);
  overflow: hidden auto;

  display: flex;
  flex-direction: column;
  align-items: stretch;

  flex: 1;
}

.sidebar-menu a {
  text-decoration: none;
}

.sidebar-menu-tools {
  border-bottom: 1px solid var(--color-bg-primary);
}

.sidebar-menu-games {
  border-top: 1px solid var(--color-bg-tertiary);
}

.sidebar-menu h2 {
  padding: var(--size-md);
  font-size: var(--size-md);
  color: var(--color-text-secondary);
  text-transform: uppercase;
}

.sidebar-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-menu li {
  border-radius: var(--size-sm);
}

.sidebar-menu ul li a {
  border-radius: var(--size-sm);
  padding: var(--size-md);
  display: block;
}

.sidebar-menu ul li a:hover {
  background-color: var(--color-button-secondary);
}

.sidebar-footer {
  padding: var(--size-md);
}

.sidebar-footer .info-links {
  flex-direction: column;
}

/* PAGE */
.page {
  min-height: 100vh;

  display: flex;
  flex-direction: column;
}

/* TODO Remove? */
.sidebar-btn {
  display: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background-color: var(--color-bg-primary);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1010;
}

.overlay.active {
  opacity: 0.8;
  visibility: visible;
}

.search-console {
  margin: var(--size-md);
  border-radius: var(--size-sm);
  border-top: 1px solid var(--color-button-tertiary);
  border-bottom: 1px solid var(--color-bg-primary);
  background-color: var(--color-bg-secondary);
  padding: var(--size-md);
  width: calc(100vw - (2 * var(--size-md)));
  height: calc(100vh - (2 * var(--size-md)));
  overflow: hidden;

  display: none;
  flex-direction: column;

  position: fixed;
  z-index: 1030;
}

.search-console.active {
  display: flex;
}

.container {
  margin: 0 auto;
  max-width: var(--max-page-width);
}

.page-header {
  margin-bottom: var(--size-lg);
  padding: var(--size-md);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--size-md);
}

.page-header .search-btn {
  margin-left: auto;
}

.layout-column .page-header .logo {
  display: none;
}

/* .layout-full .page-header .search-bar {
  display: none;
} */

.page-header .search-bar-wrapper {
  max-width: var(--max-page-width);
}

.page-title {
  margin-bottom: var(--size-lg);
  text-align: center;
  font-size: var(--size-xl);
}

.hero {
  margin-bottom: var(--size-xl);
  text-align: center;
  font-size: var(--size-lg);
}

.hero h1 {
  font-size: var(--size-2xl);
}

/* GIZMO GALLERY */
.gizmo-gallery {
  margin: 0;
  padding: var(--size-lg);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); */
  gap: var(--size-lg);
  list-style: none;
}

.gizmo-gallery li {
  border-radius: var(--size-sm);
  border-top: 1px solid var(--color-button-tertiary);
  border-bottom: 1px solid var(--color-bg-primary);
  background-color: var(--color-bg-secondary);
}

.gizmo-gallery li a {
  border-radius: var(--size-sm);
  padding: var(--size-md);
  display: block;
  text-decoration: none;
}

.gizmo-gallery li a:hover {
  background-color: var(--color-bg-tertiary);
}
/* GIZMO GALLERY */

/* GIZMO CONSOLE */
.gizmo-console {
  border-radius: var(--size-md);
  border-top: 1px solid var(--color-button-tertiary);
  border-bottom: 1px solid var(--color-bg-primary);
  width: 640px;
  background-color: var(--color-bg-secondary);
  overflow-x: hidden;
}

.gizmo-console-header {
  border-bottom: 1px solid var(--color-bg-primary);
  padding: var(--size-lg);
  text-align: center;
}

.gizmo-console-header h1 {
  font-size: var(--size-lg);
}

.gizmo-console-input {
  border-top: 1px solid var(--color-bg-tertiary);
  border-bottom: 1px solid var(--color-bg-primary);
  padding: var(--size-lg);
}

.gizmo-console-output {
  border-top: 1px solid var(--color-bg-tertiary);
  padding: var(--size-lg);
}

.gizmo-console-output p {
  margin-bottom: var(--size-xs);
}

.gizmo-console-output-data {
  border-radius: var(--size-sm);
  padding: var(--size-md);
  background-color: var(--color-bg-tertiary);
  overflow: auto;
}

.gizmo-console-toolbar {
  margin-bottom: var(--size-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* GIZMO CONSOLE */

.page-footer {
  padding: var(--size-lg);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--size-2xl);
}

.copyright-text {
  margin: 0;
}

.page-footer .info-links {
  padding: 0;
}

/* TABLET BREAKPOINT */
/* @media screen and (min-width: 769px) and (max-width: 1024px) {
  .layout-column .page-header .logo {
    display: initial;
  }

  .gizmo-gallery {
    width: 720px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    font-size: calc(1.5 * var(--size-md));
  }

  .hero h1 {
    font-size: var(--size-xl);
  }

  .gizmo-console {
    width: 640px;
  }
} */
/* TABLET BREAKPOINT */

/* MOBILE BREAKPOINT */
@media screen and (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .layout-column .page,
  .layout-full .page {
    margin: 0;
  }

  .layout-column .page-header .logo {
    display: initial;
  }

  .page-header {
    width: 100%;
    background-color: var(--color-bg-primary);

    position: fixed;
    z-index: 1000;
  }

  .page-header h1 {
    text-align: left;
  }
  

  .sidebar-btn {
    display: initial;
  }

  main {
    margin-top: var(--size-3xl);
  }

  .hero {
    font-size: var(--size-md);
  }

  .hero h1,
  .page-title {
    font-size: var(--size-lg);
  }

  .gizmo-gallery {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .gizmo-console {
    width: 100%;
  }

  .gizmo-console-toolbar {
    display: block;
  }

  .page-footer {
    flex-direction: column;
    gap: var(--size-md);
  }
}
/* MOBILE BREAKPOINT */
