/* Simple, clean, minimal stylesheet with custom properties for theming */
:root {
  --bg: #ffffff;
  --text: #222222;
  --text-heading: #111111;
  --text-muted: #666666;
  --text-subtle: #888888;
  --border: #e0e0e0;
  --border-focus: #0b57d0;
  --accent: #0b57d0;
  --accent-hover: #002d72;
  --bg-card: #fafafa;
  --bg-code: #f5f5f5;
  --input-bg: #ffffff;
  --input-border: #cccccc;
  --btn-bg: #222222;
  --btn-text: #ffffff;
  --btn-hover: #444444;
  --tag-bg: #f0f0f0;
  --tag-text: #444444;
  --tag-active-bg: #222222;
  --tag-active-text: #ffffff;
  --overlay-bg: rgba(0, 0, 0, 0.4);
  --terminal-bg: #0d1117;
  --terminal-text: #c9d1d9;
  --terminal-prompt: #58a6ff;
  --terminal-border: #30363d;
  --terminal-header: #161b22;
  --status-success-bg: #f0fdf4;
  --status-success-text: #166534;
  --status-success-border: #bbf7d0;
  --status-error-bg: #fef2f2;
  --status-error-text: #991b1b;
  --status-error-border: #fecaca;
}

[data-theme="dark"] {
  --bg: #121417;
  --text: #d8dee9;
  --text-heading: #eceff4;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border: #283039;
  --border-focus: #60a5fa;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --bg-card: #191e24;
  --bg-code: #1e242c;
  --input-bg: #191e24;
  --input-border: #333d48;
  --btn-bg: #e2e8f0;
  --btn-text: #0f172a;
  --btn-hover: #ffffff;
  --tag-bg: #222933;
  --tag-text: #cbd5e1;
  --tag-active-bg: #60a5fa;
  --tag-active-text: #0f172a;
  --overlay-bg: rgba(0, 0, 0, 0.7);
  --terminal-bg: #0b0e14;
  --terminal-text: #e2e8f0;
  --terminal-prompt: #38bdf8;
  --terminal-border: #242c38;
  --terminal-header: #141922;
  --status-success-bg: #064e3b;
  --status-success-text: #a7f3d0;
  --status-success-border: #047857;
  --status-error-bg: #7f1d1d;
  --status-error-text: #fecaca;
  --status-error-border: #b91c1c;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 99999;
  text-decoration: none;
  transition: top 0.15s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--border-focus);
}

.container {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1;
}

header {
  margin-bottom: 24px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.intro {
  margin-bottom: 16px;
  color: var(--text);
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 24px;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
}

p {
  margin-bottom: 12px;
}

ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

li {
  margin-bottom: 6px;
}

.skills-list li,
.contact-list li {
  margin-bottom: 8px;
}

.item {
  margin-bottom: 20px;
  transition: opacity 0.2s ease;
}

.meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

a {
  color: var(--accent);
  text-decoration: underline;
}

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

.links {
  font-size: 0.95rem;
  margin-top: 8px;
}

.links a {
  margin: 0 2px;
}

/* Nav Toolbar & Action Badges */
.nav-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.85rem;
}

.toolbar-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.toolbar-btn:hover {
  border-color: var(--border-focus);
  color: var(--accent);
  background: var(--bg-card);
}

.kbd-hint {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  background: var(--bg-code);
  color: var(--text-subtle);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 4px;
  line-height: 1.1;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

footer {
  margin-top: auto;
  padding-top: 40px;
  font-size: 0.85rem;
}

/* Form controls & minimal UI elements */
label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text-heading);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  background-color: var(--input-bg);
  color: var(--text);
  margin-bottom: 6px;
  transition: border-color 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

input[type="file"] {
  display: block;
  font-size: 0.9rem;
  margin-top: 4px;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group {
  margin-bottom: 16px;
}

.char-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 12px;
}

button {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 7px 16px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-bg);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

