@import '@sweetalert2/theme-borderless/borderless.scss';

:root {
  --background: #181926; 
  --background2: #1e2030;
  --background3: #363a4f;
  --background4: #494d64;
  --shadow: rgba(138, 173, 244, 0.5);
  --blue: #8aadf4;
  --green: #a6da95;
  --mauve: #c6a0f6;
  --text: #cad3f5;
}

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

body {
  font-family: 'Geist';
  background: var(--background);
  color: var(--text);
}

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

svg {
  height: 16px;
  width: 16px;
}

h1 {
  font-size: 35px;
  font-family: 'Montserrat';
}

h6 {
  font-size: 12px;
  color: var(--text) !important;
}

.page button {
  padding: 11px 10px;
  font-size: 16px;
  outline: none;
  border-radius: 15px;
  background: var(--background2);
  color: var(--text);
  border: 1px solid var(--background3);
  font-family: 'Geist';
  cursor: pointer;
  transition: 250ms;
  display: flex;
  align-items: center;
  gap: 5px;
}

.page .buttons, 
.page .theme-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page button:hover {
  background: var(--background3)
}

.page button:disabled {
  background: var(--background4) !important;
  color: var(--shadow) !important;
}

input {
  padding: 11px 10px;
  font-size: 16px;
  outline: none;
  border-radius: 10px;
  background: var(--background2);
  border: 1px solid var(--background3);
  color: var(--text);
  font-family: 'Geist';
  width: 100%;
}

::placeholder {
  color: var(--shadow);
}

select {
  padding: 10px;
  font-size: 16px;
  outline: none;
  border-radius: 10px;
  background: var(--background2);
  color: var(--text);
  font-family: 'Geist' !important;
  border: none;
  width: 30%;
  cursor: pointer;
  transition: 150ms;
}

select:hover {
  background: var(--background3);
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

nav {
  width: 20vw;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}

nav .logo {
  font-family: 'Montserrat' !important;
  display: flex;
  padding: 20px;
  align-items: center;
  text-decoration: none;
  gap: 10px;
  z-index: 5;
}

nav .logo img {
  height: 30px;
  width: 30px;
}

nav .logo .logo-name {
  color: var(--text);
}

nav .tabs hr {
  border: 1px solid var(--shadow);
  border-radius: 1px;
}

.container {
  display: flex;
  height: 100vh;
}

.tabs {
  padding: 15px 0px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: calc(100vh - 188.5px);
  overflow: auto;
}

#tabs-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.tab-btn {
  font-family: 'Geist';
  width: 100%;
  border-radius: 15px;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-size: 16px;
  transition: all 250ms;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--background);
}

.tab-btn:hover {
  background: var(--background2);
}

.tab-btn p {
  margin: 10px 0px;
  font-weight: 600;
}

.tab-btn img {
  height: 16px;
  width: 16px;
  margin: 10.75px 0px;
}

.tab-btn svg {
  margin: 10px 0px;
}

.left {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0px 10px
}

.close-tab {
  border: none;
  cursor: pointer;
  padding: 5px;
  background: transparent;
  color: var(--text);
  transition: 250ms;
  border-radius: 8px;
  margin: 0px 8px;
}

.close-tab:hover {
  background: var(--background4);
}

.close-tab:active {
  transform: scale(0.9);
}

.banner {
  font-size: 1.75vh;
  margin-left: 15px;
  padding: 10px;
  border: 1px solid var(--background3);
  border-radius: 15px;
}

.bottom-nav {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-btn {
  height: 40px;
  width: 40px;
  border-radius: 10px;
  transition: 250ms;
  background: transparent;
  outline: none;
  color: var(--text);
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: var(--background2);
}

.action-btn:active {
  transform: scale(0.9);
}

.action-btn svg {
  height: 20px;
  width: 20px;
}

.refresh:hover svg {
  transform: rotate(360deg);
}

.main-content {
  flex-grow: 1;
  margin: 15px;
  border-radius: 15px;
  background: var(--background2);
  background-size: cover;
  width: calc(100vw - 30px);
  overflow: auto;
  z-index: 2;
}

#clock {
  font-family: 'Montserrat';
  font-size: 30px;
}

h2 {
  font-family: 'Montserrat';
  font-size: 20px;
}

.page {
  display: none;
}

#home-page {
  padding: 100px;
  line-height: 1.5;
  height: 100%;
}

#home-page .welcome {
  background: linear-gradient(45deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
}

