
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');


:root {
  --bg-deep: #050e08;
  --bg-mid: #0a1e10;
  --bg-card: rgba(16, 42, 24, 0.65);
  --accent: #00e676;
  --accent-dim: rgba(0, 230, 118, 0.15);
  --accent-glow: rgba(0, 230, 118, 0.35);
  --text: #e8f5e9;
  --text-muted: #81c784;
  --radius: 14px;
  --glass-blur: 12px;
}



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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0, 230, 118, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 100%, rgba(0, 180, 90, 0.06) 0%, transparent 60%),
    var(--bg-deep);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='30' cy='30' r='.6' fill='%2300e676' opacity='.07'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='60' height='60' fill='url(%23g)'/%3E%3C/svg%3E");
  z-index: -1;
  pointer-events: none;
}


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

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 9px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-glow);
}



#gh-link {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  color: var(--accent);
  opacity: .25;
  transition: opacity .25s, transform .25s;
}

#gh-link:hover {
  opacity: .8;
  transform: scale(1.1);
}



header {
  padding: 36px 24px 12px;
  max-width: 1400px;
  margin: auto;
  text-align: center;
}

h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(0, 230, 118, 0.4), 0 0 60px rgba(0, 230, 118, 0.15);
  margin-bottom: 18px;
}



#search {
  display: block;
  margin: 0 auto 14px;
  padding: 12px 18px;
  width: min(340px, 90%);
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}

#search::placeholder {
  color: var(--text-muted);
  opacity: .6;
}

#search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.2);
}



.tab-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.tab-btn {
  padding: 10px 22px;
  border: 1px solid rgba(0, 230, 118, 0.15);
  border-radius: 10px;
  cursor: pointer;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  transition: all .22s ease;
}

.tab-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tab-btn.active {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
}



.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.filters button {
  padding: 9px 16px;
  border: 1px solid rgba(0, 230, 118, 0.15);
  border-radius: 9px;
  cursor: pointer;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  transition: all .22s ease;
}

.filters button:hover,
.filters button.active {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(0, 230, 118, 0.35);
  transform: translateY(-1px);
}


kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.25);
  font-family: inherit;
  font-size: 11px;
  color: var(--accent);
}



#playable-info {
  margin: 6px auto 0;
  max-width: 700px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  opacity: .55;
}



main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 18px;
  padding: 22px;
  max-width: 1500px;
  margin: auto;
}



.tile {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(0, 230, 118, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tile:hover {
  transform: translateY(-5px) scale(1.03);
  border-color: rgba(0, 230, 118, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 230, 118, 0.15),
    0 0 0 1px rgba(0, 230, 118, 0.1);
}



.tile .thumb-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.03);
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

.tile:hover img {
  transform: scale(1.06);
}


.tile .img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d3318, #061a0c);
  font-size: 42px;
  font-weight: 800;
  color: rgba(0, 230, 118, 0.3);
  text-transform: uppercase;
}



.tile h3 {
  padding: 10px 12px 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile p {
  padding: 0 12px 6px;
  font-size: 11px;
  color: var(--text-muted);
  opacity: .7;
}



.gameInfo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px 12px;
}



.playability {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: .3px;
}

.playability.badge-playable {
  color: #a5d6a7;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.35);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.15);
}

.playability.badge-slight {
  color: #ffe082;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.3);
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.1);
}

.playability.badge-hard {
  color: #ef9a9a;
  background: rgba(244, 67, 54, 0.12);
  border: 1px solid rgba(244, 67, 54, 0.3);
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.1);
}



.favStar {
  font-size: 18px;
  cursor: pointer;
  filter: grayscale(1) brightness(.5);
  transition: all .2s ease;
  user-select: none;
}

.favStar:hover {
  transform: scale(1.2);
  filter: grayscale(.3) brightness(.8);
}

.favStar.active {
  filter: none;
  transform: scale(1.1);
}



#modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  flex-direction: column;
  z-index: 100;
}

#gameFrame {
  flex: 1;
  border: none;
  width: 100%;
  height: 100%;
}

#home {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 105;
  padding: 10px 18px;
  border: 1px solid rgba(0, 230, 118, 0.3);
  border-radius: 8px;
  background: rgba(4, 28, 11, 0.6);
  backdrop-filter: blur(4px);
  color: var(--accent);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .3s ease;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

#home:hover {
  background: rgba(0, 230, 118, 0.9);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.7), 0 0 30px rgba(0, 230, 118, 0.4);
  transform: scale(1.05);
}