button:hover {
  background-color: var(--btn-hover);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.btn-secondary {
  background-color: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

button.btn-secondary:hover {
  background-color: var(--bg-card);
  border-color: var(--border-focus);
}

button.btn-action {
  font-size: 0.78rem;
  padding: 2px 7px;
  background: none;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-left: 6px;
  cursor: pointer;
  vertical-align: middle;
}

button.btn-action:hover {
  border-color: var(--accent);
  background-color: var(--bg-card);
}

button.btn-danger {
  background-color: var(--bg);
  color: #dc2626;
  border: 1px solid #f87171;
  padding: 4px 10px;
  font-size: 0.85rem;
}

button.btn-danger:hover {
  background-color: #fee2e2;
}

.status-box {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.status-box.success {
  background-color: var(--status-success-bg);
  color: var(--status-success-text);
  border: 1px solid var(--status-success-border);
}

.status-box.error {
  background-color: var(--status-error-bg);
  color: var(--status-error-text);
  border: 1px solid var(--status-error-border);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-record {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 14px;
  background-color: var(--bg-card);
}

.record-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.record-text {
  background-color: var(--bg);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 8px;
}

.record-file {
  font-size: 0.9rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Creative Feature 1: Project Explorer & Filter Controls
   ========================================================================== */
.project-controls {
  margin-bottom: 18px;
}

.project-search-wrapper {
  position: relative;
  margin-bottom: 10px;
}

.project-search-input {
  width: 100%;
  padding: 8px 30px 8px 10px;
  font-size: 0.9rem;
}

.project-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  display: none;
}

.project-search-clear:hover {
  color: var(--text-heading);
  background: none;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.filter-tag {
  background-color: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.filter-tag:hover {
  background-color: var(--border);
}

.filter-tag.active {
  background-color: var(--tag-active-bg);
  color: var(--tag-active-text);
  font-weight: 500;
}

.project-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.item-highlight {
  background-color: rgba(255, 220, 40, 0.25);
  padding: 1px 2px;
  border-radius: 2px;
}

[data-theme="dark"] .item-highlight {
  background-color: rgba(250, 204, 21, 0.25);
}

/* ==========================================================================
   Creative Feature 2: Dynamic GitHub Repo Explorer
   ========================================================================== */
.github-explorer {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
  background-color: var(--bg-card);
  margin-top: 14px;
}

.github-explorer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.github-explorer-title {
  font-weight: 600;
  color: var(--text-heading);
}

.repo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.repo-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  background-color: var(--bg);
  font-size: 0.88rem;
  transition: border-color 0.15s ease;
}

.repo-card:hover {
  border-color: var(--border-focus);
}

.repo-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.repo-name {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.repo-name:hover {
  text-decoration: underline;
}

.repo-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lang-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #f1e05a;
  display: inline-block;
}

[hidden],
.palette-backdrop[hidden],
.terminal-drawer[hidden],
.game-backdrop[hidden] {
  display: none !important;
}

.palette-backdrop {
  position: fixed;
  inset: 0;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  z-index: 1000;
  animation: fadeIn 0.12s ease-out;
}

.palette-dialog {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.palette-input-wrapper {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  gap: 8px;
}

.palette-icon {
  color: var(--text-subtle);
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
}

.palette-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.95rem;
  color: var(--text);
}

.palette-input:focus {
  outline: none;
}

.palette-results {
  max-height: 280px;
  overflow-y: auto;
  list-style: none;
  padding: 6px 0;
  margin: 0;
}

.palette-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  border-left: 2px solid transparent;
}

.palette-item.active,
.palette-item:hover {
  background-color: var(--bg-card);
  border-left-color: var(--accent);
  color: var(--accent);
}

.palette-item-desc {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.palette-footer {
  border-top: 1px solid var(--border);
  padding: 6px 14px;
  font-size: 0.75rem;
  color: var(--text-subtle);
  display: flex;
  justify-content: space-between;
  background-color: var(--bg-card);
}

/* ==========================================================================
   Creative Feature 4: Interactive Developer Terminal
   ========================================================================== */
.terminal-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 340px;
  background-color: var(--terminal-bg);
  color: var(--terminal-text);
  border-top: 1px solid var(--terminal-border);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  animation: slideUp 0.15s ease-out;
}

.terminal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background-color: var(--terminal-header);
  border-bottom: 1px solid var(--terminal-border);
  font-size: 0.78rem;
  color: #8b949e;
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-btn-icon {
  background: none;
  border: none;
  color: #8b949e;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.8rem;
  font-family: inherit;
}

.terminal-btn-icon:hover {
  color: #f0f6fc;
  background: none;
}

.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}

.terminal-output {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  margin-bottom: 6px;
}

.terminal-output .cmd-echo {
  color: #58a6ff;
}

.terminal-output .cmd-success {
  color: #3fb950;
}

.terminal-output .cmd-error {
  color: #f85149;
}

.terminal-output .cmd-meta {
  color: #8b949e;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.terminal-prompt {
  color: var(--terminal-prompt);
  user-select: none;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f0f6fc;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0;
  margin: 0;
}

.terminal-input:focus {
  outline: none;
}

/* ==========================================================================
   Creative Feature 5: Shortcuts Modal & Toasts
   ========================================================================== */
.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin: 16px 0;
  font-size: 0.86rem;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 4px;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: var(--text-heading);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInRight 0.18s ease-out;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 24px 16px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .shortcuts-grid {
    grid-template-columns: 1fr;
  }

  .terminal-drawer {
    height: 380px;
  }

  .nav-toolbar {
    margin-top: 12px;
  }
}

/* ==========================================================================
   Interactive Portfolio Playground / Customization Editor Styles
   ========================================================================== */
body.customization-active {
  padding-top: 50px;
  user-select: none;
}

body.customization-active .container {
  transition: max-width 0.25s ease;
}

/* Editable Elements Hover & Selection Outlines */
body.customization-active [data-custom-id] {
  position: relative;
  transition: outline 0.15s ease, box-shadow 0.15s ease;
}

body.customization-active [data-custom-id]:hover {
  outline: 1px dashed var(--border-focus);
  cursor: pointer;
}

body.customization-active [data-custom-id].editor-selected {
  outline: 2px solid var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(11, 87, 208, 0.12);
}

[data-theme="dark"] body.customization-active [data-custom-id].editor-selected {
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

/* Drag Handles */
.editor-drag-handle {
  display: none;
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 50;
  width: 24px;
  height: 24px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 4px;
  font-size: 0.85rem;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  user-select: none;
  touch-action: none;
}

body.customization-active [data-custom-id]:hover>.editor-drag-handle,
body.customization-active [data-custom-id].editor-selected>.editor-drag-handle {
  display: flex;
}

.editor-drag-handle:active {
  cursor: grabbing;
}

/* Dragging state */
.is-dragging {
  opacity: 0.45;
  outline: 2px dashed var(--accent) !important;
}

.is-free-dragging {
  opacity: 0.85;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 100;
}

/* Drop Placeholder */
.editor-drop-placeholder {
  border: 2px dashed var(--accent);
  background-color: rgba(11, 87, 208, 0.05);
  border-radius: 4px;
  margin: 12px 0;
  transition: all 0.15s ease;
}

[data-theme="dark"] .editor-drop-placeholder {
  background-color: rgba(96, 165, 250, 0.08);
}

/* Resize Handles */
.editor-resize-handle {
  position: absolute;
  background-color: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  z-index: 60;
  touch-action: none;
}

.resize-handle-e {
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 24px;
  border-radius: 3px;
  cursor: ew-resize;
}

.resize-handle-s {
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 10px;
  border-radius: 3px;
  cursor: ns-resize;
}

.resize-handle-se {
  right: -6px;
  bottom: -6px;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  cursor: nwse-resize;
}

/* Topbar Floating Controls */
.editor-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 46px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 9999;
  font-family: inherit;
  font-size: 0.85rem;
  animation: slideDown 0.18s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

.editor-topbar-left,
.editor-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-badge {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  background-color: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}

.editor-btn {
  background-color: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.editor-btn:hover:not(:disabled) {
  border-color: var(--border-focus);
  background-color: var(--bg-card);
  color: var(--accent);
}

.editor-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.editor-btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  font-weight: 600;
}

.editor-btn-primary:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

/* Dropdown Menus */
.editor-dropdown {
  position: relative;
  display: inline-block;
}

.editor-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 170px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  padding: 4px 0;
  z-index: 10001;
  margin-top: 4px;
}

.editor-dropdown:hover .editor-dropdown-menu,
.editor-dropdown:focus-within .editor-dropdown-menu {
  display: block;
}

.editor-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 7px 12px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
}

.editor-menu-item:hover {
  background-color: var(--bg-card);
  color: var(--accent);
}

/* Preview Group */
.editor-preview-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.editor-preview-btn {
  background-color: var(--bg);
  border: none;
  padding: 3px 8px;
  font-size: 0.82rem;
  cursor: pointer;
}

.editor-preview-btn:not(:last-child) {
  border-right: 1px solid var(--border);
}

.editor-preview-btn.active {
  background-color: var(--accent);
  color: #ffffff;
}

/* Snap checkbox */
.editor-snap-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Hidden Items Bar */
.editor-hidden-bar {
  position: fixed;
  top: 46px;
  left: 0;
  right: 0;
  background-color: var(--status-error-bg);
  border-bottom: 1px solid var(--status-error-border);
  color: var(--status-error-text);
  padding: 4px 16px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 9998;
}

.hidden-item-pill {
  background-color: var(--bg);
  border: 1px solid var(--status-error-border);
  color: var(--status-error-text);
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
}

.hidden-item-pill:hover {
  background-color: var(--status-error-border);
}

/* Contextual Inspector Panel */
.editor-inspector {
  position: fixed;
  right: 20px;
  top: 58px;
  width: 270px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 9997;
  font-size: 0.82rem;
  animation: fadeIn 0.15s ease-out;
}

.inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.inspector-title {
  font-weight: 600;
  color: var(--text-heading);
}

.inspector-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0 4px;
}

