/* --- Variables --- */
:root {
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-input: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-dim: #388bfd;
  --success: #3fb950;
  --warning: #d29922;
  --danger: #f85149;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --window-radius: 10px;
  --taskbar-height: 40px;
  --footer-height: 72px;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: #1a1f2e;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* --- Login screen (PC logon) --- */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-screen[hidden] {
  display: none !important;
}
.login-screen-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #1a2332 0%, #0f1419 100%);
}
.login-screen-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow);
}
.login-screen-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--bg-input);
  border-radius: 50%;
}
.login-screen-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
}
.login-screen-subtitle {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.login-form label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.login-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
}
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}
.login-btn {
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.login-btn:hover {
  background: var(--accent-dim);
}

/* --- Desktop --- */
.desktop {
  position: relative;
  min-height: 0;
  padding-bottom: var(--taskbar-height);
  flex: 1;
}

/* Wallpaper: desktop background */
.desktop-wallpaper {
  position: fixed;
  inset: 0;
  bottom: var(--taskbar-height);
  background:
    linear-gradient(160deg, #1e2a3a 0%, #151b26 40%, #0f1419 100%);
  z-index: 0;
}
.desktop-wallpaper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(56, 139, 253, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(248, 81, 73, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Desktop content: icons only; layout never shifts when windows open */
.desktop-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.desktop-content.game-started {
  justify-content: center;
}

/* Window layer: all app windows float over the desktop (like launching a program) */
.desktop-windows {
  position: absolute;
  inset: 0;
  bottom: var(--taskbar-height);
  z-index: 10;
  pointer-events: none;
}
.desktop-windows > * {
  pointer-events: auto;
}

/* Base positioning for all overlay windows: centered, never overlap footer */
.desktop-windows .ransom-note-window,
.desktop-windows .wallet-window,
.desktop-windows .tor-window,
.desktop-windows .bank-window,
.desktop-windows .bmail-window,
.desktop-windows .file-viewer-window,
.desktop-windows .ransom-tracker-window,
.desktop-windows .leaderboard-window,
.desktop-windows .game-window,
.desktop-windows .fake-app-window {
  position: absolute;
  left: 50%;
  top: 1.5rem;
  transform: translateX(-50%) scale(0.96);
  flex-shrink: 0;
  max-height: calc(100vh - 3rem - var(--taskbar-height) - var(--footer-height));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.desktop-windows .window-title-bar {
  flex-shrink: 0;
  cursor: move;
  user-select: none;
}
.desktop-windows .window-title-bar button {
  cursor: pointer;
}

/* README file icon (closed state on desktop) */
.readme-icon {
  flex-shrink: 0;
  width: 72px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.readme-icon:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
.readme-icon:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.readme-icon-symbol {
  font-size: 2.5rem;
  line-height: 1;
}
.readme-icon-label {
  font-size: 0.75rem;
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}
.readme-icon[hidden] {
  display: none !important;
}

/* First-time attention: shake + red highlight to prompt click */
@keyframes readme-icon-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
  20%, 40%, 60%, 80% { transform: translateX(3px); }
}
.readme-icon.attention {
  animation: readme-icon-shake 0.6s ease-in-out infinite;
  border: 2px solid var(--danger);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(248, 81, 73, 0.5);
  background: rgba(248, 81, 73, 0.08);
}
.readme-icon.attention .readme-icon-label {
  color: #f0a0a0;
}
.readme-icon.attention:hover {
  animation: none;
}

/* Ransom note window (README.txt on desktop) — opens from icon; wider for readability */
.ransom-note-window {
  width: 560px;
  max-width: calc(100vw - 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.ransom-note-window.readme-window-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.ransom-note-title {
  background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ransom-note-title .window-title-text { flex: 1; min-width: 0; }
.ransom-note-title .window-title-icon { font-size: 1rem; flex-shrink: 0; }
.readme-window-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 400;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.readme-window-close:hover {
  color: var(--text);
  background: rgba(248, 81, 73, 0.2);
  border-color: rgba(248, 81, 73, 0.4);
}
.readme-window-close:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.ransom-note-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  background: #0a0c10;
  border-left: 4px solid var(--danger);
  min-height: 280px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.55;
  color: #b8c0c8;
}
.ransom-note-headline {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--danger);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ransom-note-intro {
  margin: 0 0 1rem;
  color: #c9d1d9;
}
.ransom-note-id {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}
.ransom-note-id code {
  background: rgba(248, 81, 73, 0.12);
  color: #f0a0a0;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}
.ransom-note-section {
  margin-bottom: 1rem;
}
.ransom-note-section-title {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ransom-note-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: #c9d1d9;
}
.ransom-note-steps li {
  margin-bottom: 0.35rem;
}
.ransom-note-steps li:last-child { margin-bottom: 0; }
.ransom-note-address-block {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #0d1117;
  border: 1px solid rgba(248, 81, 73, 0.35);
  border-radius: 6px;
}
.ransom-note-address-block .ransom-note-section-title {
  margin-bottom: 0.5rem;
}
.ransom-note-address-label {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.ransom-note-address {
  margin: 0;
  font-size: 0.8rem;
  word-break: break-all;
  color: #e6edf3;
  letter-spacing: 0.02em;
  user-select: all;
}
.ransom-note-warning .ransom-note-section-title {
  color: #d29922;
}
.ransom-note-warnings {
  margin: 0;
  padding-left: 1.25rem;
  color: #b8c0c8;
}
.ransom-note-warnings li { margin-bottom: 0.35rem; }
.ransom-note-deadline {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-weight: 600;
  color: var(--danger);
  font-size: 0.9rem;
}
.ransom-note-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}
.readme-onion-link {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  background: rgba(88, 166, 255, 0.12);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.readme-onion-link:hover {
  color: #7cc4ff;
  background: rgba(88, 166, 255, 0.2);
}
.readme-onion-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#readme-window { cursor: default; }

/* Bitmonster - BTC Wallet — desktop app icon + window (real wallet app style) */
.wallet-icon {
  flex-shrink: 0;
  width: 72px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.wallet-icon:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
/* App-icon style: rounded square, Bitcoin orange gradient, like real wallet apps */
.wallet-icon-symbol.wallet-icon-app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f7931a 0%, #e27800 40%, #b35900 100%);
  color: #fff;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(247, 147, 26, 0.35), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.wallet-icon:hover .wallet-icon-app-icon {
  box-shadow: 0 4px 14px rgba(247, 147, 26, 0.45), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.wallet-icon-label {
  font-size: 0.75rem;
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}
.wallet-icon[hidden] { display: none !important; }

/* Bmail desktop icon — Gmail homage, app-icon style like Bitmonster/Tor/BNC */
.bmail-icon {
  flex-shrink: 0;
  width: 72px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.bmail-icon:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
.bmail-icon-symbol.bmail-icon-app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ea4335 0%, #d93025 40%, #b71c1c 100%);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  font-family: var(--font-sans);
  box-shadow: 0 2px 8px rgba(234, 67, 53, 0.35), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.bmail-icon:hover .bmail-icon-app-icon {
  box-shadow: 0 4px 14px rgba(234, 67, 53, 0.45), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.bmail-icon-label {
  font-size: 0.75rem;
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

/* BNC Banking — desktop app icon + window (PNC-inspired, app-icon style like Bitmonster/Tor) */
.bank-icon {
  flex-shrink: 0;
  width: 72px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.bank-icon:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
.bank-icon-symbol.bank-icon-app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 40%, #1e3a8a 100%);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  font-family: var(--font-sans);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.bank-icon:hover .bank-icon-app-icon {
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.bank-icon-label {
  font-size: 0.75rem;
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

.bank-window {
  width: 400px;
  max-width: calc(100vw - 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.bank-window.bank-window-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.bank-title {
  background: linear-gradient(180deg, #0d47a1 0%, #0a3d8a 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bank-title .window-title-text { flex: 1; min-width: 0; }
.bank-title .window-title-icon { font-size: 1rem; flex-shrink: 0; }
.bank-title .window-title-icon.bank-title-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(145deg, #2563eb 0%, #1e3a8a 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-sans);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.bank-window-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.bank-window-close:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
}
.bank-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.25rem;
  background: var(--bg-dark);
  min-height: 240px;
}
.bank-account-block {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.bank-account-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bank-account-number {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
}
.bank-balance-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.bank-balance-amount {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--success);
}
.bank-nav {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}
.bank-nav-item {
  flex: 1;
  padding: 0.5rem 0.5rem;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.bank-nav-item:hover {
  color: var(--text);
}
.bank-nav-item.active {
  color: var(--text);
  border-color: var(--accent);
}
.bank-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.bank-panel.hidden {
  display: none !important;
}
.bank-panel-title {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.bank-form-row {
  margin-bottom: 0.75rem;
}
.bank-form-row label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.bank-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.bank-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.bank-btn-primary {
  background: var(--accent);
  color: #fff;
  margin-top: 0.25rem;
}
.bank-btn-primary:hover {
  background: var(--accent-dim);
}
.bank-status {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}
.bank-status-error {
  color: var(--danger);
}
.bank-status-success {
  color: var(--success);
}
.bank-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bank-history-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.bank-history-desc {
  color: var(--text);
}
.bank-history-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.bank-history-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.bank-billpay-browser {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.bank-billpay-url-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
}
.bank-billpay-url-icon {
  font-size: 0.9rem;
}
.bank-billpay-url-input {
  flex: 1;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.bank-billpay-content {
  min-height: 160px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bank-billpay-loading {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.bank-billpay-loading.hidden {
  display: none !important;
}
.bank-billpay-error {
  text-align: center;
}
.bank-billpay-error.hidden {
  display: none !important;
}
.bank-billpay-error-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.bank-billpay-error-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--danger);
}
.bank-billpay-error-detail {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Fake Tor Browser — desktop icon + window (app-icon style like Bitmonster) */
.tor-icon {
  flex-shrink: 0;
  width: 72px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.tor-icon:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
.tor-icon-symbol.tor-icon-app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 12px;
  background: linear-gradient(145deg, #7e4798 0%, #5c2d7a 40%, #3d1f52 100%);
  font-size: 1.85rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(126, 71, 152, 0.35), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.tor-icon:hover .tor-icon-app-icon {
  box-shadow: 0 4px 14px rgba(126, 71, 152, 0.45), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.tor-icon-label {
  font-size: 0.75rem;
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

.tor-window {
  width: 700px;
  max-width: calc(100vw - 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tor-window.tor-window-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.tor-title {
  background: linear-gradient(180deg, #7d4698 0%, #5e3577 100%);
  color: #fff;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tor-title .window-title-text { flex: 1; min-width: 0; }
.tor-title .window-title-icon { font-size: 1rem; flex-shrink: 0; }
.tor-window-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.tor-window-close:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
}
.tor-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--bg-dark);
  min-height: 500px;
  display: flex;
  flex-direction: column;
}
.tor-toolbar {
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tor-nav-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.tor-nav-btn:hover:not(:disabled) {
  background: var(--bg-input);
  border-color: var(--accent);
}
.tor-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.tor-url-bar-wrap {
  flex: 1;
  display: flex;
  gap: 0.5rem;
}
.tor-url-bar {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s;
}
.tor-url-bar:focus {
  border-color: var(--accent);
}
.tor-go-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  color: #fff;
  background: #7d4698;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.tor-go-btn:hover {
  background: #8e52ab;
}
.tor-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  background: var(--bg-dark);
}
.tor-start-page {
  max-width: 500px;
  margin: 3rem auto;
  text-align: center;
}
.tor-logo {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.tor-start-page h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--text);
}
.tor-start-page p {
  margin: 0.5rem 0;
  color: var(--text-muted);
}
.tor-hint {
  margin-top: 1.5rem !important;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

/* Ransom site (displayed in Tor Browser) */
.ransom-site {
  max-width: 800px;
  margin: 0 auto;
  font-family: var(--font-mono);
}
.ransom-site-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.ransom-site-logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--danger);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(248, 81, 73, 0.5);
}
.ransom-site-tagline {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ransom-site-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.ransom-site-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.ransom-site-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.ransom-site-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ransom-site-section p {
  margin: 0 0 0.75rem;
  color: var(--text);
  line-height: 1.6;
}
.ransom-site-section p:last-child {
  margin-bottom: 0;
}
.ransom-site-id-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  font-family: var(--font-mono);
}
.ransom-site-id-box strong {
  color: var(--danger);
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ransom-site-id-box code {
  color: var(--text);
  font-size: 1rem;
  user-select: all;
}
.ransom-site-warning {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.3);
  border-radius: 4px;
  padding: 1rem;
  margin: 1rem 0;
}
.ransom-site-warning p {
  margin: 0;
  color: #f0a0a0;
  font-size: 0.875rem;
}
.ransom-site-chat-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--danger);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s;
}
.ransom-site-chat-link:hover {
  background: #c93b34;
}
.ransom-site-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Ransom site login form */
.ransom-site-login-form {
  margin: 1rem 0;
}
.ransom-site-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 0.75rem;
  outline: none;
  transition: border-color 0.15s;
}
.ransom-site-input:focus {
  border-color: var(--accent);
}
.ransom-site-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--danger);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s;
}
.ransom-site-btn:hover {
  background: #c93b34;
}
.ransom-site-login-error {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.3);
  border-radius: 4px;
  color: #f0a0a0;
  font-size: 0.875rem;
}

/* Ransom site with chat */
.ransom-site-with-chat {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 600px;
}
.ransom-site-header-compact {
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ransom-site-logo-compact {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--danger);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.ransom-site-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.ransom-site-status-label {
  color: var(--text-muted);
}
.ransom-site-status-value {
  color: var(--text);
  font-family: var(--font-mono);
  background: var(--bg-input);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Chat container in ransom site */
.ransom-site-chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ransom-site-chat-header {
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ransom-site-chat-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.ransom-site-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ransom-site-tracker-btn {
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.ransom-site-tracker-btn:hover {
  color: var(--text);
  background: var(--bg-input);
  border-color: var(--accent-dim);
}
.ransom-site-chat-status {
  font-size: 0.75rem;
  color: var(--success);
}
.ransom-site-chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: var(--bg-dark);
}
.ransom-site-chat-msg {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  animation: fadeIn 0.2s ease;
}
.ransom-site-chat-msg-user {
  background: rgba(88, 166, 255, 0.1);
  border-left: 3px solid var(--accent);
  margin-left: 2rem;
}
.ransom-site-chat-msg-operator {
  background: rgba(248, 81, 73, 0.1);
  border-left: 3px solid var(--danger);
  margin-right: 2rem;
}
.ransom-site-chat-sender {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ransom-site-chat-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}
.ransom-site-chat-text {
  color: var(--text);
  line-height: 1.5;
  word-wrap: break-word;
}
.ransom-site-chat-loading {
  margin: 0.5rem 0;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: italic;
}
.ransom-site-chat-input-wrap {
  border-top: 1px solid var(--border);
  padding: 1rem;
  background: var(--bg-input);
}
.ransom-site-chat-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.ransom-site-chat-input {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
.ransom-site-chat-input:focus {
  border-color: var(--accent);
}
.ransom-site-chat-send {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--danger);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.ransom-site-chat-send:hover {
  background: #c93b34;
}
.ransom-site-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ransom-site-suggestions-toggle {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ransom-site-suggestions-toggle:hover {
  background: var(--bg-card);
  border-color: var(--accent);
}
.ransom-site-suggestions-drawer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 1rem;
  max-height: 200px;
  overflow-y: auto;
}
.ransom-site-suggestions-content p {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.4;
  cursor: default;
}
.ransom-site-suggestions-content p:last-child {
  margin-bottom: 0;
}

/* Fake desktop files (encrypted until decryptor run; README, Bmail, Wallet never affected) */
.desktop-fake-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}
.desktop-file-icon {
  width: 72px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.15s ease, filter 0.15s ease;
  position: relative;
}
.desktop-file-icon:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
.desktop-file-icon.encrypted {
  filter: saturate(0.3) brightness(0.85);
  opacity: 0.9;
}
.desktop-file-icon.encrypted::after {
  content: '🔒';
  position: absolute;
  bottom: 0.1rem;
  right: 0.25rem;
  font-size: 0.9rem;
  filter: none;
}
.desktop-file-icon-symbol {
  font-size: 2.25rem;
  line-height: 1;
}
.desktop-file-icon-label {
  font-size: 0.7rem;
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}
.desktop-file-icon.encrypted .desktop-file-icon-label {
  color: #b0a0a0;
}

/* File viewer window (fake file content: garbled when encrypted, readable after decryptor) */
/* Ransom tracker popup — small window showing current BTC demand and deadline */
.ransom-tracker-window {
  width: 240px;
  max-width: calc(100vw - 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ransom-tracker-window.ransom-tracker-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Desktop: position ransom tracker on the right so it doesn't cover the chat */
@media (min-width: 768px) {
  .desktop-windows .ransom-tracker-window {
    left: auto;
    right: 1.5rem;
    transform: scale(0.96);
  }
  .ransom-tracker-window.ransom-tracker-open {
    transform: scale(1);
  }
}

.ransom-tracker-title {
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border-bottom: 2px solid var(--danger);
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ransom-tracker-title .window-title-text { flex: 1; min-width: 0; font-weight: 600; }
.ransom-tracker-title .window-title-icon { font-size: 0.9rem; flex-shrink: 0; }
.ransom-tracker-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.ransom-tracker-close:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
}
.ransom-tracker-body {
  padding: 0.75rem 1rem;
  background: var(--bg-dark);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.ransom-tracker-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.ransom-tracker-row:last-child {
  margin-bottom: 0;
}
.ransom-tracker-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}
.ransom-tracker-value {
  color: var(--danger);
  font-weight: 600;
  font-size: 1rem;
}

/* Leaderboard window — triumphant, sporty standalone window */
.leaderboard-window {
  width: 520px;
  max-width: calc(100vw - 3rem);
  background: linear-gradient(165deg, #1a1d24 0%, #0f1216 100%);
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow), 0 0 24px rgba(212, 175, 55, 0.12), 0 4px 0 rgba(212, 175, 55, 0.15);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.leaderboard-window.leaderboard-window-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.leaderboard-window-title {
  background: linear-gradient(135deg, #c9a227 0%, #8b6914 50%, #5c4a0e 100%);
  color: #1a1a1a;
  padding: 0.6rem 0.9rem;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(212, 175, 55, 0.6);
}
.leaderboard-window-title .window-title-text {
  color: #1a1a1a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.leaderboard-window-title .window-title-icon {
  font-size: 1.2rem;
}
.leaderboard-window-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.leaderboard-window-close:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}
.leaderboard-window-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.25rem;
}
.leaderboard-window-content {
  min-height: 120px;
}
.leaderboard-window-content .leaderboard-window-heading {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1.25rem;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.leaderboard-window-content .leaderboard-window-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.leaderboard-window-content .leaderboard-window-table th,
.leaderboard-window-content .leaderboard-window-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.leaderboard-window-content .leaderboard-window-table th {
  color: #d4af37;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}
.leaderboard-window-content .leaderboard-window-table tbody tr:nth-child(1) {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, transparent 100%);
  font-weight: 700;
  color: #f0d875;
}
.leaderboard-window-content .leaderboard-window-table tbody tr:nth-child(2) {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.12) 0%, transparent 100%);
  font-weight: 600;
  color: #c0c0c0;
}
.leaderboard-window-content .leaderboard-window-table tbody tr:nth-child(3) {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.12) 0%, transparent 100%);
  font-weight: 600;
  color: #cd9b6f;
}
.leaderboard-window-content .leaderboard-window-table tbody tr:hover {
  background: rgba(212, 175, 55, 0.08);
}
.leaderboard-window-content .leaderboard-window-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-size: 1rem;
}
.leaderboard-window-content .leaderboard-window-close-btn {
  display: block;
  margin: 1.25rem auto 0;
  padding: 0.5rem 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
  color: #1a1a1a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: filter 0.15s, transform 0.15s;
}
.leaderboard-window-content .leaderboard-window-close-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.file-viewer-window {
  width: 480px;
  max-width: calc(100vw - 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.file-viewer-window.file-viewer-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.file-viewer-title {
  background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.file-viewer-title .window-title-text { flex: 1; min-width: 0; }
.file-viewer-title .window-title-icon { font-size: 1rem; flex-shrink: 0; }
.file-viewer-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.file-viewer-close:hover {
  color: var(--text);
  background: rgba(248, 81, 73, 0.2);
  border-color: rgba(248, 81, 73, 0.4);
}
.file-viewer-body {
  flex: 1;
  min-height: 0;
  padding: 1rem 1.25rem;
  background: var(--bg-dark);
  min-height: 200px;
  max-height: 360px;
  overflow-y: auto;
}
.file-viewer-content {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.file-viewer-content.encrypted {
  color: var(--danger);
  letter-spacing: 0.02em;
}

/* Fake app windows (File Explorer, Edge, Settings, Calendar, Photos, Calculator, Documents, Pictures, Music, Videos) */
.fake-app-window {
  width: 420px;
  max-width: calc(100vw - 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fake-app-window.fake-app-window-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.fake-app-title {
  background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.fake-app-title .window-title-text { flex: 1; min-width: 0; }
.fake-app-title .window-title-icon { font-size: 1rem; flex-shrink: 0; }
.fake-app-window-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.fake-app-window-close:hover {
  color: var(--text);
  background: rgba(248, 81, 73, 0.2);
  border-color: rgba(248, 81, 73, 0.4);
}
.fake-app-body {
  flex: 1;
  min-height: 0;
  padding: 1rem 1.25rem;
  background: var(--bg-dark);
  min-height: 180px;
  overflow-y: auto;
}
.fake-app-placeholder {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
/* File Explorer: body, sidebar folders, main area, items, context menu */
.file-explorer-window {
  width: 520px;
  max-width: calc(100vw - 3rem);
}
.file-explorer-body {
  display: flex;
  flex: 1;
  min-height: 0;
  min-height: 280px;
  overflow: hidden;
}
.file-explorer-sidebar {
  width: 160px;
  flex-shrink: 0;
  padding: 0.5rem 0;
  background: var(--bg-input);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.file-explorer-nav-label {
  padding: 0.4rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.file-explorer-folder {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
  transition: background 0.15s;
}
.file-explorer-folder:hover {
  background: rgba(255, 255, 255, 0.06);
}
.file-explorer-folder.active {
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent);
}
.file-explorer-folder.file-explorer-drop-target {
  background: rgba(88, 166, 255, 0.25);
  outline: 2px dashed var(--accent);
}
.file-explorer-main {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.5rem;
  align-items: flex-start;
}
.file-explorer-main.file-explorer-drop-target {
  background: rgba(88, 166, 255, 0.08);
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}
.file-explorer-item {
  width: 80px;
  padding: 0.5rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}
.file-explorer-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}
.file-explorer-item:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.file-explorer-item.file-explorer-item-dragging {
  opacity: 0.5;
}
.file-explorer-item.encrypted {
  filter: saturate(0.3) brightness(0.85);
  opacity: 0.9;
  position: relative;
}
.file-explorer-item.encrypted::after {
  content: '🔒';
  position: absolute;
  bottom: 0.15rem;
  right: 0.2rem;
  font-size: 0.85rem;
}
.file-explorer-item.encrypted .file-explorer-item-label {
  color: #b0a0a0;
}
.file-explorer-item-icon {
  font-size: 2rem;
  line-height: 1;
}
.file-explorer-item-label {
  font-size: 0.7rem;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}
.file-explorer-context-menu {
  position: fixed;
  z-index: 1000;
  min-width: 140px;
  padding: 0.25rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.file-explorer-context-menu[hidden] {
  display: none !important;
}
.file-explorer-context-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.file-explorer-context-item:hover:not(:disabled) {
  background: var(--bg-input);
}
.file-explorer-context-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.edge-title {
  background: linear-gradient(180deg, #0078d4 0%, #106ebe 100%);
  color: #fff;
}
.edge-title .window-title-icon {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-sans);
}
.edge-window .fake-app-window-close:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
}
.edge-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.edge-address-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.edge-address-input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.edge-address-input:focus {
  outline: none;
  border-color: var(--accent);
}
.edge-go-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  color: #fff;
  background: #0078d4;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.edge-go-btn:hover {
  background: #106ebe;
}
.edge-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  background: var(--bg-dark);
}
.edge-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}
.edge-page.hidden {
  display: none !important;
}
.edge-home-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.edge-block-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1;
}
.edge-block-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--danger);
}
.edge-block-detail {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 320px;
}
.edge-block-url {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  word-break: break-all;
}
.edge-block-hint {
  margin: 0;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  opacity: 0.8;
}
.edge-onion-block .edge-block-title {
  color: var(--warning);
}
.calculator-window {
  width: 280px;
}
.calculator-body {
  padding: 1rem;
  min-height: 320px;
}
.calculator-display {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  text-align: right;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 2.5rem;
  box-sizing: border-box;
}
.calculator-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}
.calculator-btn {
  padding: 0.65rem;
  font-size: 1.1rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.calculator-btn:hover {
  background: #1c2128;
  border-color: var(--accent-dim);
}
.calculator-btn-fn { color: var(--warning); }
.calculator-btn-op { color: var(--accent); }
.calculator-btn-zero { grid-column: span 2; }
.calculator-btn-eq {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.calculator-btn-eq:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}

/* Calendar app: month view, add/delete events */
.calendar-window {
  width: 360px;
  max-width: calc(100vw - 3rem);
}
.calendar-body {
  flex: 1;
  min-height: 0;
  padding: 0.75rem 1rem 1rem;
  background: var(--bg-dark);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}
.calendar-nav-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.calendar-nav-btn:hover {
  background: #1c2128;
  border-color: var(--accent-dim);
}
.calendar-month-year {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}
.calendar-weekdays span {
  padding: 0.2rem 0;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  flex-shrink: 0;
}
.calendar-day {
  aspect-ratio: 1;
  min-height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.calendar-day:hover {
  background: #1c2128;
  border-color: var(--border);
}
.calendar-day.calendar-day-current {
  font-weight: 500;
}
.calendar-day.calendar-day-other {
  color: var(--text-muted);
  opacity: 0.7;
}
.calendar-day.calendar-day-today {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
}
.calendar-day.calendar-day-selected {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.2);
  color: var(--text);
}
.calendar-day-dots {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.6rem;
  color: var(--accent);
  font-weight: 600;
}
.calendar-add-section,
.calendar-events-section {
  flex-shrink: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.calendar-section-title {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.calendar-add-row {
  margin-bottom: 0.5rem;
}
.calendar-add-row label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.calendar-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
}
.calendar-input:focus {
  outline: none;
  border-color: var(--accent);
}
.calendar-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.calendar-btn:hover {
  background: #1c2128;
  border-color: var(--accent-dim);
}
.calendar-btn-add {
  margin-top: 0.25rem;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.calendar-btn-add:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}
.calendar-events-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 120px;
  overflow-y: auto;
}
.calendar-events-empty {
  margin: 0;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.calendar-event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}
.calendar-event-item:last-child {
  margin-bottom: 0;
}
.calendar-event-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.calendar-event-delete {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.calendar-event-delete:hover {
  color: var(--danger);
  background: rgba(248, 81, 73, 0.2);
  border-color: rgba(248, 81, 73, 0.3);
}

.file-viewer-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.wallet-window {
  width: 440px;
  max-width: calc(100vw - 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.wallet-window.wallet-window-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.wallet-title {
  background: linear-gradient(180deg, #1a3d2e 0%, #0f2619 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wallet-title .window-title-text { flex: 1; min-width: 0; }
.wallet-title .window-title-icon { font-size: 1.1rem; flex-shrink: 0; }
.wallet-title .window-title-icon.wallet-title-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(145deg, #f7931a 0%, #e27800 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.wallet-window-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.wallet-window-close:hover {
  color: var(--text);
  background: rgba(248, 81, 73, 0.2);
  border-color: rgba(248, 81, 73, 0.4);
}
.wallet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.15rem 1.35rem 1.35rem;
  background: var(--bg-dark);
  min-height: 320px;
}
.wallet-balance-block {
  background: rgba(26, 61, 46, 0.35);
  border: 1px solid rgba(63, 185, 80, 0.2);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.1rem;
}
.wallet-balance-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wallet-balance-amount {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--success);
}
.wallet-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.wallet-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.wallet-tab:hover { color: var(--text); }
.wallet-tab.active {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--accent);
}
.wallet-tab-panel {
  display: block;
}
.wallet-tab-panel.hidden { display: none !important; }

/* Coinbase-style price hero: real-time BTC price */
.wallet-price-hero {
  background: linear-gradient(180deg, rgba(26, 61, 46, 0.4) 0%, rgba(15, 38, 25, 0.2) 100%);
  border: 1px solid rgba(63, 185, 80, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}
.wallet-price-asset {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.wallet-price-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.wallet-price-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.wallet-price-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--success);
  background: rgba(63, 185, 80, 0.15);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-left: auto;
}
.wallet-price-badge-pulse {
  animation: wallet-badge-pulse 1.5s ease-out;
}
@keyframes wallet-badge-pulse {
  0% { opacity: 1; box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
  100% { opacity: 1; box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); }
}
.wallet-price-amount {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.wallet-price-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* BTC price chart */
.wallet-chart-wrap {
  margin: 1rem 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.wallet-chart-timeframes {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.wallet-chart-tf {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wallet-chart-tf:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.wallet-chart-tf.active {
  color: var(--success);
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.3);
}
.wallet-chart-container {
  padding: 0.5rem 0.75rem;
  min-height: 140px;
}
.wallet-btc-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 140px;
  background: transparent;
}

/* Buy form: polished inputs */
.wallet-buy-form {
  margin-bottom: 0.5rem;
}
.wallet-form-row {
  margin-bottom: 0.75rem;
}
.wallet-form-row label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.wallet-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.wallet-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}
.wallet-input-prefix {
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  border-right: 1px solid var(--border);
}
.wallet-input-amount {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
}
.wallet-receive-row {
  background: rgba(63, 185, 80, 0.06);
  border: 1px solid rgba(63, 185, 80, 0.18);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.wallet-receive-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--success);
}
.wallet-receive-rate {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.wallet-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
}
.wallet-input:focus {
  outline: none;
}
.wallet-input::placeholder { color: var(--text-muted); opacity: 0.8; }
.wallet-card-input { letter-spacing: 0.1em; }
.wallet-address-input { font-size: 0.8rem; word-break: break-all; }
.wallet-form-row.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.wallet-divider {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1rem 0 0.5rem;
}
.wallet-card-block .wallet-form-row { margin-bottom: 0.5rem; }
.wallet-card-note, .wallet-card-note.wallet-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
}
.wallet-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  margin-top: 0.25rem;
  border: 1px solid transparent;
}
.wallet-btn-primary {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  width: 100%;
  margin-top: 0.75rem;
  font-weight: 600;
}
.wallet-btn-primary:hover { filter: brightness(1.1); }
.wallet-btn-link {
  background: transparent;
  color: var(--accent);
  border: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.85rem;
}
.wallet-btn-link:hover { text-decoration: underline; }
.wallet-status {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 1.2em;
}
.wallet-status.success { color: var(--success); }
.wallet-status.error { color: var(--danger); }
#wallet-window { cursor: default; }

/* Bmail — fake Gmail-style email window */
.bmail-window {
  width: 640px;
  max-width: calc(100vw - 3rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.bmail-window.bmail-window-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.bmail-title {
  background: linear-gradient(180deg, #ea4335 0%, #d93025 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bmail-title .window-title-text { flex: 1; min-width: 0; }
.bmail-title .window-title-icon { font-size: 1rem; flex-shrink: 0; }
.bmail-title .window-title-icon.bmail-title-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(145deg, #ea4335 0%, #d93025 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-sans);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.bmail-window-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.bmail-window-close:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
}
.bmail-app {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.bmail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: #c5221f;
  color: #fff;
}
.bmail-logo {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.bmail-search-placeholder {
  flex: 1;
  max-width: 480px;
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}
.bmail-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}
.bmail-sidebar {
  width: 140px;
  padding: 0.5rem 0;
  background: #f5f5f5;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.bmail-nav-item {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
  font-family: inherit;
  color: #202124;
  transition: background 0.15s;
}
.bmail-nav-item:hover { background: #e8eaed; }
.bmail-nav-item.active {
  background: #fce8e6;
  color: #c5221f;
  font-weight: 600;
}
.bmail-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}
.bmail-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.bmail-empty {
  margin: 1.5rem 1rem;
  font-size: 0.9rem;
  color: #5f6368;
  line-height: 1.5;
}
.bmail-email-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.1s;
}
.bmail-email-row:hover { background: #f5f5f5; }
.bmail-email-row.unread { background: #f9f9f9; }
.bmail-email-row.unread .bmail-email-from,
.bmail-email-row.unread .bmail-email-subject { font-weight: 700; }
.bmail-email-row:not(.unread) .bmail-email-from,
.bmail-email-row:not(.unread) .bmail-email-subject { font-weight: 400; }
.bmail-email-from {
  flex-shrink: 0;
  width: 140px;
  font-size: 0.85rem;
  font-weight: 400;
  color: #202124;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bmail-email-subject {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  color: #202124;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bmail-email-date {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #5f6368;
}
.bmail-view {
  flex: 1;
  padding: 1rem 1.25rem;
  overflow-y: auto;
  border-top: 1px solid #e0e0e0;
}
.bmail-view[hidden] { display: none !important; }
.bmail-view-header { margin-bottom: 1rem; }
.bmail-view-subject {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #202124;
}
.bmail-view-meta {
  font-size: 0.8rem;
  color: #5f6368;
}
.bmail-view-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #202124;
  white-space: pre-wrap;
}
.bmail-view-attachment {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}
.bmail-view-attachment[hidden] { display: none !important; }
.bmail-attachment-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 72px;
  padding: 0.5rem;
  background: #f0f4f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  font-family: inherit;
}
.bmail-attachment-icon:hover {
  background: #e8eef4;
  transform: scale(1.05);
}
.bmail-attachment-icon:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}
.bmail-attachment-icon.encrypted {
  filter: saturate(0.3) brightness(0.9);
  opacity: 0.95;
}
.bmail-attachment-icon.encrypted::after {
  content: '\1F512';
  position: absolute;
  bottom: 0.25rem;
  right: 0.35rem;
  font-size: 0.85rem;
}
.bmail-attachment-icon {
  position: relative;
}
.bmail-attachment-icon-symbol {
  font-size: 2rem;
  line-height: 1;
}
.bmail-attachment-icon-label {
  font-size: 0.7rem;
  text-align: center;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #5f6368;
}
.bmail-attachment-icon.encrypted .bmail-attachment-icon-label {
  color: #8a8383;
}
.bmail-view-decryptor-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}
.bmail-view-decryptor-wrap[hidden] { display: none !important; }
.bmail-decryptor-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: #1a73e8;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.bmail-decryptor-btn:hover {
  background: #1557b0;
}
#bmail-window { cursor: default; }

/* New message popup: bottom-right of desktop, above taskbar and chat; shows for a few seconds */
.bmail-new-message-popup {
  position: fixed;
  bottom: calc(var(--taskbar-height) + 1rem);
  right: 1.5rem;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
  color: #202124;
  animation: bmail-popup-in 0.3s ease;
  pointer-events: auto;
}
.bmail-new-message-popup[hidden] { display: none !important; }
.bmail-popup-icon { font-size: 1.1rem; flex-shrink: 0; }
.bmail-popup-text { flex: 1; }
.bmail-popup-read-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: #1a73e8;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.bmail-popup-read-btn:hover {
  background: #1557b0;
}
@keyframes bmail-popup-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Game window (main app on desktop) — hidden by default; only shown via Leaderboard or Begin Incident Response */
.game-window {
  min-width: 300px;
  max-width: 720px;
  width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.game-window:not([hidden]) {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.game-window[hidden] {
  display: none !important;
}
.game-window-leaderboard-only .section-label,
.game-window-leaderboard-only .game-nav {
  display: none !important;
}
.game-window-title {
  background: linear-gradient(180deg, #1e3a5f 0%, #152238 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.game-window-title .window-title-text { flex: 1; min-width: 0; }
.game-window-title .window-title-icon { font-size: 1.1rem; flex-shrink: 0; }
.game-window-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 400;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.game-window-close:hover {
  color: var(--text);
  background: rgba(248, 81, 73, 0.2);
  border-color: rgba(248, 81, 73, 0.4);
}
.game-window-close:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.game-window-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  min-height: 320px;
}
[data-view] { display: none; }
[data-view].active { display: block; }
.section-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.game-nav {
  margin-bottom: 1rem;
  text-align: right;
}
.game-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}
.game-nav a:hover { text-decoration: underline; }

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  gap: 0.25rem;
  z-index: 100;
}
.taskbar-start {
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.taskbar-start:hover { background: rgba(255, 255, 255, 0.08); }

/* Taskbar running-apps area */
.taskbar-apps {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
}
.taskbar-apps::-webkit-scrollbar { display: none; }

.taskbar-app-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  height: 30px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.taskbar-app-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.taskbar-app-btn.taskbar-app-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
}
.taskbar-app-btn.taskbar-app-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.taskbar-app-btn {
  position: relative;
}
.taskbar-app-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.taskbar-app-label {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.taskbar-tray {
  flex-shrink: 0;
  padding: 0 0.35rem;
}
.taskbar-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* --- Fake Windows-style Start menu (decorative) --- */
.start-menu {
  position: fixed;
  bottom: var(--taskbar-height);
  left: 0;
  width: 480px;
  max-width: 90vw;
  max-height: 70vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 90;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}
.start-menu[hidden] { display: none !important; }
.start-menu-body {
  display: flex;
  flex: 1;
  min-height: 320px;
  overflow: hidden;
}
.start-menu-left {
  flex: 1;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  align-content: start;
  pointer-events: none;
}
.start-menu-left #start-menu-file-explorer,
.start-menu-left #start-menu-leaderboard,
.start-menu-left #start-menu-edge,
.start-menu-left #start-menu-calendar,
.start-menu-left #start-menu-calculator {
  pointer-events: auto;
  cursor: pointer;
}
.start-menu-left.start-menu-left-single {
  grid-template-columns: 1fr;
}
.start-menu-tile {
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text);
  border: 1px solid transparent;
  transition: background 0.15s;
}
#start-menu-file-explorer:hover,
#start-menu-leaderboard:hover,
#start-menu-edge:hover,
#start-menu-calendar:hover,
#start-menu-calculator:hover {
  background: #1c2128;
  border-color: var(--accent-dim);
}
.start-menu-right {
  width: 180px;
  padding: 0.75rem 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  pointer-events: none;
}
.start-menu-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text);
  pointer-events: none;
}
.start-menu-user-icon {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.9;
}
.start-menu-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.start-menu-item {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
#start-menu-documents,
#start-menu-pictures,
#start-menu-music,
#start-menu-videos,
.start-menu-logoff,
.start-menu-power {
  pointer-events: auto;
  cursor: pointer;
}
#start-menu-documents:hover,
#start-menu-pictures:hover,
#start-menu-music:hover,
#start-menu-videos:hover,
#start-menu-logoff:hover,
#start-menu-power:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.start-menu-logoff,
.start-menu-power {
  pointer-events: auto;
  cursor: pointer;
}
.start-menu-power {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* --- Quiz popup: animated, only during quiz rounds --- */
.quiz-overlay {
  position: fixed;
  inset: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: opacity 0.25s ease;
}
.quiz-overlay[hidden] {
  display: none !important;
}
.quiz-popup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
  max-width: 520px;
  width: 100%;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.quiz-popup.quiz-popup-visible {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.quiz-popup-content {
  padding: 1.5rem;
}

/* --- Consequence popup (deadline expired / decryption success) --- */
.consequence-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: opacity 0.3s ease;
}
.consequence-overlay[hidden] {
  display: none !important;
}
.consequence-popup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 64px rgba(0, 0, 0, 0.6);
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.consequence-popup.consequence-popup-visible {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.consequence-popup-content {
  padding: 2rem;
}
.consequence-popup-content h2 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}
.consequence-popup-content .consequence-icon {
  font-size: 3rem;
  display: block;
  text-align: center;
  margin-bottom: 0.75rem;
}
.consequence-popup-content .consequence-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}
.consequence-popup-content .consequence-section {
  margin: 1rem 0;
}
.consequence-popup-content .consequence-section h3 {
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
  color: var(--text);
}
.consequence-popup-content .consequence-section ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}
.consequence-popup-content .consequence-section ul li {
  margin-bottom: 0.15rem;
}
.consequence-popup-content .consequence-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}
.consequence-popup-content .consequence-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.consequence-popup-content .consequence-actions .btn {
  flex: 1;
  min-width: 140px;
}
/* Leak variant: red accent */
.consequence-popup.consequence-leak {
  border-color: rgba(248, 81, 73, 0.4);
}
.consequence-popup.consequence-leak h2 {
  color: #f85149;
}
/* Win variant: green accent */
.consequence-popup.consequence-win {
  border-color: rgba(63, 185, 80, 0.4);
}
.consequence-popup.consequence-win h2 {
  color: #3fb950;
}

.quiz-card .quiz-progress {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.quiz-card .quiz-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--text);
}
.quiz-card .quiz-desc {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.quiz-option:hover {
  border-color: var(--accent-dim);
  background: #1c2128;
}
.quiz-option input { accent-color: var(--accent); margin-top: 0.2rem; }
.quiz-option span { flex: 1; }
.quiz-next { width: 100%; }

/* --- Views --- */
.view { display: none; }
.view.active { display: block; }
.view-content { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Cards (results, leaderboard) --- */
.results-card,
.leaderboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.results-card h2,
.leaderboard-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  color: var(--text);
}

/* Desktop chat panel: "Blackout_Op is typing…" */
.chat-loading {
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Buttons --- */
.results-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dim); }
.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: #1c2128;
  border-color: var(--accent-dim);
}

/* --- Results --- */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.score-box {
  padding: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.score-box.total {
  grid-column: 1 / -1;
  background: rgba(56, 139, 253, 0.12);
  border-color: var(--accent-dim);
}
.score-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.score-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
}

.results-copy { margin: 1rem 0 0.5rem; font-size: 0.9rem; color: var(--text-muted); }

.leaderboard-form {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.leaderboard-form input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.leaderboard-form input[type="text"]::placeholder { color: var(--text-muted); }

.results-actions { margin-top: 1.5rem; }

/* --- Leaderboard table --- */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.leaderboard-table th,
.leaderboard-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.leaderboard-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.leaderboard-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.leaderboard-card .btn { margin-top: 0.5rem; }

/* --- Footer --- */
.site-footer {
  flex-shrink: 0;
  padding: 1rem 1.5rem;
  padding-bottom: calc(var(--taskbar-height) + 1rem);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-dark);
  position: relative;
  z-index: 1;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
