* {
  padding: 0;
  margin: 0;
}

:root {
  --text-color: #303030;
  --background-color: #c2c2c2;
  --item-color: #bdbdbd;
  --item-hover-color: #797979;
  --item-shadow: rgba(0, 0, 0, 0.534);
  --footer-color: #d1d1d1;
  --nav-color: rgb(255, 255, 255);
  --darkmode-button: #474747;
  --darkmode-icon: #cacaca;
  --darkmode-shadow: rgb(0, 0, 0);
  --border-color: rgba(0, 0, 0, 0.3);

  /* Font Sizes */
  --font-size-base: 1rem;
  /* 16px */
  --font-size-small: 0.875rem;
  /* 14px */
  --font-size-smaller: 0.75rem;
  /* 12px */
  --font-size-large: 1.25rem;
  /* 20px */
  --font-size-xlarge: 1.5rem;
  /* 24px */
  --font-size-xxlarge: 2rem;
  /* 32px */

  /* Line Heights */
  --line-height-base: 1.6;
  /* For body text */
  --line-height-tight: 1.3;
  /* For headings */
  --line-height-loose: 1.8;
  /* Optional for paragraphs or large text blocks */
}

.darkmode {
  --text-color: #979797;
  --background-color: #1b1b1b;
  --item-color: #444;
  --item-hover-color: #585858;
  --item-shadow: rgba(255, 255, 255, 0.683);
  --footer-color: rgb(43, 42, 42);
  --nav-color: rgb(226, 226, 226);
  --darkmode-button: #a8a8a8;
  --darkmode-icon: #414141;
  --darkmode-shadow: rgb(255, 255, 255);
  --border-color: rgba(255, 255, 255, 0.3);
}

body {
  background-color: var(--background-color);
  font-family: Kodchasan;
  min-height: 100vh;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);

  transition: background-color 0.5s ease, color 0.5s ease
}

ul {
  list-style-position: inside;
}

html::-webkit-scrollbar {
  width: 0.5vw;
}

html::-webkit-scrollbar-thumb {
  background-color: rgb(170, 170, 170);
  border-radius: 100px;
}

html::-webkit-scrollbar-track {
  background-color: rgb(61, 61, 61);
  opacity: 0;
}

html.darkmode,
body.darkmode {
  background-color: var(--background-color);
  /* Ensure dark background is applied */
  color: var(--text-color);
}


a {
  text-decoration: none;
  cursor: pointer;
  color: #007bff;
}

a:hover {
  color: rgb(0, 153, 255);
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  /* Ensures padding doesn't overflow */
  padding: 1rem 10vw;
  background: linear-gradient(15deg, rgba(149, 0, 255, 0.25) 5%, rgba(255, 0, 0, 0.25) 95%);
  font-weight: bold;
  z-index: 2000;
  border-radius: 0px 0px 7px 7px;
  border-style: solid;
  border-width: 0px 0px 2px 0px;
  border-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(15px);
  /* filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.756)); */
  box-shadow: 0 0 25px black;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}


footer {
  color: var(--text-color);
  text-align: center;
  padding: 2rem;
  background-color: var(--footer-color);
  position: sticky;
  top: 100%;
  box-shadow: 0 10px 25px black;
  border-radius: 7px 7px 0px 0px;
  border-style: solid;
  border-width: 2px 0px 0px 0px;
  border-color: rgba(255, 255, 255, 0.75);
}

footer img {
  width: auto;
  height: 32px;
  margin: 2px;
}

footer li {
  display: inline;
}

.main-container {
  color: var(--text-color);
  padding: 10.5rem 5rem 0rem 5rem;
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
}

.section-container {
  color: var(--text-color);
  padding: 4rem 5rem 1rem 5rem;
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  margin: 3.5rem 10rem;
  border-radius: 50px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  background-color: var(--footer-color);
  border: 2px solid var(--border-color);
}

.secondary-container {
  color: var(--text-color);
  padding: 3rem;
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  margin: 5rem 10rem;
  border-radius: 50px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  background-color: var(--footer-color);
  border: 2px solid var(--border-color);
}

.games li {
  list-style-type: none;
}

.mc-container {
  color: var(--text-color);
  padding: 3rem;
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  margin: 5rem 10rem;
  border-radius: 50px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  background-color: var(--footer-color);
  border: 2px solid var(--border-color);
}

.theme-switch {
  height: 60px;
  width: 60px;
  border-radius: 100%;
  bottom: 0vh;
  right: 3vh;
  margin: 1rem;
  border: 0px solid var(--darkmode-icon);
  background-color: var(--darkmode-button);
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  box-shadow: 0 0 20px var(--darkmode-shadow);
  transition: box-shadow 0.5s ease, background-color 0.3s ease, transform 0.3s ease;
}

.theme-switch:hover {
  box-shadow: 0px 0px 75px var(--darkmode-shadow);
}

.system-theme {
  display: none;
}


.theme-switch svg {
  fill: var(--darkmode-icon);
}

.theme-switch svg:last-child {
  display: none;
}

.darkmode .theme-switch svg:first-child {
  display: none;
}

