:root {
  --bg: #0a0a0f;
  --bg-secondary: #12121a;
  --fg: #ffffff;
  --muted: #6b7280;
  --accent: #8b5cf6;
  --accent-dim: rgba(139, 92, 246, 0.15);
  --glass: rgba(18, 18, 26, 0.8);
  --glass-border: rgba(255, 255, 255, 0.06);
  --card: rgba(20, 20, 30, 0.6);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --sidebar-width: 240px;
  --blur-amount: blur(20px);
  --blur-sidebar: blur(40px);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --fg: #0f172a;
  --muted: #64748b;
  --accent: #7c3aed;
  --accent-dim: rgba(124, 58, 237, 0.1);
  --glass: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0, 0, 0, 0.08);
  --card: rgba(255, 255, 255, 0.8);
}

[data-theme="ocean"] {
  --bg: #0c1929;
  --bg-secondary: #132238;
  --fg: #e0f2fe;
  --muted: #7dd3fc;
  --accent: #06b6d4;
  --accent-dim: rgba(6, 182, 212, 0.15);
  --glass: rgba(12, 25, 41, 0.85);
  --glass-border: rgba(6, 182, 212, 0.15);
  --card: rgba(19, 34, 56, 0.7);
}

[data-theme="forest"] {
  --bg: #0a1410;
  --bg-secondary: #0f1f18;
  --fg: #dcfce7;
  --muted: #86efac;
  --accent: #22c55e;
  --accent-dim: rgba(34, 197, 94, 0.15);
  --glass: rgba(10, 20, 16, 0.85);
  --glass-border: rgba(34, 197, 94, 0.15);
  --card: rgba(15, 31, 24, 0.7);
}

[data-theme="earthy"] {
  --bg: #f5f0e6;
  --bg-secondary: #ebe5d8;
  --fg: #3d3929;
  --muted: #7a7260;
  --accent: #8b7355;
  --accent-dim: rgba(139, 115, 85, 0.12);
  --glass: rgba(245, 240, 230, 0.92);
  --glass-border: rgba(139, 115, 85, 0.15);
  --card: rgba(235, 229, 216, 0.8);
}

[data-theme="neon"] {
  --bg: #000000;
  --bg-secondary: #0a0a0a;
  --fg: #ffffff;
  --muted: #888888;
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.1);
  --glass: rgba(10, 10, 10, 0.95);
  --glass-border: rgba(0, 255, 136, 0.3);
  --card: rgba(20, 20, 20, 0.9);
}

[data-theme="sunset"] {
  --bg: #1a0a0f;
  --bg-secondary: #2a1018;
  --fg: #fce7f3;
  --muted: #f9a8d4;
  --accent: #f472b6;
  --accent-dim: rgba(244, 114, 182, 0.15);
  --glass: rgba(26, 10, 15, 0.85);
  --glass-border: rgba(244, 114, 182, 0.15);
  --card: rgba(42, 16, 24, 0.7);
}

[data-blur="false"] {
  --blur-amount: blur(0px);
  --blur-sidebar: blur(0px);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  background-color: #0a0a0f;
  color: var(--fg);
  color: #ffffff;
  line-height: 1.5;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Base Button Styles */
button {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

button:active {
  transform: scale(0.98);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--fg);
}

/* Button hover - outline + grow effect */
.nav-link:hover,
.nav-link.active,
.footer-link:hover,
.fullpage-btn:hover,
.game-card:hover,
.games-option:hover,
.cloak-btn:hover,
.bypass-btn:hover,
.partner-card:hover,
.theme-btn:hover,
.info-box-link:hover,
.legal-tab:hover {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transform: scale(1.02);
  transition: transform 0.2s ease, outline 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent-dim);
  color: var(--fg);
}

/* Specific grow intensities */
.game-card:hover {
  transform: scale(1.03) translateY(-2px);
}

.games-option:hover {
  transform: scale(1.02) translateY(-3px);
}

.partner-card:hover {
  transform: scale(1.02) translateY(-4px);
}