.inspector-close-btn:hover {
  color: var(--text-heading);
  background: none;
}

.inspector-body {
  padding: 12px;
}

.inspector-row {
  margin-bottom: 10px;
}

.inspector-row label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inspector-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inspector-input-group input[type="range"] {
  flex: 1;
}

.inspector-val {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 38px;
  text-align: right;
  font-family: ui-monospace, monospace;
}

.inspector-select {
  width: 100%;
  padding: 4px 6px;
  font-size: 0.8rem;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  background-color: var(--input-bg);
  color: var(--text);
}

.inspector-btn-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.insp-btn {
  flex: 1;
  background-color: var(--bg);
  border: none;
  padding: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

.insp-btn:not(:last-child) {
  border-right: 1px solid var(--border);
}

.insp-btn:hover {
  background-color: var(--bg-card);
}

.inspector-color-picker {
  width: 32px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0;
  cursor: pointer;
  background: none;
}

.insp-subtle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
}

.insp-subtle-btn:hover {
  background-color: var(--bg-card);
}

.insp-action-btn {
  flex: 1;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text);
}

.insp-action-btn:hover {
  border-color: var(--border-focus);
  background-color: var(--bg-card);
}

.insp-danger-btn {
  color: #dc2626;
  border-color: #f87171;
}

