/* ==========================================================================
   Physics Simulation Hub - Modern Futuristic Stylesheet
   ========================================================================== */

:root {
  --bg-base: #090d16;
  --bg-surface: rgba(15, 23, 42, 0.75);
  --bg-surface-hover: rgba(30, 41, 59, 0.85);
  --bg-card: rgba(18, 26, 47, 0.65);
  --bg-card-border: rgba(99, 102, 241, 0.18);
  --bg-card-border-hover: rgba(56, 189, 248, 0.55);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --gradient-glow: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  --gradient-card-top: linear-gradient(90deg, #38bdf8, #6366f1, #a855f7);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px -5px rgba(56, 189, 248, 0.35);
  --shadow-hover: 0 16px 36px -8px rgba(0, 0, 0, 0.65), 0 0 25px -2px rgba(99, 102, 241, 0.3);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-base: #f0f4f9;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-surface-hover: rgba(241, 245, 249, 0.95);
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-border: rgba(148, 163, 184, 0.3);
  --bg-card-border-hover: rgba(99, 102, 241, 0.6);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --gradient-glow: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.15));
  --shadow-subtle: 0 4px 20px -2px rgba(100, 116, 139, 0.15);
  --shadow-glow: 0 0 25px -5px rgba(99, 102, 241, 0.25);
  --shadow-hover: 0 16px 36px -8px rgba(100, 116, 139, 0.25), 0 0 25px -2px rgba(99, 102, 241, 0.2);
}

/* Base resets & layout */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-base);
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  min-height: 100dvh;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-base);
}

/* Background canvas for physics particle effect */
#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* Top Glow Light */
.ambient-glow {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, rgba(56, 189, 248, 0.12) 50%, transparent 75%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* App Container */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header & Nav */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--gradient-primary);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .brand-name {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-card-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 800px;
}

.text-gradient {
  background: linear-gradient(135deg, #38bdf8 20%, #818cf8 60%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.6;
}

/* Filter & Search Bar */
.control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
  max-width: 100%;
}

.filter-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid var(--bg-card-border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.search-input {
  width: 100%;
  padding: 0.5rem 2.2rem 0.5rem 2.2rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-fast);
}

[data-theme="light"] .search-input {
  background: rgba(241, 245, 249, 0.7);
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

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

.search-shortcut {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-card-border);
  color: var(--text-muted);
  pointer-events: none;
}

/* Quick Hotkeys Bar */
.hotkeys-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.hotkey-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.kbd {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Grid of Worker Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  container: inline-size / cards;
}

/* Simulation Card */
.sim-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-smooth);
  overflow: hidden;
}

.sim-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-card-top);
  opacity: 0.7;
  transition: opacity var(--transition-normal);
}

.sim-card:hover {
  transform: translateY(-4px);
  border-color: var(--bg-card-border-hover);
  box-shadow: var(--shadow-hover);
}

.sim-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-category-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
}

.card-hotkey-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Status Indicator */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
  white-space: nowrap;
}

[data-theme="light"] .status-badge {
  background: rgba(241, 245, 249, 0.8);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.status-badge.online {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.status-badge.online .status-dot {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-badge.slow {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

.status-badge.slow .status-dot {
  background-color: #f59e0b;
}

.status-badge.offline {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

.status-badge.offline .status-dot {
  background-color: #ef4444;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: clip;
}

.card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.card-feature-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.feature-check {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.tag-badge {
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.18);
  font-weight: 500;
}

[data-theme="light"] .tag-badge {
  background: rgba(2, 132, 199, 0.08);
  color: #0369a1;
  border-color: rgba(2, 132, 199, 0.2);
}

.card-url {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.3);
  border: 1px dashed var(--bg-card-border);
}

[data-theme="light"] .card-url {
  background: rgba(241, 245, 249, 0.5);
}

/* Card Actions */
.card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bg-card-border);
}

.btn-primary {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--bg-card-border);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

.btn-action-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-icon:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* Secondary Workers Section */
.secondary-section {
  margin-top: 1rem;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-subtle);
}

.secondary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.secondary-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.secondary-toggle-icon {
  transition: transform var(--transition-normal);
}

.secondary-section[data-expanded="true"] .secondary-toggle-icon {
  transform: rotate(180deg);
}

.secondary-list {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bg-card-border);
}

.secondary-section[data-expanded="true"] .secondary-list {
  display: grid;
}

.sub-worker-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sub-worker-card:hover {
  border-color: var(--accent-cyan);
}

/* Modern <dialog> Overlay & Modals */
dialog {
  margin: auto;
  border: none;
  padding: 0;
  background: transparent;
  color: inherit;
  max-width: min(94vw, 1180px);
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background: var(--bg-base);
  border: 1px solid var(--bg-card-border-hover);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90dvh;
}

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

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-url-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.modal-body {
  position: relative;
  flex: 1;
  min-height: 400px;
  height: 75dvh;
  background: #000000;
  display: flex;
  flex-direction: column;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #0f172a;
}

/* Loading skeleton for preview iframe */
.iframe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg-base);
  color: var(--text-secondary);
  z-index: 2;
  transition: opacity var(--transition-normal);
}

.iframe-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* QR Code Modal specific styling */
.qr-modal-body {
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--bg-surface);
  text-align: center;
}

.qr-frame {
  padding: 1rem;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  display: inline-block;
}

.qr-canvas-container canvas,
.qr-canvas-container img {
  display: block;
  max-width: 220px;
  height: auto;
}

.qr-target-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.qr-target-url {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  max-width: 400px;
  word-break: break-all;
}

/* Shortcuts Dialog specific styling */
.shortcuts-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  background: var(--bg-surface);
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all var(--transition-normal);
}

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

.toast.toast-leave {
  opacity: 0;
  transform: translateY(-10px);
}

/* Footer */
.footer {
  margin-top: auto;
  text-align: center;
  padding-top: 2rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #f6821f;
  font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .app-container {
    padding: 1rem 0.75rem 2rem;
    gap: 1.5rem;
  }

  .header-nav {
    padding: 0.6rem 0.85rem;
  }

  .brand-name {
    font-size: 1rem;
  }

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

  .sim-card {
    padding: 1.25rem;
  }

  .control-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrapper {
    max-width: 100%;
  }

  .modal-body {
    height: 80dvh;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}