.bypass-btn.panic:hover {
  outline-color: var(--danger);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  background-color: #0a0a0f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  margin-bottom: 24px;
}

.loading-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.loading-bar-container {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: var(--accent);
  width: 0;
  animation: load 0.8s ease-out forwards;
}

@keyframes load {
  0% { width: 0; }
  100% { width: 100%; }
}

.loading-text {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* Panic Overlay */
.panic-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.panic-overlay.active {
  display: flex;
}

.panic-overlay i {
  font-size: 64px;
  color: var(--danger);
  margin-bottom: 20px;
}

.panic-overlay span {
  font-size: 24px;
  font-weight: 700;
}

/* Stats Overlay */
.stats-overlay {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--glass);
  backdrop-filter: var(--blur-amount);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 12px;
  z-index: 200;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.stats-overlay.visible {
  display: flex;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.stat-label { color: var(--muted); font-weight: 500; }
.stat-value { font-weight: 700; }
.stat-value.good { color: var(--success); }
.stat-value.warn { color: var(--warning); }
.stat-value.bad { color: var(--danger); }

/* App */
.app {
  display: flex;
  height: 100vh;
  position: relative;
  background: #0a0a0f;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  width: 240px;
  background: var(--glass);
  background-color: rgba(18, 18, 26, 0.9);
  backdrop-filter: var(--blur-sidebar);
  border-radius: 0 32px 32px 0;
  border: 1px solid var(--glass-border);
  border-left: none;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.sidebar.collapsed {
  transform: translateX(-100%);
  opacity: 0;
}

.sidebar.open {
  transform: translateX(0);
  opacity: 1;
}

.sidebar-close-btn,
.sidebar-open-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 2px solid var(--glass-border);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: inherit;
  transition: transform 0.2s ease, outline 0.2s ease;
}

.sidebar-close-btn:hover,
.sidebar-open-btn:hover {
  transform: scale(1.1);
}

.sidebar-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 101;
}

.sidebar-open-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 99;
  display: none;
}

.sidebar-open-btn.visible {
  display: flex;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin-bottom: 20px;
}

.logo img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
}

.time-card {
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.time {
  font-size: 28px;
  font-weight: 600;
}

.date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.nav-list {
  list-style: none;
  flex: 1;
}

.nav-item {
  margin-bottom: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link i {
  width: 20px;
  font-size: 16px;
  text-align: center;
}

.sidebar-footer {
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
  margin-top: 8px;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.2s ease;
}

.footer-link i {
  width: 18px;
  font-size: 15px;
}

/* Main Content */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  transition: margin-left 0.3s ease;
}

.main-wrapper.expanded {
  margin-left: 0;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: #0a0a0f;
}

.main-header {
  text-align: center;
  margin-bottom: 48px;
}

.main-title {
  font-size: 72px;
  font-weight: 900;
  letter-spacing: -4px;
  margin-bottom: 12px;
  color: #ffffff;
}

.main-subtitle {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

/* Info Boxes */
.info-box {
  width: 100%;
  max-width: 560px;
  background: var(--glass);
  background-color: rgba(18, 18, 26, 0.8);
  backdrop-filter: var(--blur-amount);
  border: 1px solid var(--glass-border);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
}

.info-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.info-box-header i {
  color: var(--accent);
  font-size: 18px;
}

.info-box-title {
  font-size: 16px;
  font-weight: 700;
}

.info-box-content {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.info-box-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.info-box-content li {
  margin-bottom: 4px;
}

.info-box-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 18px;
  background: var(--accent-dim);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease;
}

/* Full Page View */
.fullpage-view {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  z-index: 50;
}

.fullpage-view.active {
  display: flex;
}

.fullpage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--glass);
  backdrop-filter: var(--blur-amount);
  border-bottom: 1px solid var(--glass-border);
  min-height: 56px;
}

.fullpage-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fullpage-title i {
  color: var(--accent);
}

.fullpage-btns {
  display: flex;
  gap: 8px;
}

.fullpage-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: transform 0.2s ease;
}

.fullpage-btn.home-btn {
  background: var(--accent);
  color: #fff;
}

