@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");
* {
  box-sizing: border-box;
}
#random-text {
  color: #00f2ff;
}
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  color: #b1e8fc;
  background-color: #00082e;
  background-image:
    linear-gradient(160deg, #0a7fae 0%, #066b99 30%, #001a4d 70%, #00082e 100%);
  background-attachment: fixed;
  font-family: Outfit;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  h1 {
    font-size: 45px;
  }
  p {
    a {
      color: #00f2ff;
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    a:hover {
      color: #00eaff;
    }
  }
  h3 {
    a {
      color: rgb(255, 0, 0);
      color: rgb(1, 0, 45);
    }
  }
}

.search-bar-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.search-bar {
  font-family: Outfit, sans-serif;
  font-size: 1.1em;
  border-radius: 10px;
  border: none;
  width: 420px;
  max-width: 90vw;
  padding: 0.8em 1.5em;
  box-shadow: 0 2px 12px rgba(0, 100, 100, 0.25);
  outline: none;
  margin-bottom: 20px;
  background: #022c3a;
  color: #066b99;
  transition: width 0.2s ease, box-shadow 0.2s;
}

.search-bar:focus {
  width: 700px;
  box-shadow: 0 4px 24px #00808055;
}

.link {
  display: block;
  padding: 0.8em 1.5em;
  margin: 10px 0;
  text-align: center;
  text-decoration: none;
  color: #b1e8fc;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  transition: background-color 0.2s;
}
nav {
  position: sticky;
  top: 12px;
  z-index: 1000;
  font-family: Outfit;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  gap: 1.3rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(1,15,21,0.45);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 12px auto 0;
}

nav .nav-home-btn {
  padding: 0.4rem;
  background: transparent;
  border: solid 1px #9f9f9f;
  border-radius: 0.2rem;
}
nav .nav-home-btn img {
  height: 40px;
  width: 40px;
  display: block;
}

nav a,
nav button,
nav .nav-btn {
  font-family: Outfit;
  display: inline-block;
  min-width: 0;
  padding: 0.4rem;
  border-radius: 50%;
  border: none;
  text-align: center;
  text-decoration: none;
  color: #00eaff;
  background: transparent;
  cursor: pointer;
}

nav button:hover {
  transition: 0.3s;
  transform: scale(1.05);
}

nav a[aria-current="page"],
nav button[aria-current="page"],
nav .nav-btn[aria-current="page"] {
  font-family: Outfit;
  color: #000;
  background-color: #066b99;
  border-radius: 50%;
}
nav .nav-home-btn[aria-current="page"] {
  background: transparent;
  color: #00eaff;
  border-radius: 0.2rem;
}

main {
  padding: 1rem;
}

h1 {
  font-weight: bold;
  font-size: 1.5rem;
}

p {
  text-align: center;
}
#main {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1 0 auto;
  padding: 1rem;
}

#games {
  text-align: center;
  #request {
    color: #ff0000;
    background-color: rgb(0, 0, 0);
    padding: 0.82em 0.8em;
  }
  select {
    font-family: Outfit;
    background-color: rgb(0, 242, 255);
    border-radius: 10px;
  }
  img {
    border-radius: 15px;
    display: block;
  }
  button {
    position: relative;
    font-size: 14px;
    font-size: 18px;
    text-decoration: none;
    display: inline-block;
    border-radius: 30px;
    border-radius: 15px;
    transition: all 0.2s;
    border: none;
    appearance: none;
    font-family: Outfit;
    font-weight: 425;
    background-color: rgb(0, 0, 0);
    padding: 0.4em 0.4em;
    margin: 5px;
    color: rgb(0, 242, 255);
  }
  .button:hover {
    transform: translateY(-3px);
    box-shadow: none;
  }

  .button:active {
    transform: translateY(-1px);
  }

  .button::after {
    content: "";
    display: inline-block;
    height: 100%;
    width: 100%;
    border-radius: 12px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
  }

  .button:hover::after {
    transform: scaleX(1.4) scaleY(1.6);
    opacity: 0;
  }
}

#game-buttons .button {
  background: transparent;
  padding: 0;
  margin: 8px;
}

#game-buttons .button img {
  margin: 0 auto;
}

#tool-buttons .button {
  background: transparent;
  padding: 0;
  margin: 8px;
}