#home-page .buttons {
  margin: 25px 0px;
  gap: 20px;
}

#home-page .start,
.game-loader .start {
  background: var(--blue);
  color: var(--background);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  text-align: center;
  text-decoration: none;
  transition: all 250ms;

  font-size: 16px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  font-weight: 600;
}

#home-page .start:hover,
.game-loader .start:hover {
  opacity: 0.8;
}

#home-page .start:active,
.game-loader .start:active {
  transform: scale(1);
}

.home-page-container {
  height: calc(100vh - 230px);
  display: flex;
  justify-content: space-between;
}

.home-page-left {
  display: flex;
  flex-direction: column;
}

.home-page-right {
  width: 25%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.partners {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.partner {
  padding: 10px;
  border: 1px solid var(--background3);
  border-radius: 20px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  transition: 200ms;
}

.partner:hover {
  background: var(--background3);
}

.partner-logo {
  height: 15%;
  width: 15%;
  border-radius: 10px;
}

.partner p {
  font-weight: 700;
  font-size: 24px;
}

.resources {
  text-align: left !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 2;
}

.resources a {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.resources a:hover {
  text-decoration: underline;
}

.server-info p {
  font-size: 12px;
}

#game-page,
#proxy-page,
#ai-page,
#settings-page {
  display: none;
  padding: 100px;
  line-height: 1.5;
  flex-direction: column;
}

#ai-page {
  background: var(--background2);
  padding: 20px;
}

#forum-page {
  width: 100%;
  height: 100%;
}

#embed-container {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  justify-content: center;
  align-items: center;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 15px;
}

.input-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  margin: 50px 0px;
}

.game-search-container {
  padding: 11px 10px;
  font-size: 16px;
  outline: none;
  border-radius: 10px;
  background: var(--background2);
  color: var(--text);
  border: 1px solid var(--background3);
  font-family: 'Geist';
  width: 100%;
  display: flex;
  gap: 10px;
  color: var(--shadow);
  margin: 0;
}

.game-search-container.focused {
  border-color: var(--mauve);
  box-shadow: 0 0 0 2px rgba(203, 166, 247, 0.25);
}

.game-search-container svg {
  width: 18px;
  height: 18px;
}

.game-search {
  background: transparent;
  border-radius: 0px;
  padding: 0px;
  line-height: 1;
  border: none;
}

#category-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#category-buttons button {
  font-size: 14px;
  font-weight: 600;
  border-radius: 100px;
}

.selected-category {
  background: var(--blue) !important;
  color: var(--background) !important;
}

.game-list {
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 30px;
  margin: 20px 0px;
}

.game-btn {
  width: calc(12.5% - 26.25px);
  border-radius: 20px;
  position: relative;
  transition: opacity 1s, transform 150ms !important;
  display: block;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 20px var(--shadow);
  background: var(--background2);
  text-overflow: ellipsis;
}

.game-btn:hover {
  transform: translateY(-5px);
}

.game-btn img {
  width: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  transition: 250ms;
}

.game-btn .content {
  text-align: left;
  font-weight: 700;
  padding: 0px 10px;
  height: 50px;
}

.game-btn .title {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.game-btn .category {
  font-size: 12px;
  font-weight: 300;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.game-btn:active {
  transform: scale(0.995);
}

.hidden {
  opacity: 0;
  transition: opacity 1s;
}

.show {
  opacity: 1;
}

@media(prefers-reduced-motion) {
  .hidden {
    transition: none;
  }
}

/* proxy */

#uv-form {
  padding: 11px 10px;
  font-size: 16px;
  outline: none;
  border-radius: 10px;
  background: var(--background2);
  color: var(--text);
  border: 1px solid var(--background3);
  font-family: 'Geist';
  width: 100%;
  display: flex;
  gap: 10px;
  color: var(--shadow);
  margin: 50px 0px;
}

#uv-form.focused {
  border-color: var(--mauve);
  box-shadow: 0 0 0 2px rgba(203, 166, 247, 0.25);
}

#uv-form i {
  font-size: 18px;
  line-height: 1;
}

#uv-form svg {
  width: 18px;
  height: 18px;
}

#uv-address {
  background: transparent;
  border-radius: 0px;
  padding: 0px;
  line-height: 1;
  border: none;
}