#game-count {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  opacity: .5;
  padding: 4px 0 0;
}



#utilities {
  max-width: 1000px;
  margin: auto;
  padding: 22px;
}

.util-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.util-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(0, 230, 118, 0.1);
  border-radius: var(--radius);
  padding: 28px 24px;
  cursor: pointer;
  text-align: center;
  transition: all .22s ease;
}

.util-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 230, 118, 0.35);
  box-shadow: 0 8px 30px rgba(0, 230, 118, 0.12);
}

.util-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.util-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.util-card p {
  font-size: 13px;
  color: var(--text-muted);
  opacity: .7;
}



#redirect-popup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#redirect-popup.show {
  display: flex;
}

.popup-card {
  background: linear-gradient(145deg, #0d2818, #081a0e);
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: 18px;
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 230, 118, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: popIn .25s ease;
}

@keyframes popIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.popup-icon {
  font-size: 36px;
  margin-bottom: 14px;
}

.popup-card h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.popup-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.popup-url {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.15);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 22px;
  word-break: break-all;
}

.popup-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.popup-actions button {
  padding: 11px 28px;
  border-radius: 10px;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}

#popup-cancel {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#popup-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

#popup-go {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 2px 12px rgba(0, 230, 118, 0.3);
}

#popup-go:hover {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.5);
  transform: translateY(-1px);
}



#panic {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: #f0f4f9;
  color: #1f1f1f;
  font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
}

#panic.show {
  display: flex;
}

.panic-signin-container {
  background: #fff;
  border-radius: 28px;
  padding: 36px;
  width: 100%;
  max-width: 448px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-align: left;
  display: flex;
  flex-direction: column;
}

.panic-google-logo {
  margin-bottom: 16px;
}

.panic-signin-title {
  font-size: 36px;
  font-weight: 400;
  color: #1f1f1f;
  margin-bottom: 8px;
  letter-spacing: 0;
  text-shadow: none;
}

.panic-signin-subtitle {
  font-size: 16px;
  color: #1f1f1f;
  margin-bottom: 32px;
}

.panic-signin-input-box {
  position: relative;
  margin-bottom: 10px;
}

.panic-signin-input {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border: 1px solid #747775;
  border-radius: 4px;
  background: transparent;
  outline: none;
  color: #1f1f1f;
}

.panic-signin-input:focus {
  border: 2px solid #0b57d0;
  padding: 15px;
  
}

.panic-signin-label {
  position: absolute;
  left: 12px;
  top: 16px;
  padding: 0 4px;
  background: #fff;
  color: #444746;
  font-size: 16px;
  transition: all .15s ease;
  pointer-events: none;
}

.panic-signin-input:focus~.panic-signin-label,
.panic-signin-input:not(:placeholder-shown)~.panic-signin-label {
  top: -9px;
  font-size: 12px;
  color: #0b57d0;
}

.panic-signin-input:not(:focus):not(:placeholder-shown)~.panic-signin-label {
  color: #444746;
}

.panic-signin-actions {
  margin-bottom: 40px;
}

.panic-signin-forgot {
  background: none;
  border: none;
  color: #0b57d0;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 4px;
}

.panic-signin-forgot:hover {
  background: #f0f4f9;
}

.panic-signin-guest {
  font-size: 14px;
  color: #5f6368;
  margin-top: 40px;
  margin-bottom: 30px;
  line-height: 1.5;
}

.panic-signin-guest a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
}

.panic-signin-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.panic-signin-create {
  background: none;
  border: none;
  color: #0b57d0;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 24px;
}

.panic-signin-create:hover {
  background: #f0f4f9;
}

.panic-signin-next {
  background: #0b57d0;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.panic-signin-next:hover {
  background: #0842a0;
}

.panic-loading {
  opacity: 0.7;
  cursor: wait !important;
  pointer-events: none;
}


.panic-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #747775;
  border-radius: 16px;
  padding: 4px 8px 4px 4px;
  margin: 0 auto;
  font-size: 14px;
  color: #1f1f1f;
  font-weight: 500;
  cursor: pointer;
}
.panic-user-pill:hover {
  background: #f8fafd;
}
.panic-user-icon {
  width: 20px;
  height: 20px;
}
.panic-pill-drop {
  width: 18px;
  height: 18px;
}
.panic-show-pass {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 14px;
  color: #1f1f1f;
  cursor: pointer;
}
.panic-show-pass input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}