#tool-buttons .button img {
  margin: 0 auto;
}

.tile-label {
  display: block;
  max-width: 130px;
  margin: 4px auto 0;
  color: rgb(0, 242, 255);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-star {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
  line-height: 30px;
  text-align: center;
  border-radius: 8px;
  background: rgba(1, 15, 21, 0.45);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #5f7d8c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 19px;
  opacity: 1;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, color 0.15s, box-shadow 0.15s;
}

.fav-star:hover {
  transform: scale(1.15);
}

.fav-star.on {
  color: #ffd700;
  opacity: 1;
  border-color: rgba(255, 215, 0, 0.8);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.9);
}

#game-buttons .button:hover .fav-star {
  opacity: 1;
}

body[data-theme="light"] .fav-star {
  background: rgba(255, 255, 255, 0.55);
  color: #6e7a84;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body[data-theme="light"] .fav-star.on {
  color: #b8860b;
  border-color: rgba(184, 134, 11, 0.8);
  box-shadow: 0 0 10px rgba(184, 134, 11, 0.5);
  text-shadow: none;
}

body[data-theme="fall"] .fav-star {
  background: rgba(28, 14, 4, 0.5);
  color: #a0764a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme="primordial"] .fav-star {
  background: rgba(0, 0, 0, 0.55);
  color: #8a8a8a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme="fall"] .fav-star.on {
  color: #ffa14d;
  border-color: rgba(255, 161, 77, 0.9);
  box-shadow: 0 0 10px rgba(255, 161, 77, 0.7);
  text-shadow: 0 0 6px rgba(255, 161, 77, 0.9);
}

#recent-buttons {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  justify-content: center;
  padding: 8px;
}

.recent-thumb {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: all 0.2s;
}

.recent-thumb:hover {
  transform: translateY(-3px);
}

body[data-theme="dark"] {
  color: #b1e8fc;
  background-color: #000;
  background-image:
    linear-gradient(160deg, #043a5c 0%, #032f4c 30%, #000a24 70%, #000000 100%);
}


body[data-theme="dark"] nav {
  background: rgba(0, 0, 0, 0.55);
}

body[data-theme="light"] {
  color: #000;
  background-color: #e9f7fc;
  background-image:
    linear-gradient(160deg, #bfe6f2 0%, #d8eff7 30%, #f2fafd 70%, #ffffff 100%);
}


body[data-theme="light"] .tile-label {
  color: #000;
}

body[data-theme="light"] #random-text {
  color: #000;
}

body[data-theme="light"] #settings-status {
  color: #000;
}

body[data-theme="light"] .site-logo-img {
  filter: brightness(0);
}

body[data-theme="light"] .setting-section {
  background: rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] p a {
  color: #000;
}

body[data-theme="light"] p a:hover {
  color: #000;
}

body[data-theme="light"] .search-bar {
  background: #ffffff;
  color: #000;
  border: 1px solid rgba(4, 112, 143, 0.35);
  box-shadow: 0 2px 12px rgba(4, 112, 143, 0.18);
}