.insp-danger-btn:hover {
  background-color: #fee2e2;
}

/* User Decorations */
.user-decoration {
  position: relative;
  margin: 12px 0;
}

.decoration-note {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.decoration-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.decoration-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.decoration-del-btn {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0 4px;
}

.decoration-del-btn:hover {
  color: #dc2626;
  background: none;
}

.decoration-text {
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.decoration-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 500;
}

.badge-text {
  outline: none;
}

.decoration-emoji {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.8rem;
  line-height: 1;
}

.decoration-divider .divider-line {
  height: 2px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 16px 0;
}

/* Responsive Device Preview Frames */
[data-preview-mode="tablet"] .container,
[data-preview-mode="mobile"] .container {
  box-shadow: 0 0 0 1px var(--border), 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  margin-top: 16px;
  margin-bottom: 30px;
  background-color: var(--bg);
}

/* ==========================================================================
   "Hire Me" Arcade Game Styles
   ========================================================================== */
.hire-me-pill {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #be123c 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.45);
  animation: pulseGlow 2.4s infinite;
  transition: all 0.2s ease;
  text-decoration: none !important;
  font-family: inherit;
}

.hire-me-pill:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 18px rgba(244, 63, 94, 0.7);
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 2px 10px rgba(244, 63, 94, 0.45), 0 0 12px rgba(244, 63, 94, 0.25);
  }

  50% {
    box-shadow: 0 2px 16px rgba(244, 63, 94, 0.75), 0 0 24px rgba(244, 63, 94, 0.45);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ats-apocalypse-pill {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
  color: #ffffff !important;
  border: 1px solid rgba(254, 202, 202, 0.35);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.45);
  animation: pulseRedGlow 2.4s infinite;
  transition: all 0.2s ease;
  text-decoration: none !important;
  font-family: inherit;
}

.ats-apocalypse-pill:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.7);
}

@keyframes pulseRedGlow {

  0%,
  100% {
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.45), 0 0 12px rgba(220, 38, 38, 0.25);
  }

  50% {
    box-shadow: 0 2px 16px rgba(220, 38, 38, 0.75), 0 0 24px rgba(220, 38, 38, 0.45);
  }
}

/* Game Modal Backdrop */
.game-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 18, 0.94);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  animation: fadeIn 0.15s ease-out;
}

/* Arcade Cabinet Container */
.arcade-cabinet {
  max-width: 990px;
  width: 100%;
  background: #0c101d;
  border: 2px solid #6366f1;
  border-radius: 12px;
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #f8fafc;
}

/* Arcade Top Bar */
.arcade-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #111827;
  border-bottom: 2px solid #1f2937;
  gap: 12px;
  flex-wrap: wrap;
}

.arcade-player-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.pixel-avatar {
  font-size: 1.3rem;
}

.game-hearts {
  font-size: 0.95rem;
  letter-spacing: 2px;
}

.arcade-level-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  max-width: 300px;
}

.arcade-level-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.arcade-progress-bar {
  width: 100%;
  height: 6px;
  background: #1f2937;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #374151;
}

.arcade-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #38bdf8, #4ade80, #facc15);
  transition: width 0.2s ease;
}

.arcade-score-box {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: ui-monospace, monospace;
}

.arcade-score-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: #facc15;
}

.arcade-close-btn {
  background: none;
  border: 1px solid #374151;
  color: #94a3b8;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
}

.arcade-close-btn:hover {
  color: #ffffff;
  border-color: #f43f5e;
  background: #f43f5e;
}

/* 3-Column Arcade Grid */
.arcade-grid {
  display: grid;
  grid-template-columns: 245px 1fr 265px;
  gap: 12px;
  padding: 12px;
  background: #090d16;
}

/* Left Story Card (Retro Parchment) */
.story-card {
  background: #fef3c7;
  color: #78350f;
  border: 2px solid #fde68a;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.1rem;
}

.story-title {
  font-size: 1rem;
  font-weight: 800;
  color: #92400e;
  margin-top: 4px;
  margin-bottom: 10px;
  text-align: center;
  border-bottom: 1px dashed #f59e0b;
  padding-bottom: 4px;
}

