@import "https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&display=swap";

:root {
  --g0: #08080b;
  --g1: #0f0f14;
  --g2: #16161d;
  --g3: #1e1e27;
  --g4: #2a2a36;
  --text: #e4e4ef;
  --muted: #888898;
  --accent: #9898c8;
  --glass: rgba(255,255,255,0.04);
  --glass-b: rgba(255,255,255,0.09);
  --glass-hl: rgba(255,255,255,0.13);
  --blur: blur(20px) saturate(140%);
}

.hover-focus1 { transition: 0.15s ease-in-out; }
.hover-focus1:hover:not(.selectedTab) { background-color: rgba(255,255,255,0.07) !important; }
.hover-focus2 { transition: 0.15s ease-in-out; }
.hover-focus2:hover:not(.selectedTab) { background-color: rgba(255,255,255,0.09) !important; }

.sidebar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20vw;
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
}

.sidebar-container header {
  display: flex;
  width: 20vw;
  height: 99vh;
  margin: 0;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex-shrink: 0;
  border-radius: 0.5rem;
  position: absolute;
  left: 0.5rem;
  transition: 0.2s ease-in-out;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  background: rgba(10,10,15,0.7);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow:
    0 8px 40px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.sidebar-container header.closed {
  background: rgba(10,10,15,0.8);
  border: 1px solid rgba(255,255,255,0.07);
  position: fixed;
}

.sidebar-container header.closed:not(:hover):not(.hovered) { transform: translateX(-120%); }

.sidebar-container header .page-data { width: 95%; padding: 0.5rem 0; }

.sidebar-container header .page-data #controls {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-container header .page-data #controls button {
  background-color: transparent;
  border: none;
  outline: none;
  color: var(--muted);
  font: inherit;
  font-family: 'Sora', sans-serif;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: color 0.15s;
}

.sidebar-container header .page-data #controls button:hover { color: var(--text); }

.sidebar-container header .page-data #controls button .tooltip {
  padding: 5px 8px;
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: rgba(20,20,30,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text);
  visibility: hidden;
  opacity: 0;
  transition: 0.15s ease;
  border-radius: 7px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.sidebar-container header .page-data #controls button:hover .tooltip {
  visibility: visible;
  opacity: 1;
  top: 28px;
}

.logo-name {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.sidebar-container header .page-data #controls button .icon {
  font-size: 1.2rem;
  padding: 0.4rem;
  border-radius: 8px;
}

.sidebar-container header .page-data #controls button svg {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 0.5rem;
  margin: 0;
}

.sidebar-container header .page-data #url-form {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-container header .page-data #url-form input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  outline: none;
  color: var(--text);
  font: inherit;
  font-family: 'Sora', sans-serif;
  padding: 0.5rem 0.75rem;
  box-sizing: border-box;
  border-radius: 8px;
  font-size: 0.8rem;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.sidebar-container header .page-data #url-form input:focus {
  border-color: rgba(140,140,210,0.3);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(100,100,180,0.08);
}

.sidebar-container header .page-data #new-tab {
  width: 100%;
  margin-top: 0.75rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  outline: none;
  color: var(--text);
  font: inherit;
  font-family: 'Sora', sans-serif;
  padding: 0.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar-container header .page-data #new-tab:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.13);
}

.sidebar-container header .page-data #new-tab .icon { font-size: 1.2rem; }

@keyframes slide-in-from-top {
  0%   { transform: translateY(-15%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.r-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(20,20,28,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  z-index: 1000;
  color: var(--text);
}

.r-alert p { margin: 0; font-size: 13px; }

header #tab-list {
  height: 70vh;
  overflow: scroll;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.4rem;
}

header #tab-list .tab-item {
  position: relative;
  display: flex;
  gap: 0.5rem;
  width: 95%;
  border-radius: 8px;
  background: transparent;
  justify-content: flex-start;
  align-items: center;
  cursor: pointer;
  border: none;
  outline: none;
  padding: 0.5rem;
  font: inherit;
  font-family: 'Sora', sans-serif;
  color: var(--muted);
  font-weight: 400;
  animation: slide-in-from-top 0.15s ease;
  transition: background 0.12s, color 0.12s;
}

header #tab-list .tab-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }

header #tab-list .tab-item img { height: 1.25em; }

header #tab-list .tab-item span {
  font: inherit;
  color: inherit;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 80%;
  text-align: left;
}

header #tab-list .tab-item .close {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  outline: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1/1;
  transition: background 0.12s;
  width: 20px; height: 20px;
}

header #tab-list .tab-item .close:hover { background: rgba(255,255,255,0.12); }

header #tab-list .tab-item .close .close-icon {
  font-size: 1rem;
  color: transparent;
  height: 1rem;
  width: 1rem;
}

header #tab-list .tab-item.selectedTab {
  background: rgba(255,255,255,0.09);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.07);
}

header #tab-list .tab-item:hover .close-icon { color: var(--muted); }

#tab-view {
  width: 80vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 0;
  padding: 0;
  margin: 0;
}

#tab-view.full-width { width: 100vw; }

#tab-view .tab-frame {
  height: 97%;
  width: 98%;
  background-color: #fff;
  border-radius: 10px;
  border: none;
  outline: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
}

#small-screen-overlay {
  display: none;
  position: fixed;
  justify-content: center;
  align-items: center;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text);
  text-align: center;
  z-index: 2000;
  font-size: 16px;
  padding: 20px;
}

@media (max-width: 600px) { #small-screen-overlay { display: flex; } }

#menu-overlay {
  position: fixed;
  top: 48px; left: 0;
  width: calc(20vw + 10px);
  height: calc(100% - 48px);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: rgba(10,10,16,0.88);
  border-right: 1px solid rgba(255,255,255,0.07);
  transform: translateX(-100%);
  transition: 0.2s ease;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
  box-shadow: 8px 0 32px rgba(0,0,0,0.3);
}

#menu-overlay.active { transform: translateX(0); }

.option {
  color: var(--text);
  margin-bottom: 5px;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.15s, border-color 0.15s;
  border-radius: 8px;
  width: 95%;
  font-size: 13.5px;
  font-family: 'Sora', sans-serif;
}

.option:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.12);
}

::-webkit-scrollbar { width: 0; height: 0; }