.darkmode .theme-switch svg:last-child {
  display: block;
}

.banner-container {
  width: 100vw;
  height: 25vh;
  padding: 0rem;
  background-image: url('/backgrounds/Welcome to the time vortex.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  mask-image:
    linear-gradient(to bottom, black 50%, transparent 100%),
    linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image:
    linear-gradient(to bottom, black 50%, transparent 100%),
    linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-composite: destination-in;

  pointer-events: none;
}

.long_logo {
  height: auto;
  width: 350px;
  pointer-events: none;
}

.pfp-container {
  display: flex;
  justify-content: center;
}

.pfp {
  width: auto;
  height: 128px;
  border-radius: 100%;
  pointer-events: none;
  margin: 3rem 1rem;
  filter: drop-shadow(0px 0px 10px);
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li {
  display: inline;
}

.nav a {
  padding: 0.5rem 0.5rem;
  text-decoration: none;
  color: var(--nav-color);
  border-radius: 25px;
  text-decoration: underline;
}

.nav button {
  font: inherit;
  padding: 0.5rem 0.5rem;
  color: var(--nav-color);
  font-size: var(--font-size-base);
  background: transparent;
  border: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.nav a:hover {
  background-color: #00000021;
  color: rgb(0, 225, 255);
  border-radius: 25px;
}

.nav button:hover {
  background-color: #00000021;
  color: rgb(0, 225, 255);
  border-radius: 25px;
}

/* Authentication */
#auth-container {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#auth-container .header-pfp {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

#auth-container .header-username {
  color: var(--nav-color);
}

.header-pfp {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.header-username {
  color: var(--nav-color);
}

/* Components */
.admin-card,
.user-card {
  margin: 2rem 5rem;
  width: 100%;
  flex: 1;
  padding: 2rem;
  border-radius: 50px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  background-color: var(--footer-color);
  border: 2px solid var(--border-color);
}

.card {
  border: 2px solid var(--item-shadow);
  background: radial-gradient(circle at var(--x) var(--y),
      var(--item-shadow),
      transparent 200px),
    var(--item-shadow);
  background-attachment: fixed;
  background-color: var(--item-color);
  border-radius: 20%;
  padding: 50px;
  max-height: 150px;
  max-width: 150px;
  aspect-ratio: 1 / 1;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card a {
  display: flex;
  flex-direction: column;
  /* stack icon + label */
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: var(--text-color);
}

.card:hover {
  /* transform: scale(1.3); */
  box-shadow: 0 0 20px 10px var(--item-shadow);
  background-color: var(--item-color);
  position: relative;
  background: radial-gradient(circle at var(--x) var(--y),
      var(--item-shadow),
      transparent 0px),
    var(--item-shadow);
}

.creator-name {
  text-align: center;
  font-weight: 500;
  opacity: 0.9;
}

.discordinvite {
  display: inline;
  border-radius: 25px;
  padding: 1rem;
  color: #f7f7f7;
  border: 2px solid #303030;
  background: linear-gradient(90deg, #9d00ff, #ff0000, #9d00ff);
  background-size: 200% 200%;
  box-shadow: 0 0 10px 1px var(--item-shadow);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.discordinvite:hover {
  text-decoration: none;
  color: #ededed;
  box-shadow: 0 0 20px 5px var(--item-shadow);
}

.icon-group {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
  list-style: none;
}

.icon-group img {
  height: 150px;
  width: 150px;
  border-radius: 15px;
  filter: drop-shadow(8px 8px 10px rgba(0, 0, 0, 0.756));
}

.invite {
  cursor: pointer;
  font-family: inherit;
  border: 2px solid #303030;
  background: linear-gradient(90deg, #9d00ff, #ff0000, #9d00ff);
  background-size: 200% 200%;
  border-radius: 25px;
  padding: 10px;
  color: #f7f7f7;
  box-shadow: 0 0 10px 1px var(--item-shadow);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.invite:hover {
  text-decoration: none;
  color: #ededed;
  box-shadow: 0 0 20px 5px var(--item-shadow);
}

dialog {
  border: 2px solid var(--item-shadow);
  background-color: var(--item-color);
  color: var(--text-color);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 0 10px 1px var(--item-shadow);
  font-family: inherit;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.3);
}

.item-list {
  text-align: center;
  list-style: none;
  padding: 2rem 0.5rem 2rem 0.5rem;
}

.main {
  margin: 2rem 5rem;
  width: 100%;
  flex: 1;
  padding: 2rem;
  border-radius: 50px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  background-color: var(--footer-color);
  border: 2px solid var(--border-color);
}

.privacy-policy {
  width: 100%;
  flex: 1;
}

.secondary {
  margin: 2rem 5rem;
  width: 100%;
  flex: 1;
  padding: 2rem;
  border-radius: 50px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  background-color: var(--footer-color);
  border: 2px solid var(--border-color);
}

h1 {
  background: linear-gradient(90deg, rgba(149, 0, 255, 1) 0%, rgba(255, 0, 0, 1) 50%);
  background-clip: text;
  color: transparent;
  font-size: var(--font-size-xxlarge);
}

/* Utility helpers */
.is-hidden {
  display: none !important;
}

.no-margin {
  margin: 0 !important;
}

.mt-05 {
  margin-top: 0.5rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.full-width {
  width: 100%;
}

.text-left {
  text-align: left;
}

.text-sm {
  font-size: 0.9rem;
}

/* Admin dashboard */
.admin-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.admin-row--between {
  justify-content: space-between;
}

.admin-row--end {
  justify-content: flex-end;
}

.admin-row--compact {
  gap: 0.5rem;
}

.admin-row--tight {
  gap: 0.25rem;
  align-items: center;
}

.text-input {
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--text-input-border, var(--border-color));
  background: var(--text-input-bg, transparent);
  color: inherit;
  font: inherit;
  min-width: 120px;
}

.text-input--wide {
  min-width: 260px;
}

.text-input[type="color"] {
  min-width: 0;
  width: 3rem;
  height: 3rem;
  padding: 0;
  cursor: pointer;
}

.text-input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.text-input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #6663;
  text-align: left;
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  opacity: 0.8;
  border: 1px solid #6664;
}

.pill--color {
  border-color: #6664;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.right {
  text-align: right;
}

.muted {
  opacity: 0.75;
}

.card-panel {
  padding: 1.25rem;
  border-radius: 18px;
  box-shadow: 0 8px 30px #0002;
  background: var(--card, rgba(255, 255, 255, 0.02));
}

.section-gap {
  margin-top: 2.25rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

/* Profile page */
.profile-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 600;
}

.profile-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  background: #00000021;
  color: var(--text-color);
  margin-right: 0.5rem;
}

.kv {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Creator edit page */
.link-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.form-section {
  margin-top: 1.25rem;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.textarea-lg {
  height: 100px;
}

/* Discord timestamp tool */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.input-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
}

.field--wide {
  min-width: 260px;
}

.field label {
  font-weight: 600;
  color: var(--text-color);
}

.field input,
.field select,
.field button,
.chip {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--item-color);
  color: var(--text-color);
  box-shadow: 0 0 10px 1px var(--item-shadow);
}

.field button {
  cursor: pointer;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cardish {
  padding: 1.25rem;
  margin: 2rem;
  border-radius: 24px;
  border: 2px solid var(--border-color);
  background: var(--footer-color);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
}

.stamp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--item-color);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.small {
  font-size: var(--font-size-small);
  opacity: 0.9;
}

.stamp .left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: hidden;
}

.stamp .right {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn {
  cursor: pointer;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: linear-gradient(90deg, #9d00ff, #ff0000, #9d00ff);
  color: #fff;
  background-size: 200% 200%;
}

.copy-ok {
  outline: 2px solid #00d084;
}

code.mono {
  font-weight: 700;
}

.item-list--left {
  text-align: left;
  padding: 1rem 0 0;
}

@media (max-width: 880px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {

  .long_logo {
    align-items: center;
    width: 196px;
    height: auto;
  }

  header {
    text-align: center;
  }

  .main-container {
    text-align: center;
    padding: 7.5rem 1rem 0 1rem;
  }


  .secondary-container {
    margin: 1rem;
  }

  .section-container {
    margin: 1rem 1.5rem;
    padding: 1.5rem 1rem;
  }

  .mc-container {
    margin: 1rem;
    padding: 1.5rem 2rem;
  }

  h1 {
    text-align: center;
    font-size: 1.5rem;
  }

  .main {
    padding: 2rem 1rem 2rem 1rem;
    margin: 1rem 1rem 0rem 1rem;
    text-align: left;
  }

  .secondary {
    padding: 1rem 1rem 2rem 1rem;
    margin: 1rem 1rem 0rem 1rem;
    text-align: left;
  }

  .admin-card,
  .user-card {
    width: 9.7rem;
    padding: 0.5rem;
    margin: 0.5rem;
    text-align: left;
  }

  .item-list {
    padding: 1rem 0.1rem 5rem 0.1rem;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .banner-container {
    width: 100vw;
    height: 10vh;
    padding: 0rem;
  }

  .icon-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    text-align: center;
    font-size: 10px;
  }

  .icon-group img {
    height: 40px;
    width: 40px;
    border-radius: 2px;
    filter: drop-shadow(4px 4px 3px rgba(0, 0, 0, 0.756));
  }

  .item-list h1 {
    font-size: 1.5rem;
  }

  .theme-switch {
    margin: 3rem 0.1rem;
  }

  .discordinvite {
    font-size: 15px;
    padding: 0.5rem;
  }

  .invite {
    font-size: 15px;
    padding: 0.5rem;
  }

  h3 {
    text-align: center;
    font-size: 1.2rem;
  }

  .card {
    border: 2px solid var(--item-shadow);
    background: radial-gradient(circle at var(--x) var(--y),
        var(--item-shadow),
        transparent 0px),
      var(--item-shadow);
    background-attachment: fixed;
    background-color: var(--item-color);
    border-radius: 20%;
    padding: 25px;
    height: 50px;
    width: 50px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  }
}