.fullpage-btn.accent-btn {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.fullpage-body {
  flex: 1;
  overflow: hidden;
}

.fullpage-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Games Menu */
.games-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.games-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 160px 120px, #fff, transparent),
    radial-gradient(1px 1px at 220px 150px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 300px 30px, #fff, transparent);
  background-color: #0a0a12;
  background-repeat: repeat;
  background-size: 400px 300px;
  z-index: 0;
}

.games-option {
  width: 100%;
  max-width: 400px;
  padding: 28px;
  background: rgba(15, 15, 25, 0.85);
  backdrop-filter: var(--blur-amount);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  cursor: pointer;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, border-color 0.2s ease;
}

.games-option:hover {
  border-color: var(--accent);
}

.games-option i {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--accent);
}

.games-option-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.games-option-desc {
  font-size: 13px;
  color: var(--muted);
}

.games-row {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 840px;
  position: relative;
  z-index: 1;
}

.games-row .games-option {
  flex: 1;
  max-width: none;
}

/* 2nd Games Grid */
.second-games {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-top: 80px;
}

.second-games-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  padding: 16px 24px;
  background: var(--bg);
  z-index: 50;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: center;
}

.main-wrapper.expanded .second-games-header {
  left: 0;
}

.second-games-search {
  padding: 12px 20px;
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  border: 2px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur-amount);
  color: var(--fg);
  font-size: 15px;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.second-games-search:focus {
  border-color: var(--accent);
  outline: none;
}

.second-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  text-align: center;
  padding: 12px;
  background: var(--glass);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.2s ease;
}

.game-card:hover {
  border-color: var(--accent);
}

.game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bg-secondary);
}

.game-card p {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Game Player */
.game-player-view {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  z-index: 60;
}

.game-player-view.active {
  display: flex;
}

.game-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--glass);
  backdrop-filter: var(--blur-amount);
  border-bottom: 1px solid var(--glass-border);
  min-height: 56px;
}

.game-player-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-player-title i {
  color: var(--accent);
}

.game-player-btns {
  display: flex;
  gap: 8px;
}

.game-player-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.game-player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.game-player-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.game-player-loading i {
  font-size: 48px;
  color: var(--accent);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.game-player-loading span {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.game-player-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: var(--bg);
}

.pointer-lock-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  z-index: 100;
}

.pointer-lock-hint.visible {
  opacity: 1;
}

/* FPS Boost */
.fps-boost-mode * {
  animation: none !important;
  transition: none !important;
}

.fps-boost-mode [style*="backdrop-filter"] {
  backdrop-filter: none !important;
}

.fps-boost-mode .loading-screen,
.fps-boost-mode .stats-overlay {
  display: none !important;
}

/* Chat Page */
.chat-page {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  z-index: 50;
}

.chat-page.active {
  display: flex;
}

.chat-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.chat-body widgetbot {
  border-radius: 0;
  display: block;
}

/* Partners Page */
.partners-page {
  position: absolute;
  inset: 0;
  background: var(--bg);
  overflow-y: auto;
  display: none;
  z-index: 50;
}

.partners-page.active {
  display: block;
}

.partners-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.partners-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--card);
  border-radius: 12px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 24px;
  border: none;
  font-family: inherit;
  transition: transform 0.2s ease;
}

.partners-back:hover {
  transform: scale(1.02);
}

.partners-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.partners-title {
  font-size: 28px;
  font-weight: 800;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.partner-card {
  background: var(--glass);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.3s ease, border-color 0.2s ease;
}

.partner-card:hover {
  border-color: var(--accent);
}

.partner-logo-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo-wrap i {
  font-size: 32px;
  color: #fff;
}

.partner-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.partner-desc {
  color: var(--muted);
  font-size: 14px;
}

/* Settings Page */
.settings-page {
  position: absolute;
  inset: 0;
  background: var(--bg);
  overflow-y: auto;
  display: none;
  z-index: 50;
}

.settings-page.active {
  display: block;
}

.settings-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.settings-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--card);
  border-radius: 12px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 24px;
  border: none;
  font-family: inherit;
  transition: transform 0.2s ease;
}