.story-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  font-size: 0.8rem;
  line-height: 1.6;
}

.story-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  color: #78350f;
}

.story-icon {
  margin-right: 4px;
}

.story-check {
  font-weight: 800;
  color: #16a34a;
}

.story-speech-bubble {
  margin-top: auto;
  background: #ffffff;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.74rem;
  color: #854d0e;
  font-style: italic;
  line-height: 1.35;
  position: relative;
}

.story-speech-bubble::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
}

/* Center Canvas */
.arcade-canvas-wrapper {
  position: relative;
  background: #060913;
  border: 2px solid #1e293b;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

#game-canvas {
  display: block;
  width: 100%;
  max-width: 460px;
  height: 420px;
  background: #060913;
  cursor: crosshair;
}

/* Canvas Screen Overlays */
.game-screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 29, 0.88);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.game-screen-card {
  text-align: center;
  max-width: 360px;
  animation: fadeIn 0.15s ease-out;
}

.pixel-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #facc15;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.pixel-sub {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 14px;
  line-height: 1.4;
}

.obstacle-preview {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.badge-sample {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.arcade-primary-btn {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  transition: all 0.15s ease;
  font-family: inherit;
}

.arcade-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.6);
}

.meta-keys {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 10px;
}

.game-stats-row {
  display: flex;
  justify-content: space-around;
  background: #1e293b;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  color: #94a3b8;
}

.game-stats-row strong {
  color: #facc15;
}

.victory-box {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #4ade80;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arcade-cta-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
  transition: all 0.15s ease;
  font-family: inherit;
}

.arcade-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.6);
}

.arcade-secondary-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
}

.arcade-secondary-btn:hover {
  background: #334155;
  border-color: #64748b;
}

.arcade-subtle-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}

.arcade-subtle-btn:hover {
  color: #ffffff;
}

/* Touch controls */
.touch-controls {
  display: none;
  width: 100%;
  padding: 8px;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  justify-content: space-between;
  gap: 8px;
}

.touch-btn {
  flex: 1;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 10px 0;
  font-size: 1.1rem;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

.touch-btn-shoot {
  flex: 2;
  background: #0284c7;
  font-size: 0.95rem;
  font-weight: 700;
}

/* Right: Why Hire Me Card */
.why-card {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid #3b82f6;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.why-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #facc15;
  margin-bottom: 10px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 6px;
}

.why-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  font-size: 0.78rem;
  line-height: 1.55;
}

.why-list li {
  margin-bottom: 6px;
  display: flex;
  gap: 6px;
  align-items: baseline;
  color: #e2e8f0;
}

.why-bubble {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.why-avatar {
  font-size: 1.4rem;
}

.select-me-giant-btn {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 60%, #15803d 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.45);
  animation: pulseGreen 2.2s infinite;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
}

.select-me-giant-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 22px rgba(34, 197, 94, 0.65);
}

@keyframes pulseGreen {

  0%,
  100% {
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.45);
  }

  50% {
    box-shadow: 0 4px 22px rgba(34, 197, 94, 0.8), 0 0 15px rgba(34, 197, 94, 0.4);
  }
}

.select-me-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 6px;
  margin-bottom: 0;
  font-style: italic;
}

/* Bottom Arcade Info Bar */
.arcade-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #111827;
  border-top: 2px solid #1f2937;
  font-size: 0.76rem;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 8px;
}

.arcade-instructions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.arcade-key {
  background: #1f2937;
  color: #facc15;
  border: 1px solid #374151;
  border-radius: 3px;
  padding: 1px 5px;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
}

.arcade-sound-btn {
  background: #1e293b;
  border: 1px solid #374151;
  color: #e2e8f0;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}

.arcade-sound-btn.muted {
  color: #94a3b8;
  border-color: #475569;
}

/* Responsive Arcade Styling */
@media (max-width: 860px) {
  .arcade-grid {
    grid-template-columns: 1fr;
  }

  .story-card,
  .why-card {
    display: none;
    /* Hide side cards on small screens to give full focus to canvas */
  }

}

/* ==========================================================================
   ATS Apocalypse 🎯 Real DOM Destruction Styles
   ========================================================================== */

/* Fullscreen Canvas Overlay */
#ats-apocalypse-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99980;
  pointer-events: none;
  background: transparent;
}

/* ATS Apocalypse Side HUD - Docked on Top Right so Name & Header are 100% visible */
.ats-hud-container {
  position: fixed;
  top: 14px;
  right: 18px;
  left: auto;
  transform: none;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(239, 68, 68, 0.55);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(239, 68, 68, 0.25);
  padding: 10px 14px;
  border-radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: #f8fafc;
  animation: hudSlideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 390px;
}

@keyframes hudSlideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ats-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dc2626;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.6);
  animation: pulseRed 1.8s infinite;
}