body[data-theme="light"] nav {
  background: rgba(10, 30, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body[data-theme="light"] #games button {
  background-color: #ffffff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

body[data-theme="light"] .link {
  color: #000;
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(4, 112, 143, 0.25);
}

body[data-theme="primordial"] {
  color: #fff;
  background-color: #000;
  background-image:
    linear-gradient(160deg, #1a1a1a 0%, #0d0d0d 30%, #050505 70%, #000000 100%);
}

body[data-theme="primordial"] .tile-label {
  color: #fff;
}

body[data-theme="primordial"] #random-text {
  color: #fff;
}

body[data-theme="primordial"] #settings-status {
  color: #fff;
}

body[data-theme="primordial"] p a {
  color: #fff;
}

body[data-theme="primordial"] p a:hover {
  color: #ccc;
}

body[data-theme="primordial"] .search-bar {
  background: #0d0d0d;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.12);
}

body[data-theme="primordial"] #games button {
  background-color: #0d0d0d;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

body[data-theme="primordial"] .link {
  color: #fff;
  background-color: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

body[data-theme="primordial"] .setting-section {
  background: rgba(20, 20, 20, 0.8);
}

body[data-theme="primordial"] nav {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body[data-theme="primordial"] nav a,
body[data-theme="primordial"] nav button,
body[data-theme="primordial"] nav .nav-btn {
  color: #fff;
}

body[data-theme="primordial"] #game-buttons .button img,
body[data-theme="primordial"] #tool-buttons .button img,
body[data-theme="primordial"] .recent-thumb,
body[data-theme="primordial"] nav img {
  filter: grayscale(1);
}

body[data-theme="primordial"] .fav-star.on {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  text-shadow: 0 0 6px #fff;
}

body[data-theme="primordial"] .site-logo-img {
  display: none;
}

body[data-theme="primordial"] .site-logo-text {
  display: block;
  font-size: 0;
  color: #fff;
}

body[data-theme="primordial"] .site-logo-text::after {
  content: "BlackoutGames";
  font-size: 64px;
}

body[data-theme="fall"] {
  color: #ffe9c9;
  background-color: #241105;
  background-image:
    linear-gradient(160deg, #9a5416 0%, #7a3f0e 30%, #4a2408 70%, #241105 100%);
}

body[data-theme="fall"] .tile-label {
  color: #ffa14d;
}

body[data-theme="fall"] #random-text {
  color: #ffa14d;
}

body[data-theme="fall"] #settings-status {
  color: #ffa14d;
}

body[data-theme="fall"] .site-logo-img {
  filter: none;
}

body[data-theme="fall"] .setting-section {
  background: rgba(20, 10, 3, 0.55);
}

body[data-theme="fall"] p a {
  color: #ffa14d;
}

body[data-theme="fall"] p a:hover {
  color: #ffc37e;
}

body[data-theme="fall"] .search-bar {
  background: #3a1c07;
  color: #ffe9c9;
  border: 1px solid rgba(240, 136, 42, 0.4);
  box-shadow: 0 2px 12px rgba(240, 136, 42, 0.18);
}

body[data-theme="fall"] nav {
  background: rgba(28, 14, 4, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body[data-theme="fall"] #games button {
  background-color: #140a03;
  color: #f0882a;
  border: 1px solid rgba(240, 136, 42, 0.3);
}

body[data-theme="fall"] .link {
  color: #ffe9c9;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(240, 136, 42, 0.25);
}

body[data-theme="fall"] .search-bar:focus {
  box-shadow: 0 4px 24px rgba(240, 136, 42, 0.35);
}

body[data-theme="fall"] nav a,
body[data-theme="fall"] nav button,
body[data-theme="fall"] nav .nav-btn {
  color: #ffa14d;
}

body[data-theme="fall"] nav a[aria-current="page"],
body[data-theme="fall"] nav button[aria-current="page"],
body[data-theme="fall"] nav .nav-btn[aria-current="page"] {
  color: #241105;
  background-color: #ffa14d;
}

body[data-theme="fall"] nav .nav-home-btn[aria-current="page"] {
  color: #ffa14d;
}

body[data-theme="fall"] #games select {
  background-color: #3a1c07;
  color: #ffe9c9;
  border: 1px solid rgba(240, 136, 42, 0.3);
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  background: rgba(1, 15, 21, 0.55);
  border-bottom: 1px solid rgba(0, 242, 255, 0.25);
  padding: 0.4em 0;
  font-family: Outfit, sans-serif;
  font-size: 0.95em;
  color: #b1e8fc;
}

.ticker-track {
  display: inline-flex;
  animation: ticker-scroll 35s linear infinite;
}

.ticker-track span {
  padding-right: 3em;
}

.ticker-track a {
  color: #00eaff;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  to { transform: translateX(-50%); }
}

body[data-theme="light"] .ticker {
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(4, 112, 143, 0.25);
  color: #000;
}

body[data-theme="light"] .ticker-track a {
  color: #000;
}

body[data-theme="primordial"] .ticker {
  background: rgba(0, 0, 0, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

body[data-theme="primordial"] .ticker-track a {
  color: #fff;
}

body[data-theme="fall"] .ticker {
  background: rgba(28, 14, 4, 0.6);
  border-bottom: 1px solid rgba(240, 136, 42, 0.4);
  color: #ffe9c9;
}

body[data-theme="fall"] .ticker-track a {
  color: #ffa14d;
}
