@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');
@import url('/assets/css/theme.css');

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  background-color: var(--color);
}

body {
  color: var(--color);
  background: var(--background);
  font-family: 'Inter', sans-serif;
  overflow-y:hidden;
}

.hidden {
  display: none;
}

nav {
  display: flex;
  align-items: center;
  background: transparent;
  height: 38px;
  padding: 0 8px;
  font-family: 'Inter', sans-serif;
  max-width: calc(100vw - 100px);
  width: calc(100vw - 100px);
  margin-bottom:3px;
}

#tabs {
  display: flex;
  align-items: center;
  flex: 1;
  overflow-x: auto;
  gap: 5px;
  scrollbar-width: thin;
  scrollbar-color: black;
}


[data-tab-id] {
  background: var(--pallet);
  display: flex;
  align-items: center;
  padding: 10px;
  background: none;
  cursor: pointer;
  user-select: none;
  min-width: 140px;
  max-width: 260px;
  white-space: nowrap;
  border-radius: 10px 10px 0px 0px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 0;
  border-left: 1px solid var(--border);
}

[data-tab-id].active {
  background: var(--pallet-hover);
  border-color: var(--border);
  font-weight: bold;
}

[data-tab-id] img {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border-radius: 2px;
  background: none;
}

[data-tab-id] .tab {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  background: none;
}

[data-tab-id] button {
  margin-left: 6px;
  background: none;
  border: none;
  color: var(--color);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

[data-tab-id] button:hover {
  color: var(--color);
}

#new-tab-btn {
  padding: 7px;
  background: var(--button);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color);
  position: absolute;
  transition: 0.5s;
  top:10px;
  right:10px;
}

#new-tab-btn:hover {
  background: var(--pallet2);
}

.draggable-tab.dragging {
  opacity: 0.5;
}

button:focus {
  outline: 2px solid var(--border);
  outline-offset: 2px;
}

i {
  background: none;
}

hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 12px 16px;
  opacity: 0.5;
}

#form {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
  box-sizing: border-box;
  border-bottom:1px solid var(--border);
}

#form input {
  width: calc(100vw - 300px);
  max-width: 1200px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-sizing: border-box;
  margin: 0;
  display: inline-block;
  vertical-align: middle;
  min-width: calc(100vw - 300px);
  outline: none;
  background-color: var(--input);
  color: var(--color);
  font-family: 'Inter', sans-serif;
  margin-bottom: 10px;
}

.fc {
  border: 1px solid var(--border);
  background: rgba(58, 58, 58, 0.007);
  color: var(--color);
  padding: 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-bottom: 10px;
  text-decoration: none;
}

section {
  height: 350px;
}

.mainContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.menu {
  position: absolute;
  min-width: 180px;
  max-width: 90vw;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 8px;
  transform-origin: top right;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95) translateY(-8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
}

.menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--color);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 6px;
  transition: background 0.15s;
}

.menu a:hover {
  background: var(--pallet-hover);
}

.menu .divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
  opacity: 0.5;
}

#debugOverlay {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  color: var(--color);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  z-index: 99999999999999;
  min-width: 200px;
}

#debugText {
  margin-bottom: 8px;
  line-height: 1.4;
}

#fpsGraph {
  border-radius: 4px;
  background: rgba(137, 180, 250, 0.1);
}

#minBtn {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 10px;
  min-width: auto;
}

#history-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--background);
  border: 1px solid var(--border);
  width: min(800px, 90vw);
  height: 80vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  border-radius: 16px;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.searchframe {
  width: 100%;
  height: calc(100dvh - 120px);
  min-height: calc(100dvh - 120px);
  border: none;
  border-radius: 7px;
}

.tabthing {
  background: var(--pallet-hover);
  padding: 10px;
  height: calc(100vh - 75px);
  min-height: calc(100vh - 75px);
  width: 96.9vw;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.settings-bg {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: none;
}

#settings {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  background-size: cover;
  z-index:999999999999999999999999;
}

.settings {
  z-index: 999999999999;
  background: var(--pallet-hover);
  width: 50vw;
  padding: 10px;
  border: 1px solid var(--border);
  height: calc(80vh - 100px);
  overflow:hidden;
  box-sizing: border-box;
}

select {
  width: 110px;
  padding: 5px 5px 5px;
  outline: none;
  border: none;
  border-radius: 7px;
  background: var(--button);
  color: var(--color);
  font-family: 'Inter', sans-serif;
}

#sidenav {
  position:relative;
  height: calc(75vh - 100px);
  float:left;
  padding:16px;
  border-right:1px solid var(--border);
  display:flex;
  flex-direction: column;
  gap:10px;
  z-index:9999999999;
}

#sidenav a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color);
  font-size: 15px;
  width: 125px;
  padding: 7px;
  background: var(--pallet2);
  text-decoration: none;
  border-radius: 7px;
  border: 1px solid var(--border);
  text-align: center;
}

#sidenav a i {
  font-size: 16px;
  margin:5px;
}


#browsing, #appear, #ext, #misc {
  display: none;
  align-items: center;
  justify-content: center;
}

#appear, #browsing {
  overflow:hidden;
}

#ext, #misc {
  overflow-y: auto;
  overflow-x: hidden;
  flex:1;
  height: calc(100% - 0px);
}


#cloak {
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  flex:1;
  height: calc(100% - 0px);
}

.stuff {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex:1;
  overflow: hidden;
  height: calc(100% - 0px);
}

.box {
  border-bottom:0.9px solid var(--border);
  padding:20px;
  height:auto;
  max-height:260px;
  min-width:500px;
  flex-shrink:0;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.line, #extList {
  border-top: 1px solid var(--border);
}

.fakebox {
  padding:20px;
  height:450px;
  min-width: calc(100vw - (100vw - 500px));
  flex-shrink:0;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  gap:1px;
}

.fakebox p a, .box a {
  color: var(--color);
  text-decoration: underline;
  margin:0;
}

.fakebox h3 {
  margin:0;
}

.box h3 {
  margin:0;
}

.desc {
  font-size:15px;
  color:gray;
}

a {
  cursor:pointer;
}

.switch {
  display: inline-block;
  width: 40px;
  height: 20px;
  position: relative;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 20px;
  transition: 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--pallet2);
  border-radius: 50%;
  transition: 0.3s;
}

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

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

button {
    width:auto;
    border-radius:5px;
    padding:7px;
    background:var(--button);
    color:var(--color);
    border:none;
    appearance:none;
    font-family:'Inter',sans-serif;
    text-align:center;
    max-width:100px;
    cursor:pointer;
}

#titleInput, #faviconInput{
    width: 150px;
    padding: 5px 5px;
    border-radius: 8px;
    border: none;
    outline: none;
    background: var(--pallet2);
    color: var(--color);
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.2s;
}

#siteInject {
    width: 259px;
    padding: 7px 5px;
    border-radius: 8px;
    border: none;
    outline: none;
    background: var(--pallet2);
    color: var(--color);
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.2s;
}

#customcloak:focus, #cfaviconcloak:focus, #siteInject:focus {
    background: #181818;
}

#extCode {
    width: 450px;
    min-height: 200px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    outline: none;
    background: var(--input);
    color: var(--color);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    line-height: 1.5;
    transition: 0.2s;
}

#extCode:focus {
    border-color: var(--color);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.wrap {
    flex-direction: row;
}