@keyframes pulseRed {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
  }

  50% {
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.9);
  }
}

.ats-hud-stage {
  font-size: 0.85rem;
  font-weight: 700;
  color: #facc15;
}

.ats-hud-bar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.ats-meter-track {
  width: 110px;
  height: 8px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #334155;
  position: relative;
}

.ats-meter-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
  transition: width 0.25s ease, background 0.3s ease;
}

.ats-hud-stats {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
}

.ats-hud-stats strong {
  color: #f8fafc;
}

.ats-hud-btn {
  background: #1e293b;
  border: 1px solid #475569;
  color: #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ats-hud-btn:hover {
  background: #334155;
  color: #ffffff;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.ats-hud-rebuild-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.ats-hud-rebuild-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.7);
}

.ats-hud-exit-btn {
  background: rgba(220, 38, 38, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
  font-weight: 700;
}

.ats-hud-exit-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

.ats-hud-hint {
  font-size: 0.74rem;
  color: #facc15;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(250, 204, 21, 0.4);
}

/* Crosshair cursor when Apocalypse mode active */
body.ats-apocalypse-active {
  cursor: crosshair !important;
}

body.ats-apocalypse-active * {
  cursor: inherit;
}

/* Real Section Target Hover Frames during ATS Apocalypse */
body.ats-apocalypse-active header h1,
body.ats-apocalypse-active .dreams-cinematic-container,
body.ats-apocalypse-active #project-items-list .project-item,
body.ats-apocalypse-active #skills,
body.ats-apocalypse-active #experience,
body.ats-apocalypse-active #contact,
body.ats-apocalypse-active header .links a {
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: crosshair !important;
}

body.ats-apocalypse-active header h1:hover,
body.ats-apocalypse-active .dreams-cinematic-container:hover,
body.ats-apocalypse-active #project-items-list .project-item:hover,
body.ats-apocalypse-active #skills:hover,
body.ats-apocalypse-active #experience:hover,
body.ats-apocalypse-active #contact:hover,
body.ats-apocalypse-active header .links a:hover {
  outline: 2px dashed #ef4444 !important;
  outline-offset: 4px;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.35) !important;
}

body.ats-apocalypse-active header h1:hover::after {
  content: "🎯 TARGET: RUHBAN ABDULLAH (CLICK TO SHATTER)";
  position: absolute;
  top: -24px;
  left: 0;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.7);
  animation: pulseRed 1.5s infinite;
}

body.ats-apocalypse-active #project-items-list .project-item:hover::after {
  content: "🎯 TARGET: PROJECT (CLICK TO BLAST)";
  position: absolute;
  top: -12px;
  right: 12px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1000;
}

/* Stage 4 Desaturation / Visual Instability */
body.ats-page-cracking {
  filter: grayscale(80%) contrast(115%) brightness(0.9);
  transition: filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.ats-page-restored {
  filter: none !important;
  transition: filter 0.8s ease;
}

/* Physically Shattered Name Letters */
.ats-shatter-letter {
  display: inline-block;
  position: relative;
  transition: transform 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease, filter 0.5s ease, color 0.4s ease;
  will-change: transform, opacity;
}

.ats-shatter-letter.broken-shard {
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(var(--rot, 0deg)) scale(var(--sc, 1));
  color: #ef4444 !important;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.8);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  opacity: 0.88;
}

.ats-shatter-letter.broken-shard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fca5a5;
  transform: rotate(-18deg);
  opacity: 0.7;
}

.ats-shatter-letter.rebuilt {
  transform: translate(0px, 0px) rotate(0deg) scale(1) !important;
  opacity: 1 !important;
  color: inherit !important;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.9);
  animation: rebuildSparkle 0.8s ease forwards;
}

/* Jagged Crack Line Overlay on H1 */
.ats-h1-crack-overlay {
  position: absolute;
  inset: -8px;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 30%, rgba(239, 68, 68, 0.2) 100%);
  border: 2px dashed rgba(239, 68, 68, 0.8);
  border-radius: 8px;
  animation: crackFlash 0.35s ease-out;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

@keyframes crackFlash {
  0% {
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.04);
  }

  100% {
    background-color: transparent;
    transform: scale(1);
  }
}

/* Project Card Tilted Broken State */
.project-item.ats-card-broken {
  transform: translateY(12px) rotate(var(--card-rot, -4deg)) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3) !important;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes rebuildSparkle {
  0% {
    filter: drop-shadow(0 0 10px #38bdf8);
  }

  50% {
    filter: drop-shadow(0 0 24px #4ade80);
  }

  100% {
    filter: none;
  }
}

.ats-name-glitch-badge {
  display: inline-block;
  margin-left: 8px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  vertical-align: middle;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.9);
  animation: glitchBlink 0.8s infinite;
}

@keyframes glitchBlink {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(0.96) skew(-2deg);
  }
}