.shortcuts {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.page .shortcut {
  display: flex;
  padding: 15px;
  gap: 20px;
  flex-direction: column;
  font-size: 14px;
  width: calc(12.5% - 17.5px);
}

.shortcut img {
  height: 30px;
  width: 30px;
  border-radius: 10px;
}

#proxy-status {
  margin: 40px 0px;
  padding: 5px 10px;
  border: 1px solid var(--background3);
  border-radius: 20px;
  font-weight: 700;
  width: fit-content;
}

.loader {
  border: 6px solid transparent;
  border-top: 6px solid var(--blue);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loader-container {
  position: absolute;
  display: none;
  background: var(--background2);
  padding: 20px;
  border-radius: 20px;
}

/* AI */

.ai-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0px;
  justify-content: space-between;
}

#chat-display {
  min-height: calc(100vh - 183px);
  background: var(--background2);
  border-radius: 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}

#chat-display.center-message {
  justify-content: center;
  align-items: center;
}

.initial-message {
  font-size: 24px;
  font-weight: 600;
}

.typing-animation {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--blue);
  animation: typing 8s steps(30, end) infinite, blink-caret 0.75s step-end infinite;
  max-width: fit-content;
}

@keyframes typing {
  0% {
    width: 0;
  }

  20% {
    width: 100%;
  }

  40% {
    width: 100%;
  }

  45% {
    width: 0;
  }

  50% {
    width: 0;
  }

  100% {
    width: 0;
  }
}

@keyframes blink-caret {

  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: var(--blue);
  }
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  margin: 5px;
}

.message.user {
  align-self: flex-end;
  text-align: right;
}

.message.ai {
  align-self: flex-start;
  text-align: left;
}

.sender-label {
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 2px;
  color: var(--text);
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 15px;
  max-width: 100%;
  word-wrap: break-word;
  display: inline-block;
  background: var(--blue);
  color: var(--background);
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
}

.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--blue);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing-bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

#ai-page strong {
  font-weight: 700;
}

.loading-message {
  margin: 5px;
}

.message-plain {
  background: transparent;
  color: var(--text);
  padding: 5px 0;
  word-wrap: break-word;
}

.clear-chat {
  background: var(--background2);
  color: var(--text);
  border: 1px solid var(--background3);
  border-radius: 15px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.3s;
  margin-left: auto;
}

.clear-chat:hover {
  background: var(--background3);
}

.clear-chat i {
  height: 16px;
  width: 16px;
}

.page .copy-btn {
  background: transparent;
  color: var(--text);
  border: none !important;
  padding: 5px 10px;
  font-size: 12px !important;
  border-radius: 5px;
  cursor: pointer;
  transition: 200ms;
  width: 25px;
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page .copy-btn:hover {
  background: var(--background3);
}

.code-block {
  position: relative;
  margin: 10px 0px;
}

.code-header {
  display: flex;
  justify-content: flex-end;
  padding: 5px;
  background: var(--background4);
  border-radius: 8px 8px 0 0;
}

#ai-page br {
  height: 0;
}

#ai-page pre {
  background: var(--background3);
  color: var(--text);
  padding: 10px;
  border-radius: 0 0 8px 8px;
  overflow-x: auto;
  white-space: pre-wrap;
}

#ai-page code {
  background: var(--background3);
  color: var(--text);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: 'Geist Mono';
  font-size: 12px;
}

#ai-page pre code {
  display: block;
  padding: 0;
}

#ai-page .bottom {
  margin: 0;
  padding: 0;
}

#ai-page .bottom .input-container {
  display: flex;
  width: 100%;
  gap: 10px;
  flex-direction: row;
  margin: 0;
  padding: 5px;
  font-size: 16px;
  outline: none;
  border-radius: 22.75px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--background3);
  width: 100%;
}

#ai-page .bottom .input-container.focused {
  border-color: var(--mauve);
  box-shadow: 0 0 0 2px rgba(203, 166, 247, 0.25);
}

#ai-page .bottom .input-container #input-box {
  background: transparent;
  padding: 8px 10px;
  border: none;
}

#ai-page .bottom .input-container #submit-btn {
  background: var(--blue);
  color: var(--background);
  width: 35.5px;
  height: 35.5px;
  border-radius: 17.75px;
  display: flex;
  justify-content: center !important;
  align-items: center !important;
  font-size: 20px;
}

#submit-btn:active {
  opacity: 0.6;
}

/* settings */

.settings-container {
  width: 100%;
  margin: 30px 0px;
}