.panic-docs-bug-container {
  width: 100vw;
  height: 100vh;
  background: #f8f9fa;
  color: #202124;
  font-family: 'Product Sans', Arial, sans-serif;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.panic-docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid #e0e0e0;
}
.panic-docs-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.panic-docs-logo {
  display: flex;
  align-items: center;
  gap: 6px;
}
.panic-docs-title {
  font-size: 22px;
  font-weight: 500;
  color: #5f6368;
}
.panic-docs-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f1f3f4;
  padding: 10px 16px;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
}
.panic-docs-search input {
  border: none;
  background: transparent;
  font-size: 16px;
  width: 100%;
  outline: none;
  color: #5f6368;
}
.panic-docs-right {
  display: flex;
  align-items: center;
}
.panic-docs-profile-bugged {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dadce0;
  position: relative;
  overflow: hidden;
}

.panic-docs-error-toast {
  background: #323232;
  color: white;
  padding: 14px 24px;
  border-radius: 4px;
  position: fixed;
  bottom: 24px;
  left: 24px;
  font-size: 14px;
  font-family: Roboto, sans-serif;
  box-shadow: 0 3px 5px -1px rgba(0,0,0,.2);
}

.panic-docs-main-content {
  flex: 1;
  padding: 48px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
.panic-docs-main-content h2 {
  font-weight: 400;
  font-size: 16px;
  color: #202124;
  margin-bottom: 16px;
}
.panic-docs-grid {
  display: flex;
  gap: 20px;
}
.panic-docs-sq {
  width: 130px;
  height: 170px;
  background: #e8eaed;
  border: 1px solid #dadce0;
  border-radius: 4px;
}
.panic-docs-list-bug {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panic-docs-row-skel {
  width: 100%;
  height: 48px;
  background: #e8eaed;
  border-radius: 4px;
}



@media(max-width:600px) {
  main {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 12px;
  }

  .tile .thumb-wrap {
    height: 100px;
  }

  .tile h3 {
    font-size: 13px;
  }

  .filters button {
    padding: 7px 12px;
    font-size: 12px;
  }

  .panic-doc {
    padding: 40px 24px;
  }

  .popup-card {
    padding: 24px 20px;
  }
}


.ad-sidebar {
  position: fixed;
  top: 15vh;
  width: 160px;
  height: 600px;
  background: rgba(4, 28, 11, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(25, 190, 40, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 10;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ad-left { left: 20px; }
.ad-right { right: 20px; }

.ad-close {
  position: absolute;
  top: -12px;
  background: rgba(25, 190, 40, 0.2);
  color: #fff;
  border: 1px solid rgba(25, 190, 40, 0.8);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  font-size: 11px;
  box-shadow: 0 0 10px rgba(25, 190, 40, 0.4);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ad-close:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 15px rgba(25, 190, 40, 0.8);
  transform: scale(1.1);
}

.ad-left .ad-close { right: -12px; }
.ad-right .ad-close { left: -12px; }





#settings-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(25, 190, 40, 0.4);
  background: rgba(4, 28, 11, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#settings-btn:hover {
  transform: scale(1.1) rotate(45deg);
  box-shadow: 0 0 20px var(--accent-glow);
}

#submit-game-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  height: 42px;
  padding: 0 18px;
  border-radius: 24px;
  border: 1px solid var(--accent-dim);
  background: rgba(4, 28, 11, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#submit-game-btn:hover {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
  box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-2px);
}


#settings-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

#settings-modal.show { display: flex; }

/* Site Theme Picker */
.site-theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.site-theme-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.site-theme-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.site-theme-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Tab Cloaker */
.settings-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%2381c784' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.settings-select:focus {
  border-color: var(--accent);
}

.settings-select option {
  background: #0a1e10;
  color: #e8f5e9;
}

.settings-hint {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
  margin-top: 6px;
  line-height: 1.4;
}

.settings-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 16px 0;
}

/* Keybind Recorder */
.keybind-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.keybind-display {
  flex: 1;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--accent);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.keybind-display.recording {
  border-color: #ff4081;
  color: #ff4081;
  animation: keybindPulse 1s infinite;
}

@keyframes keybindPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 64, 129, 0.4); }
  50% { box-shadow: 0 0 12px 2px rgba(255, 64, 129, 0.3); }
}

.keybind-record-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.keybind-record-btn:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