/* Dreams Cinematic Banner */
.dreams-cinematic-container {
  margin: 18px 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-left: 4px solid #38bdf8;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: dreamsFadeIn 0.4s ease-out;
}

@keyframes dreamsFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dreams-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dreams-lines-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  font-family: ui-monospace, monospace;
}

.dreams-line-item {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.dreams-line-item.rejected {
  color: #ef4444;
  text-decoration: line-through;
  opacity: 0.7;
}

.dreams-rejection-tag {
  display: inline-block;
  margin-left: 8px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

/* Stamped Rejections on Real Sections */
.ats-stamp-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  border: 4px solid #dc2626;
  color: #dc2626;
  background: rgba(254, 226, 226, 0.94);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 8px 18px;
  border-radius: 6px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
  pointer-events: none;
  z-index: 50;
  animation: stampImpact 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes stampImpact {
  0% {
    transform: translate(-50%, -50%) scale(2.4) rotate(-30deg);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, -50%) scale(1) rotate(-12deg);
    opacity: 1;
  }
}

/* Skill Gatekeeper requirement overlay */
.ats-skill-lockout {
  position: absolute;
  inset: 0;
  background: rgba(220, 38, 38, 0.88);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 20;
  animation: fadeIn 0.2s ease;
  padding: 2px 4px;
  text-align: center;
}

/* Resume Scanner Sweep Bar */
.ats-scanner-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444, 0 0 24px #dc2626;
  pointer-events: none;
  z-index: 60;
  animation: scannerSweep 1.6s ease-in-out infinite alternate;
}

@keyframes scannerSweep {
  0% {
    top: 0%;
    opacity: 0.6;
  }

  100% {
    top: 100%;
    opacity: 1;
  }
}

/* Contact Section ATS Firewall */
.ats-contact-firewall {
  position: absolute;
  inset: -10px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  border: 2px solid #ef4444;
  border-radius: 12px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.5), inset 0 0 20px rgba(239, 68, 68, 0.2);
  animation: fadeIn 0.3s ease;
}

.ats-contact-firewall.shattered {
  animation: firewallShatter 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes firewallShatter {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 20px #ef4444);
  }

  50% {
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.8);
  }

  100% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
    pointer-events: none;
  }
}

.firewall-lock-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
  animation: pulseRed 1.5s infinite;
}

.firewall-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ef4444;
  letter-spacing: 1px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.firewall-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  max-width: 440px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.firewall-boss-hp {
  width: 100%;
  max-width: 320px;
  height: 10px;
  background: #1e293b;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #475569;
}

.firewall-boss-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  transition: width 0.2s ease;
}

/* Chaotic Floating Stat Badges (Stage 4 Breaking Point) */
.chaotic-stat-badge {
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  color: #fca5a5;
  border: 1px solid #ef4444;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.35);
  z-index: 80;
  pointer-events: none;
  animation: chaoticFloat 3s ease-in-out infinite alternate;
}

@keyframes chaoticFloat {
  0% {
    transform: translateY(0px) rotate(-1deg);
  }

  100% {
    transform: translateY(-8px) rotate(1.5deg);
  }
}

/* Shake Animation */
.ats-shake {
  animation: atsShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes atsShake {

  10%,
  90% {
    transform: translate3d(-2px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(3px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* Final Victory Modal */
.ats-victory-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 20, 0.96);
  backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.4s ease-out;
}

.ats-victory-card {
  max-width: 580px;
  width: 100%;
  background: linear-gradient(145deg, #0f172a, #020617);
  border: 2px solid #38bdf8;
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.35), 0 20px 40px rgba(0, 0, 0, 0.8);
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: #f8fafc;
}

.victory-trophy {
  font-size: 3.2rem;
  margin-bottom: 8px;
  animation: trophyFloat 2s ease-in-out infinite alternate;
}

@keyframes trophyFloat {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-8px) scale(1.08);
  }
}

.victory-quote-primary {
  font-size: 1.25rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  line-height: 1.35;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.victory-quote-secondary {
  font-size: 1rem;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.victory-meta-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-around;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.victory-meta-card strong {
  color: #facc15;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 2px;
}

.victory-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.victory-hire-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.5);
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
}

.victory-hire-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.7);
}

.victory-dismiss-btn {
  background: #1e293b;
  border: 1px solid #475569;
  color: #cbd5e1;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.victory-dismiss-btn:hover {
  background: #334155;
  color: #ffffff;
}

/* Career Progression Line */
.career-prog-line {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  transition: all 0.5s ease;
}

.career-node {
  background: #1e293b;
  border: 1px solid #334155;
  padding: 4px 10px;
  border-radius: 4px;
  color: #e2e8f0;
  font-weight: 600;
  transition: all 0.4s ease;
}