.settings-tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  gap: 20px;
  padding: 15px;
  background: var(--background2);
  border-radius: 40px;
}

.tab-link {
  border-radius: 100px !important;
  font-weight: 700;
  width: 100%;
  justify-content: center;
}

.tab-link:hover {
  background: var(--background3);
}

.tab-link:active {
  transform: scale(0.98);
}

.tab-active {
  background: var(--background4) !important;
}

.tab-link svg {
  height: 18px;
  width: 18px;
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.setting-card {
  background: var(--background2);
  border-radius: 15px;
  border: 1px solid var(--background3);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-card select {
  background: var(--background3);
}

.setting-card select:hover {
  background: var(--background4);
}

.cards-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wallpaper-card {
  width: calc(25% - 7.5px);
  text-align: center;
  border-radius: 15px;
  cursor: pointer;
  transition: 250ms;
  padding: 10px;
  border: 3px solid var(--shadow);
}

.wallpaper-card:active {
  transform: scale(0.98);
}

.wallpaper-card img {
  width: 100%;
  border-radius: 10px;
}

.selected {
  border-color: #f5a97f;
}

.theme-buttons button {
  border: none;
}

.theme-buttons button:hover {
  transform: scale(0.97)
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background4);
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: var(--text);
  transition: 0.4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--blue);
}

input:checked+.slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.dropdown {
  position: relative;
  display: inline-block;
  width: 200px;
}

.page .dropdown-button {
  width: 100%;
  text-align: left;
  justify-content: space-between;
  border: 1px solid var(--background3);
  border-radius: 15px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: var(--background2);
  border: 1px solid var(--background3);
  z-index: 1;
  width: 100%;
  max-height: 200px;
  border-radius: 15px;
  overflow-y: auto;
  padding: 5px;
  margin: 5px 0px;;
  list-style: none;
  gap: 5px;
  flex-direction: column;
}

.dropdown-menu li {
  padding: 5px 10px;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  border-radius: 10px;
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.dropdown-menu li p {
  font-weight: 500;
}

.dropdown-menu li span {
  font-size: 14px;
}

.dropdown-menu li:last-child {
  border-bottom: none;
}

.dropdown-menu li:hover {
  background-color: var(--background3);
}

.dropdown-selected {
  font-weight: bold;
  color: var
}

.dropdown.open .dropdown-menu {
  display: block;
}

.credit-card {
  width: calc(25% - 7.5px);
  text-align: center;
  border-radius: 15px;
  transition: 250ms;
  padding: 10px;
  border: 3px solid var(--shadow);
}

.credit-pfp {
  width: 100px;
  border-radius: 50%;
}

.discord-user {
  font-size: 12px;
  margin: 0px 0px 10px 0px;
}

/* loader */

.game-loader {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

@media screen and (max-width: 1700px) {
  .game-btn {
    width: calc(16.66666667% - 25px)
  }
}

@media screen and (max-width: 1500px) {
  .game-btn {
    width: calc(20% - 24px)
  }
}

@media screen and (max-width: 1300px) {
  .game-btn {
    width: calc(25% - 22.5px)
  }
}

@media screen and (max-width: 1100px) {
  .game-btn {
    width: calc(33% - 20px)
  }

  .credit-card {
    width: calc(50% - 15px);
  }

  .page .shortcut {
    width: calc(16.6667% - 16.6667px)
  }

  .action-btn {
    width: 35px;
    height: 35px;
  }
}

@media screen and (max-width: 1000px) {
  .banner {
    font-size: 1.5vh;
  }

  .tabs {
    height: calc(100vh - 187px);
  }
}

@media screen and (max-width: 800px) {
  nav {
    width: 50px;
  }

  .home-page-container {
    flex-direction: column;
  }

  #home-page,
  #game-page,
  #proxy-page,
  #ai-page,
  #settings-page {
    padding: 20px !important;
  }

  .main-content {
    width: calc(100% - 50px);
  }

  .logo h2,
  .logo h6 {
    display: none;
  }

  .tab-btn p {
    display: none;
  }

  .tab-btn i {
    margin: 10px 0px;
  }

  .tabs {
    height: calc(100vh - 230px);
  }

  .bottom-nav {
    flex-direction: column;
    padding: 0px;
    align-self: flex-end;
  }

  .game-btn {
    width: calc(50% - 30px);
  }

  .credit-card {
    width: 100%;
  }

  .page .shortcut {
    width: calc(25% - 15px)
  }
}