.keybind-record-btn.recording {
  background: rgba(255, 64, 129, 0.2);
  border-color: #ff4081;
  color: #ff4081;
}

/* Site Theme Overrides */
body.theme-midnight {
  --bg-deep: #0a0e1a;
  --bg-mid: #111827;
  --bg-card: rgba(17, 24, 39, 0.65);
  --accent: #7c4dff;
  --accent-dim: rgba(124, 77, 255, 0.15);
  --accent-glow: rgba(124, 77, 255, 0.35);
  --text: #e0e7ff;
  --text-muted: #a5b4fc;
}

body.theme-sunset {
  --bg-deep: #1a0a00;
  --bg-mid: #2d1600;
  --bg-card: rgba(45, 22, 0, 0.65);
  --accent: #ff6d00;
  --accent-dim: rgba(255, 109, 0, 0.15);
  --accent-glow: rgba(255, 109, 0, 0.35);
  --text: #fff3e0;
  --text-muted: #ffab40;
}

body.theme-stealth {
  --bg-deep: #0a0a0a;
  --bg-mid: #141414;
  --bg-card: rgba(20, 20, 20, 0.65);
  --accent: #666;
  --accent-dim: rgba(102, 102, 102, 0.15);
  --accent-glow: rgba(102, 102, 102, 0.25);
  --text: #ccc;
  --text-muted: #888;
}

.settings-card {
  background: rgba(4, 28, 11, 0.95);
  border: 1px solid rgba(25, 190, 40, 0.3);
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.settings-card h2 {
  color: var(--accent);
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  text-align: center;
}

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

.settings-section label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.settings-section input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(25, 190, 40, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-base);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.settings-section input:focus {
  border-color: var(--accent);
}


.theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-base);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-btn:hover {
  border-color: var(--accent);
  background: rgba(25, 190, 40, 0.1);
}

.theme-btn.active {
  border-color: var(--accent);
  background: rgba(25, 190, 40, 0.2);
  color: var(--accent);
  font-weight: 600;
}


.settings-bottom {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.settings-bottom button {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

#settings-save {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

#settings-save:hover {
  background: #00ff88;
}

#settings-close {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-base);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#settings-close:hover {
  background: rgba(255, 255, 255, 0.2);
}


.panic-pass-error {
  color: #d93025;
  font-size: 13px;
  margin-top: 8px;
  display: none;
  text-align: left;
}

.panic-pass-error.show { display: block; }
.badge-cloud { background: rgba(16, 124, 16, 0.25); color: #5dc264; }

ins { display: block !important; text-decoration: none !important; overflow: hidden; }
ins:empty { display: none !important; }

#game-loading-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0d0d2b 100%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  transition: opacity 0.5s ease;
}
#game-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-brand {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #00e5ff, #7c4dff, #ff4081);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}
.loading-bar-wrap {
  width: 220px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #7c4dff);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.loading-text {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
}
#loading-play-btn {
  margin-top: 12px;
  padding: 14px 48px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(135deg, #7c4dff, #00e5ff);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(124, 77, 255, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
#loading-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 50px rgba(124, 77, 255, 0.6);
}

.panic-tooltip-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  z-index: 9999;
  font-family: 'Google Sans', 'Segoe UI', Roboto, sans-serif;
}
.panic-tooltip-card h3 {
  font-size: 18px;
  font-weight: 500;
  color: #202124;
  margin-bottom: 12px;
}
.panic-tooltip-card p {
  font-size: 14px;
  color: #5f6368;
  line-height: 1.5;
  margin: 0;
}
#panic-learn-more-tooltip {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9998;
}

.panic-retry-btn {
  background: none;
  border: 1px solid #dadce0;
  color: #1a73e8;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 16px;
}
.panic-retry-btn:hover {
  background: rgba(26,115,232,0.04);
}

.panic-template-label {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: #5f6368;
  font-weight: 400;
}
.panic-docs-sq {
  position: relative;
}

.panic-docs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
}
.panic-doc-name {
  flex: 1;
  color: #202124;
  font-weight: 400;
}
.panic-doc-date {
  color: #5f6368;
  font-size: 12px;
  min-width: 90px;
}
.panic-doc-owner {
  color: #5f6368;
  font-size: 12px;
  min-width: 30px;
}

.theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.panic-app-name-mirror {
  color: #1a73e8;
}

@media (max-width: 1400px) {
  .ad-sidebar { 
    display: none !important; 
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}