.career-node.shattered {
  border-color: #ef4444;
  color: #ef4444;
  text-decoration: line-through;
  transform: rotate(-3deg);
  background: rgba(239, 68, 68, 0.15);
}

.career-node.restored {
  border-color: #4ade80;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.career-arrow {
  color: #38bdf8;
  font-weight: 800;
}

.career-arrow.broken {
  color: #ef4444;
}

/* Center Screen Dramatic Notice */
.ats-center-notice {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.96), rgba(185, 28, 28, 0.98));
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 999px;
  border: 2px solid #fecaca;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 30px rgba(220, 38, 38, 0.6);
  z-index: 100000;
  pointer-events: none;
  animation: noticePop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  text-align: center;
  max-width: 90vw;
}

@keyframes noticePop {
  0% {
    transform: translate(-50%, -15px) scale(0.9);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

/* Badges for resume and skills */
.ats-resume-stamp {
  display: inline-block;
  margin-left: 6px;
  background: #dc2626;
  color: #ffffff !important;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  animation: pulseRed 1.5s infinite;
}

.ats-skill-gate {
  display: inline-block;
  margin-left: 6px;
  background: rgba(220, 38, 38, 0.88);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.ats-stamp.stamp-project {
  position: absolute;
  top: 15px;
  right: 15px;
  border: 3px solid #dc2626;
  color: #dc2626;
  background: rgba(254, 226, 226, 0.95);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 4px;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
  animation: stampImpact 0.2s ease-out;
}

.ats-stamp.stamp-experience {
  position: absolute;
  top: 25px;
  right: 25px;
  border: 4px solid #dc2626;
  color: #dc2626;
  background: rgba(254, 226, 226, 0.96);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 6px;
  transform: rotate(-10deg);
  pointer-events: none;
  z-index: 30;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
  animation: stampImpact 0.22s ease-out;
}

/* ==========================================================================
   Analytics, Visitor Counter & Location Permission Styling
   ========================================================================== */

/* Footer layout with visitor counter */
.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.visitor-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
  user-select: none;
  transition: all 0.2s ease;
}

.visitor-counter-badge:hover {
  border-color: var(--border-focus);
  color: var(--text-heading);
}

.visitor-counter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  display: inline-block;
}

.visitor-counter-text strong {
  color: var(--text-heading);
  font-weight: 700;
}

/* Location Permission Prompt Banner (Non-blocking & Transparent) */
.location-prompt-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  max-width: 440px;
  width: calc(100% - 32px);
  animation: promptSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes promptSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.location-prompt-card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 16px 18px;
}

[data-theme="dark"] .location-prompt-card {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.location-prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.location-prompt-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  color: var(--text-heading);
  font-weight: 700;
}

.location-prompt-icon {
  font-size: 1.1rem;
}

.location-prompt-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.location-prompt-close:hover {
  color: var(--text-heading);
}

.location-prompt-desc {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 14px;
}

.location-prompt-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.location-btn-primary {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-bg);
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.location-btn-primary:hover {
  background-color: var(--btn-hover);
}

.location-btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.location-btn-secondary:hover {
  background-color: var(--bg-card);
  color: var(--text);
  border-color: var(--border-focus);
}

/* ==========================================================================
   Admin Dashboard Navigation & Views Styling
   ========================================================================== */
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.admin-tab-btn:hover {
  background: var(--bg-card);
  color: var(--text-heading);
}

.admin-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Analytics Metric KPI Cards Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  text-align: center;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.stat-sub {
  font-size: 0.74rem;
  color: var(--accent);
  margin-top: 2px;
}

/* Analytics Two Columns */
.analytics-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .analytics-two-col {
    grid-template-columns: 1fr;
  }
}

.analytics-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
}

.analytics-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.breakdown-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-count {
  font-weight: 600;
  color: var(--text-heading);
}

/* Badge styles */
.badge-source {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-source.gps {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

[data-theme="dark"] .badge-source.gps {
  background-color: #052e16;
  color: #86efac;
  border-color: #15803d;
}

.badge-source.ip {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

[data-theme="dark"] .badge-source.ip {
  background-color: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

/* Visitor Directory Records */
.visitor-record {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background-color: var(--bg-card);
}

.visitor-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.visitor-id-tag {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.visitor-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.precise-coords-box {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 0.82rem;
  display: none;
}

/* Contact Message Status Controls */
.contact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-select {
  font-size: 0.8rem;
  padding: 3px 8px;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  background-color: var(--input-bg);
  color: var(--text);
  font-family: inherit;
}

.badge-unread {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

[data-theme="dark"] .badge-unread {
  background-color: #7f1d1d;
  color: #fecaca;
  border-color: #b91c1c;
}

.badge-read {
  background-color: #f1f5f9;
  color: #64748b;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Retention & Purge Tool */
.retention-box {
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  border-radius: 6px;
  padding: 14px;
  margin-top: 20px;
}

.retention-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}