.settings-back:hover {
  transform: scale(1.02);
}

.settings-header {
  text-align: center;
  margin-bottom: 32px;
}

.settings-title {
  font-size: 28px;
  font-weight: 800;
}

.settings-section {
  margin-bottom: 32px;
}

.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-section-title i {
  color: var(--accent);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
}

.theme-btn {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid var(--glass-border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--fg);
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.theme-btn.active {
  border-color: var(--accent);
}

.theme-btn.active::after {
  content: '\2713';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 12px;
}

.theme-dark { background: #0a0a0f; }
.theme-light { background: #f8fafc; color: #0f172a; }
.theme-ocean { background: #0c1929; }
.theme-forest { background: #0a1410; }
.theme-earthy { background: #f5f0e6; color: #3d3929; }
.theme-neon { background: #000; }
.theme-sunset { background: #1a0a0f; }

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--glass-border);
}

.toggle-text {
  font-size: 14px;
  font-weight: 500;
}

.toggle-text small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.toggle-switch {
  width: 44px;
  height: 26px;
  background: var(--card);
  border-radius: 13px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  border: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.toggle-switch.on {
  background: var(--accent);
}

.toggle-switch.on:hover {
  transform: scale(1.05);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle-switch.on::after {
  transform: translateX(18px);
}

/* Cloak Grid */
.cloak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.cloak-btn {
  padding: 14px 10px;
  border-radius: 12px;
  border: 2px solid var(--glass-border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cloak-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.cloak-btn.active:hover {
  transform: scale(1.05);
}

.cloak-btn img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.cloak-btn i {
  font-size: 24px;
}

/* Bypass Section */
.bypass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.bypass-btn {
  padding: 16px;
  border-radius: 12px;
  border: 2px solid var(--glass-border);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bypass-btn i {
  font-size: 24px;
  color: var(--accent);
}

.bypass-btn.panic {
  border-color: var(--danger);
  color: var(--danger);
}

.bypass-btn.panic i {
  color: var(--danger);
}

.bypass-btn.panic:hover {
  transform: scale(1.03);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--glass);
  backdrop-filter: var(--blur-sidebar);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
  width: 90%;
  max-width: 500px;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--glass-border);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title i {
  color: var(--accent);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  background: var(--danger);
  color: #fff;
  transform: scale(1.1);
}

.modal-body {
  padding: 22px;
}

.embed-code {
  width: 100%;
  height: 120px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px;
  color: var(--fg);
  font-family: monospace;
  font-size: 12px;
  resize: none;
}

.embed-code:focus {
  outline: none;
  border-color: var(--accent);
}

.copy-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease;
}

.copy-btn:hover {
  transform: scale(1.02);
}

/* Legal */
.legal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  background: var(--card);
  padding: 4px;
  border-radius: 12px;
}

.legal-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.2s ease;
}

.legal-tab.active {
  background: var(--accent);
  color: #fff;
}

.legal-tab.active:hover {
  transform: scale(1.02);
}

.legal-content {
  font-size: 13px;
  line-height: 1.7;
}

.legal-content h3 {
  font-size: 14px;
  margin: 16px 0 8px;
  color: var(--accent);
  font-weight: 700;
}

.legal-content p {
  margin-bottom: 10px;
  color: var(--muted);
}

/* Credits */
.credits-block {
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--card);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.credits-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 10px;
}

.credits-item-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.credits-item-note {
  font-size: 12px;
  color: var(--muted);
}

.credits-item-note a {
  color: var(--accent);
  text-decoration: none;
}

/* Keyboard Hint */
.kbd-hint {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--glass);
  backdrop-filter: var(--blur-amount);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 16px;
  z-index: 10;
}

.kbd-hint kbd {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: inherit;
  font-size: 10px;
  margin-right: 4px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .main-title {
    font-size: 48px;
  }
  .main {
    padding: 20px;
  }
  .kbd-hint {
    display: none;
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
