/* RetroCloud Emulator CSS */
:root {
  --bg-main: #0b0f19;
  --bg-card: #131c2e;
  --bg-card-hover: #1b263b;
  --bg-nav: rgba(15, 23, 42, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #243048;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

/* Panic Button Trigger */
.panic-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.panic-badge:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.02);
}

.panic-badge kbd {
  background: #ef4444;
  color: white;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 900;
}

/* Main Container */
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
  width: 100%;
}

/* Hero & Header */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-title h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.filter-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.platform-pill {
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.platform-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.platform-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.pill-count {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 1.15rem;
}

/* Game Card */
.game-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

.game-cover-container {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Square 1:1 ratio */
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0f172a;
}

.game-cover-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .game-cover-img {
  transform: scale(1.05);
}

.game-platform-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2;
}

.game-last-played-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #e2e8f0;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2;
  white-space: nowrap;
}

.game-card-content {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.game-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.game-card-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.btn-play {
  flex: 1;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.42rem 0.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  white-space: nowrap;
}

.btn-play:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-resume {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.42rem 0.55rem;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

.btn-resume:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-1px);
  color: white;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.btn-resume-icon {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #10b981 !important;
}

.btn-resume-icon:hover {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.panic-btn-square {
  width: 30px;
  height: 30px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #ef4444;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.panic-btn-square:hover {
  background: #ef4444;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover {
  background: #059669;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

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

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: #0b0f19;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(11, 15, 25, 0.5);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.dropzone-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* Flash alerts */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* PLAYER / EMULATOR LAYOUT */
body.player-page {
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
  display: flex;
  flex-direction: column;
}

body.player-page .player-wrapper {
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  max-width: 100%;
  margin: 0;
  background: #000;
  border-radius: 0;
  border: none;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.player-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  margin: 0 auto;
  background: #000;
  overflow: hidden;
}

.player-topbar {
  background: #0f172a;
  padding: 0.35rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  z-index: 10;
}

.player-game-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.player-game-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.player-screen-area {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#game-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Compact Slot & Save/Load Controls */
.compact-slot-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2px 4px;
  gap: 4px;
}

.compact-slot-select {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 0.22rem 0.45rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  max-width: 175px;
  transition: border-color 0.15s ease;
}

.compact-slot-select:focus {
  border-color: var(--primary);
}

.compact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.22rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.compact-btn-save {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.compact-btn-save:hover {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.compact-btn-load {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.compact-btn-load:hover {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.compact-btn-speed {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
}

.compact-btn-speed:hover {
  background: #f59e0b;
  color: #111827;
  border-color: #f59e0b;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.compact-btn-speed.speed-active {
  background: #f59e0b;
  color: #111827;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Bottom status bar removed */
.player-bottombar {
  display: none !important;
}

/* Bulletproof suppression of EmulatorJS built-in menus and buttons requested to be removed */
.ejs_context_menu,
#ejs_context_menu,
div[class*="ejs_context_menu"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ejs_settings_parent,
.ejs_settings_main_bar,
.ejs_menu_button[title*="Exit" i],
.ejs_menu_button[title*="Salir" i],
.ejs_menu_button[title*="Settings" i],
.ejs_menu_button[title*="Ajustes" i],
.ejs_menu_button[title*="Configuraci" i],
.ejs_menu_button[title*="Save State" i],
.ejs_menu_button[title*="Load State" i],
.ejs_menu_button[title*="Save File" i],
.ejs_menu_button[title*="Import Save" i],
.ejs_menu_button[title*="Export Save" i],
.ejs_menu_button[title*="Cache" i],
.ejs_menu_button[title*="Context" i] {
  display: none !important;
}

@media (max-width: 768px) {
  .player-topbar {
    padding: 0.25rem 0.5rem;
    gap: 0.35rem;
  }
  .player-game-title {
    max-width: 130px;
  }
  .key-reference-pill {
    display: none;
  }
}

.save-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-dot.saving {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Key cheat sheet banner */
.key-reference-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.key-reference-pill strong {
  color: var(--text-main);
}

/* PANIC DECOY: FAKE EXCEL / GOOGLE SHEETS SCREEN */
#panic-decoy-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  color: #202124;
  z-index: 999999;
  display: none;
  flex-direction: column;
  font-family: Arial, sans-serif;
  user-select: none;
}

.decoy-header {
  background: #ffffff;
  border-bottom: 1px solid #dadce0;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.decoy-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.decoy-logo-icon {
  width: 32px;
  height: 32px;
  background: #0f9d58;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.decoy-doc-title {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
}

.decoy-menu-bar {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #3c4043;
  margin-top: 4px;
}

.decoy-toolbar {
  background: #edf2fa;
  border-radius: 20px;
  margin: 6px 16px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.decoy-formula-bar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #dadce0;
  padding: 4px 16px;
  background: #f8f9fa;
  font-size: 13px;
}

.decoy-cell-name {
  width: 48px;
  font-weight: bold;
  color: #5f6368;
}

.decoy-formula-input {
  flex: 1;
  background: white;
  border: 1px solid #dadce0;
  padding: 2px 6px;
  font-family: monospace;
}

.decoy-sheet-container {
  flex: 1;
  overflow: auto;
  background: #ffffff;
}

.decoy-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

.decoy-table th, .decoy-table td {
  border: 1px solid #dadce0;
  padding: 4px 8px;
  white-space: nowrap;
}

.decoy-table th {
  background: #f8f9fa;
  color: #5f6368;
  font-weight: normal;
  text-align: center;
}

.decoy-table th.row-num {
  width: 36px;
}

.decoy-footer-tabs {
  background: #f8f9fa;
  border-top: 1px solid #dadce0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 36px;
  gap: 8px;
  font-size: 12px;
}

.decoy-tab {
  padding: 6px 16px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  font-weight: bold;
  color: #0f9d58;
}

.decoy-restore-btn {
  position: absolute;
  bottom: 6px;
  right: 12px;
  opacity: 0.15;
  background: #000;
  color: #fff;
  border: none;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.decoy-restore-btn:hover {
  opacity: 0.9;
}

/* Toast notifications (Bottom Right, Single Popup) */
.toast-container {
  position: fixed;
  bottom: 2.2rem;
  right: 1.25rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  pointer-events: auto;
}

.toast-success {
  border-left: 3px solid #10b981;
}

.toast-error {
  border-left: 3px solid #ef4444;
}

.toast-info {
  border-left: 3px solid #6366f1;
}

/* Hide EmulatorJS Cache Manager from player popup menu & settings */
.ejs_menu_button:has(svg[viewBox="0 0 1800 1800"]),
button.ejs_menu_button[title*="Cache"],
button.ejs_menu_button[title*="Caché"],
.ejs_cache_menu,
#ejs_cache_menu {
  display: none !important;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* =========================================================
   PANIC DECOY 1: GOOGLE SEARCH
   ========================================================= */
.decoy-google {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: #ffffff;
  color: #202124;
  font-family: Roboto, Arial, sans-serif;
  overflow-y: auto;
}

.google-header {
  display: flex;
  align-items: center;
  padding: 20px 24px 10px 24px;
  border-bottom: 1px solid #ebebeb;
  gap: 24px;
  flex-wrap: wrap;
}

.google-logo-text {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -1px;
  cursor: pointer;
}

.google-search-box {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 690px;
  height: 44px;
  background: #ffffff;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  padding: 0 16px;
  box-shadow: 0 1px 6px rgba(32,33,36,0.15);
  font-size: 14px;
}

.google-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: #202124;
  background: transparent;
}

.google-nav-tabs {
  display: flex;
  gap: 20px;
  padding: 10px 160px;
  font-size: 13px;
  color: #5f6368;
  border-bottom: 1px solid #ebebeb;
}

.google-tab.active {
  color: #1a73e8;
  font-weight: 600;
  border-bottom: 3px solid #1a73e8;
  padding-bottom: 8px;
}

.google-results-container {
  padding: 12px 160px 40px 160px;
  max-width: 900px;
}

.google-stats {
  font-size: 13px;
  color: #70757a;
  margin-bottom: 24px;
}

.google-result-item {
  margin-bottom: 28px;
}

.google-cite {
  font-size: 13px;
  color: #202124;
  display: block;
  margin-bottom: 4px;
}

.google-title {
  font-size: 19px;
  color: #1a0dab;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.3;
  display: inline-block;
  margin-bottom: 4px;
}

.google-title:hover {
  text-decoration: underline;
}

.google-snippet {
  font-size: 14px;
  color: #4d5156;
  line-height: 1.58;
}

/* =========================================================
   PANIC DECOY 2: VS CODE (PHP CODE EDITOR)
   ========================================================= */
.decoy-vscode {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: Consolas, 'Courier New', monospace;
  overflow: hidden;
  user-select: text;
}

.vscode-top-titlebar {
  height: 30px;
  background: #323233;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #cccccc;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border-bottom: 1px solid #252526;
  position: relative;
}

.vscode-main-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.vscode-activitybar {
  width: 48px;
  background: #333333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  gap: 20px;
  color: #858585;
}

.vscode-activity-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.vscode-activity-icon.active {
  color: #ffffff;
  border-left: 2px solid #ffffff;
}

.vscode-sidebar {
  width: 240px;
  background: #252526;
  border-right: 1px solid #1e1e1e;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  color: #cccccc;
  display: flex;
  flex-direction: column;
}

.vscode-sidebar-title {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #bbbbbb;
  text-transform: uppercase;
}

.vscode-file-tree {
  padding: 4px 8px;
  line-height: 22px;
}

.vscode-file-item {
  padding: 2px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 3px;
}

.vscode-file-item.active {
  background: #37373d;
  color: #ffffff;
}

.vscode-editor-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  overflow: hidden;
}

.vscode-tabs-bar {
  height: 35px;
  background: #252526;
  display: flex;
  border-bottom: 1px solid #1e1e1e;
}

.vscode-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: #1e1e1e;
  color: #ffffff;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border-top: 2px solid #007acc;
  cursor: pointer;
}

.vscode-breadcrumbs {
  height: 24px;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 11px;
  color: #858585;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  gap: 6px;
}

.vscode-code-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  padding: 8px 0;
  font-size: 13px;
  line-height: 20px;
}

.vscode-line-numbers {
  width: 48px;
  color: #858585;
  text-align: right;
  padding-right: 14px;
  user-select: none;
}

.vscode-code-pane {
  flex: 1;
  padding-left: 10px;
  white-space: pre;
}

.code-keyword { color: #c586c0; font-weight: bold; }
.code-fn { color: #dcdcaa; }
.code-var { color: #9cdcfe; }
.code-str { color: #ce9178; }
.code-comment { color: #6a9955; font-style: italic; }
.code-type { color: #4ec9b0; }

.vscode-statusbar {
  height: 22px;
  background: #007acc;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =========================================================
   PANIC DECOY 3: PHPMYADMIN
   ========================================================= */
.decoy-pma {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: #f3f3f3;
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-y: auto;
}

.pma-header {
  background: #ffffff;
  border-bottom: 1px solid #d3d3d3;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pma-breadcrumbs {
  font-size: 13px;
  color: #555555;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pma-nav-tabs {
  background: #e4e4e4;
  border-bottom: 1px solid #cccccc;
  display: flex;
  padding: 0 16px;
  gap: 4px;
}

.pma-nav-tab {
  padding: 8px 16px;
  font-size: 12px;
  color: #444444;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pma-nav-tab.active {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  border: 1px solid #cccccc;
  border-bottom: 1px solid #ffffff;
  margin-bottom: -1px;
}

.pma-content {
  padding: 16px;
  max-width: 1400px;
}

.pma-alert-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pma-sql-box {
  background: #ffffff;
  border: 1px solid #cccccc;
  border-left: 4px solid #28a745;
  padding: 8px 12px;
  font-family: Consolas, monospace;
  font-size: 12px;
  color: #000000;
  margin-bottom: 16px;
}

.pma-data-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #cccccc;
  font-size: 12px;
}

.pma-data-table th, .pma-data-table td {
  border: 1px solid #e0e0e0;
  padding: 6px 10px;
  text-align: left;
}

.pma-data-table th {
  background: #e9ecef;
  color: #495057;
  font-weight: 700;
}

.pma-action-link {
  color: #0056b3;
  text-decoration: none;
  margin-right: 6px;
  font-size: 11px;
}
.pma-action-link:hover { text-decoration: underline; }
