
:root {
  --bg: #f8fafc; 
  --surface: #ffffff;
  --surface-hover: #f1f5f9; 
  --border: #e2e8f0; 
  --border-hover: #cbd5e1; 
  --text: #0f172a; 
  --text-secondary: #475569; 
  --muted: #64748b; 
  
  --accent: #2563eb; 
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff; 
  --accent-glow: rgba(37, 99, 235, 0.15);
  
  --success: #10b981; 
  --success-soft: #ecfdf5;
  --success-glow: rgba(16, 185, 129, 0.12);
  
  --danger: #ef4444; 
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'DM Mono', monospace;
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);

  --header-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
  --bg: #0b0f19; 
  --surface: #151d2a;
  --surface-hover: #1e293b; 
  --border: #232f42; 
  --border-hover: #33435c; 
  --text: #f1f5f9; 
  --text-secondary: #94a3b8; 
  --muted: #64748b; 
  
  --accent: #3b82f6; 
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.15); 
  --accent-glow: rgba(59, 130, 246, 0.25);
  
  --success: #10b981; 
  --success-soft: rgba(16, 185, 129, 0.15);
  --success-glow: rgba(16, 185, 129, 0.2);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.5);

  --header-bg: rgba(21, 29, 42, 0.85);
  --mode-tabs-bg: rgba(30, 41, 59, 0.7);
  --mode-tabs-border: rgba(51, 65, 85, 0.8);
  --header-mode-tabs-bg: rgba(30, 41, 59, 0.5);
}

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

html, body {
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.theme-toggle-btn:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: scale(1.05);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-toggle-btn .sun-icon {
  display: none;
}

.theme-toggle-btn .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn {
  color: #fbbf24;
}

[data-theme="dark"] .theme-toggle-btn:hover {
  color: #f59e0b;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

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

.logo-img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2);
}

.logo svg {
  color: var(--accent);
  filter: drop-shadow(0 2px 4px rgba(37,99,235,0.15));
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-badge {
  font-size: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.user-id-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 99px;
  box-shadow: var(--shadow-sm);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  position: relative;
}

.badge-dot.pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--success);
  opacity: 0;
  animation: badge-pulse-ring 2s cubic-bezier(0.25, 0, 0, 1) infinite;
}

@keyframes badge-pulse-ring {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.id-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.id-text strong {
  font-family: var(--mono);
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  font-family: var(--font);
}

.pwa-install-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.pwa-install-btn.hidden {
  display: none !important;
}

.mode-tabs-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 24px;
}

.mode-tabs-container.header-tabs {
  margin-bottom: 0;
  flex: 1;
  display: flex;
  justify-content: center;
}

.mode-tabs-container.header-tabs .mode-tabs {
  max-width: 380px;
  background: var(--header-mode-tabs-bg, rgba(226, 232, 240, 0.4));
}

.mode-tabs-container.header-tabs .tab-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.mode-tabs {
  background: var(--mode-tabs-bg, rgba(226, 232, 240, 0.6));
  padding: 4px;
  border-radius: 99px;
  display: flex;
  gap: 2px;
  width: 100%;
  max-width: 440px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  border: 1px solid var(--mode-tabs-border, rgba(226, 232, 240, 0.8));
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

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

.tab-btn.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

main.dashboard {
  min-height: 100vh;
  padding: 88px 16px 40px 16px;
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
}

@media (min-width: 860px) {
  .workspace-grid {
    grid-template-columns: 1fr 320px;
  }
}

.radar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.radar-header h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 4px;
}

.status-msg {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.status-msg::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: badge-pulse-ring 2s infinite;
}

.radar-stage-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 0;
  width: 100%;
}

.radar-stage {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  background: 
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.08) 0%, rgba(37, 99, 235, 0.03) 50%, transparent 75%),
    repeating-radial-gradient(circle, transparent, transparent 30px, rgba(37, 99, 235, 0.03) 30px, rgba(37, 99, 235, 0.03) 31px),
    linear-gradient(rgba(37, 99, 235, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 20px 20px, 20px 20px;
  background-position: center;
  border-radius: 50%;
  border: 1.5px solid rgba(59, 130, 246, 0.3);
  box-shadow: 
    inset 0 0 35px rgba(37, 99, 235, 0.08),
    0 0 25px rgba(37, 99, 235, 0.12),
    0 12px 32px rgba(15, 23, 42, 0.08);
  overflow: visible;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .radar-stage {
  background: 
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.12) 0%, rgba(30, 58, 138, 0.15) 50%, transparent 80%),
    repeating-radial-gradient(circle, transparent, transparent 30px, rgba(56, 189, 248, 0.04) 30px, rgba(56, 189, 248, 0.04) 31px),
    linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 
    inset 0 0 45px rgba(56, 189, 248, 0.15),
    0 0 35px rgba(56, 189, 248, 0.2),
    0 16px 40px rgba(0, 0, 0, 0.5);
}

.radar-crosshair-h {
  position: absolute;
  top: 50%; left: 3%; right: 3%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.35) 15%, rgba(56, 189, 248, 0.35) 85%, transparent);
  pointer-events: none;
  z-index: 2;
}

.radar-crosshair-v {
  position: absolute;
  left: 50%; top: 3%; bottom: 3%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.35) 15%, rgba(56, 189, 248, 0.35) 85%, transparent);
  pointer-events: none;
  z-index: 2;
}

.radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

.ring-1 {
  width: 25%;
  height: 25%;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.ring-2 {
  width: 56%;
  height: 56%;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.05);
}

.ring-3 {
  width: 82%;
  height: 82%;
  border: 1px dashed rgba(56, 189, 248, 0.3);
}

/* Outer Compass Ring & Angle Ticks */
.radar-compass-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.28);
  pointer-events: none;
  animation: radar-compass-spin 45s linear infinite;
  z-index: 1;
}

@keyframes radar-compass-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-angle-tick {
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--accent);
  opacity: 0.75;
  pointer-events: none;
  z-index: 3;
}

.tick-0 { top: -22px; left: 50%; transform: translateX(-50%); }
.tick-90 { right: -28px; top: 50%; transform: translateY(-50%); }
.tick-180 { bottom: -22px; left: 50%; transform: translateX(-50%); }
.tick-270 { left: -28px; top: 50%; transform: translateY(-50%); }

/* Outward Expanding Sonar Ping Waves */
.sonar-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.28);
  pointer-events: none;
  z-index: 1;
  animation: sonar-expand 9s cubic-bezier(0.15, 0.85, 0.35, 1) infinite;
}

.sonar-wave.wave-1 { animation-delay: 0s; }
.sonar-wave.wave-2 { animation-delay: 3s; }
.sonar-wave.wave-3 { animation-delay: 6s; }

@keyframes sonar-expand {
  0% {
    width: 10%;
    height: 10%;
    opacity: 0.35;
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.15);
  }
  50% {
    opacity: 0.12;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.05);
  }
  100% {
    width: 98%;
    height: 98%;
    opacity: 0;
    border-color: rgba(29, 78, 216, 0);
    box-shadow: 0 0 15px rgba(29, 78, 216, 0);
  }
}

/* Pending Connection Request State on Radar Stage */
.radar-stage.has-pending-request {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 
    inset 0 0 45px rgba(245, 158, 11, 0.08),
    0 0 25px rgba(245, 158, 11, 0.15),
    0 12px 36px rgba(15, 23, 42, 0.15) !important;
}

.radar-stage.has-pending-request .sonar-wave {
  animation-name: sonar-expand-pending !important;
  border-color: rgba(245, 158, 11, 0.4);
}

@keyframes sonar-expand-pending {
  0% {
    width: 10%;
    height: 10%;
    opacity: 0.45;
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
  }
  50% {
    opacity: 0.18;
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.1);
  }
  100% {
    width: 98%;
    height: 98%;
    opacity: 0;
    border-color: rgba(16, 185, 129, 0);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0);
  }
}

.radar-stage.has-pending-request .radar-sweep {
  background: conic-gradient(
    from 0deg, 
    rgba(251, 191, 36, 0.28) 0deg, 
    rgba(245, 158, 11, 0.15) 25deg, 
    rgba(16, 185, 129, 0.08) 60deg, 
    transparent 180deg
  ) !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.3)) !important;
}

.radar-stage.has-pending-request .radar-sweep-beam {
  background: linear-gradient(90deg, #ffffff 0%, #fbbf24 40%, rgba(251, 191, 36, 0) 100%) !important;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6), 0 0 14px rgba(245, 158, 11, 0.4) !important;
}

/* Rotating Scanning Light Sweep */
.radar-sweep {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg, 
    rgba(56, 189, 248, 0.18) 0deg, 
    rgba(59, 130, 246, 0.08) 25deg, 
    rgba(16, 185, 129, 0.03) 60deg, 
    rgba(59, 130, 246, 0.01) 120deg, 
    transparent 180deg
  );
  pointer-events: none;
  animation: radar-sweep-rotate 12s linear infinite;
  z-index: 2;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.15));
}

.radar-sweep-beam {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, #ffffff 0%, rgba(56, 189, 248, 0.8) 40%, rgba(56, 189, 248, 0) 100%);
  transform-origin: left center;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.5), 0 0 12px rgba(59, 130, 246, 0.3);
}

@keyframes radar-sweep-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.node.self-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.node.self-node .avatar {
  width: 72px;
  height: 72px;
  background: radial-gradient(circle at 35% 30%, #3b82f6 0%, #1d4ed8 60%, #0f172a 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 0 0 4px rgba(37, 99, 235, 0.22),
    0 0 24px rgba(37, 99, 235, 0.35),
    0 12px 28px rgba(15, 23, 42, 0.25);
  position: relative;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.node.self-node .avatar:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 
    0 0 0 6px rgba(59, 130, 246, 0.35),
    0 0 36px rgba(59, 130, 246, 0.55),
    0 16px 36px rgba(15, 23, 42, 0.35);
}

/* 3D Mobile Tower Icon Styles & Animations */
.tower-3d-icon {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  overflow: visible;
}

.tower-signal-waves .signal-wave {
  animation: tower-signal-pulse 2s infinite ease-in-out;
  transform-origin: 32px 10px;
}

.tower-signal-waves .wave-1 {
  animation-delay: 0s;
}

.tower-signal-waves .wave-2 {
  animation-delay: 0.4s;
}

.tower-signal-waves .wave-3 {
  animation-delay: 0.8s;
}

@keyframes tower-signal-pulse {
  0% {
    opacity: 0.15;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.15;
    transform: scale(0.9);
  }
}

.beacon-led {
  animation: beacon-blink 1.2s infinite ease-in-out;
}

.beacon-glow {
  animation: beacon-glow-pulse 1.2s infinite ease-in-out;
  transform-origin: 32px 6px;
}

@keyframes beacon-blink {
  0%, 100% { fill: #ef4444; }
  50% { fill: #f87171; }
}

@keyframes beacon-glow-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.3); }
}

.node.self-node .avatar-glow {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: var(--accent-glow);
  animation: ping-outer 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: 1;
}

@keyframes ping-outer {
  75%, 100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.node.self-node .self-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-top: 8px;
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 99px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.peers-radar-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.node.peer-node {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 8;
  animation: float-bubble 4s ease-in-out infinite alternate, pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}

/* Discovered Node Outer Ripple Effect */
.node-ripple-container {
  position: absolute;
  top: 26px; /* Vertical center of 52px avatar */
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 1;
}

.node-ripple-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.4);
  pointer-events: none;
  animation: peer-ripple-expand 4.5s cubic-bezier(0.1, 0.8, 0.2, 1) infinite;
}

.node-ripple-wave.wave-1 { animation-delay: 0s; }
.node-ripple-wave.wave-2 { animation-delay: 1.5s; }
.node-ripple-wave.wave-3 { animation-delay: 3s; }

@keyframes peer-ripple-expand {
  0% {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.2), inset 0 0 4px rgba(56, 189, 248, 0.1);
  }
  50% {
    opacity: 0.15;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.08);
  }
  100% {
    width: 110px;
    height: 110px;
    opacity: 0;
    border-color: rgba(29, 78, 216, 0);
    box-shadow: 0 0 20px rgba(29, 78, 216, 0);
  }
}

.node.peer-node.new-discovery-burst {
  animation: 
    pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    float-bubble 4s ease-in-out infinite alternate 0.5s,
    discovery-flash 2.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes discovery-flash {
  0% {
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.5)) drop-shadow(0 0 20px rgba(37, 99, 235, 0.3)) brightness(1.15);
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.3)) drop-shadow(0 0 12px rgba(37, 99, 235, 0.15)) brightness(1.08);
  }
  100% {
    filter: drop-shadow(0 0 0px transparent) brightness(1);
  }
}

@keyframes float-bubble {
  0% { margin-top: -3px; }
  100% { margin-top: 3px; }
}

@keyframes pop-in {
  from { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.node.peer-node .avatar {
  width: 52px;
  height: 52px;
  background: var(--surface);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 12px rgba(15, 23, 42, 0.08),
    inset 0 2px 4px rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(37, 99, 235, 0.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.node.peer-node:hover .avatar {
  background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.15) translateY(-2px);
  box-shadow: 
    0 12px 24px rgba(37, 99, 235, 0.25),
    0 0 0 4px rgba(37, 99, 235, 0.15);
}

.node.peer-node span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 8px;
  border-radius: 99px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  transition: all 0.2s ease;
}

.node.peer-node:hover span {
  color: var(--text);
  border-color: var(--border-hover);
  background: #fff;
}

.node.peer-node::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--success-soft);
}

.radar-footer .instruction-tip {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

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

.share-header h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
}

.share-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.share-badge.local {
  background: var(--success-soft);
  color: var(--success);
}

.share-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.share-action-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.share-input-wrapper {
  display: flex;
  gap: 8px;
  width: 100%;
}

.share-input-wrapper input {
  flex: 1;
  font-family: var(--mono);
  font-size: 11px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  outline: none;
  min-width: 0;
  transition: var(--transition);
}

.share-input-wrapper input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.share-btn-row {
  display: flex;
  gap: 8px;
}

.help-card h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 12px;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
  margin-top: 1px;
}

.steps-list p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.btn-primary {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(37,99,235,0.08);
  white-space: nowrap;
}

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

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-ghost:hover {
  background: var(--bg);
  border-color: var(--border-hover);
  color: var(--text);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal.hidden {
  display: none !important;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 360px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: scale-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scale-up {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-peer-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.modal-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: -8px;
}

.file-pick-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  transition: var(--transition);
  background: var(--bg);
  text-align: center;
}

.file-pick-label:hover,
.file-pick-label.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.file-pick-label svg {
  color: var(--muted);
  transition: var(--transition);
}

.file-pick-label:hover svg {
  color: var(--accent);
  transform: translateY(-2px);
}

#file-name-display {
  font-weight: 600;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.progress-wrap.hidden {
  display: none !important;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  width: 0%;
  transition: width 0.1s linear;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

#progress-label,
#toast-progress-label {
  font-size: 11px;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
  text-align: left;
}

.speedometer-container {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.speedometer-container:hover {
  border-color: var(--border-hover);
}

.speed-label, .speed-label-sm {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.speedometer-gauge {
  flex-shrink: 0;
  overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.gauge-track {
  transition: stroke 0.3s ease;
}

.gauge-fill {
  transition: stroke-dashoffset 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gauge-needle-group {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.transfer-speed {
  font-size: 11px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 600;
  text-align: right;
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: -0.2px;
}

.progress-sub-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.progress-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.progress-sub-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

#aggregate-title {
  font-weight: 600;
  color: var(--text);
}

.progress-sub-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--mono);
}

#progress-label {
  color: var(--accent);
  font-weight: 700;
}

#individual-progress-fill {
  background: var(--success); 
}

/* Receive file modal overlay */
.receive-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modal-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.receive-modal-overlay.hidden {
  display: none !important;
}

.receive-modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: modal-scale-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.receive-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.toast-file {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.toast-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.toast-actions button {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
}

.success-tip {
  font-size: 11px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.success-tip.hidden {
  display: none !important;
}

.lobby-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.lobby-action-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.lobby-action-box h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.lobby-action-box p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

.lobby-divider {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lobby-divider::before,
.lobby-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.lobby-divider::before { left: 0; }
.lobby-divider::after { right: 0; }

.join-input-group {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.join-input-group input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}

.join-input-group input:focus {
  border-color: var(--accent);
}

.lobby-footer {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.w-full {
  width: 100%;
}

@media (max-width: 680px) {
  header {
    padding: 0 12px;
  }
  .logo-text {
    display: none;
  }
  .mode-tabs-container.header-tabs .tab-btn span {
    font-size: 11px;
  }
  .mode-tabs-container.header-tabs .tab-btn svg {
    width: 14px;
    height: 14px;
  }
  .mode-tabs-container.header-tabs .tab-btn {
    padding: 6px 8px;
    gap: 4px;
  }
  .mode-tabs-container.header-tabs .mode-tabs {
    max-width: 280px;
  }
}

.file-preview-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  background: var(--bg);
  margin-top: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.file-preview-container.hidden {
  display: none !important;
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.file-preview-item:hover {
  border-color: var(--border-hover);
  background: rgba(248, 250, 252, 0.5);
}

.file-preview-thumbnail {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #f1f5f9;
}

.file-preview-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: rgba(37, 99, 235, 0.05);
  color: var(--accent);
}

.file-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.file-preview-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-size {
  font-size: 11px;
  color: var(--muted);
}

.file-preview-item {
  cursor: pointer;
  position: relative;
}

.file-preview-item::after {
  content: '🔎 Click to preview';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 99px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.file-preview-item:hover::after {
  opacity: 1;
}

.transfers-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transfers-panel.hidden {
  display: none !important;
}

.transfers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.transfers-header h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
}

.btn-clear {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-clear:hover {
  background: rgba(239, 68, 68, 0.08);
}

.transfers-empty {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 16px 0;
  font-style: italic;
}

.transfers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.transfer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.transfer-item:hover {
  border-color: var(--border-hover);
  background: rgba(248, 250, 252, 0.6);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.transfer-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.transfer-item-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transfer-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}

.transfer-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.transfer-badge.sent {
  background: var(--success-soft);
  color: var(--success);
}

.transfer-badge.received {
  background: var(--accent-soft);
  color: var(--accent);
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: viewer-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-viewer.hidden {
  display: none !important;
}

@keyframes viewer-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.media-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
}

.media-viewer-box {
  position: relative;
  z-index: 1001;
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  max-height: calc(100vh - 48px);
  animation: viewer-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes viewer-slide-up {
  from { transform: translateY(12px) scale(0.98); }
  to { transform: translateY(0) scale(1); }
}

.media-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.media-viewer-title-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.media-viewer-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-viewer-size {
  font-size: 11px;
  color: var(--muted);
}

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

.media-viewer-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
}

.media-viewer-btn svg {
  flex-shrink: 0;
}

.media-viewer-btn.btn-download {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.media-viewer-btn.btn-download:hover {
  background: #1d4ed8;
}

.media-viewer-btn.btn-close {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text);
}

.media-viewer-btn.btn-close:hover {
  background: rgba(15, 23, 42, 0.1);
}

.media-viewer-content {
  background: #0f172a;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  max-height: 60vh;
  overflow: hidden;
  position: relative;
  padding: 16px;
}

.media-viewer-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.media-viewer-content video {
  max-width: 100%;
  max-height: 100%;
  outline: none;
  border-radius: 4px;
}

/* ── Enterprise SEO Footer & FAQ Section ── */
.seo-footer-container {
  margin-top: 40px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  color: var(--text);
}

.seo-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.seo-header-block {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.seo-main-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.seo-lead {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.seo-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.seo-feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seo-feature-card h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.seo-feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.seo-faq-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.seo-faq-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}

.seo-faq-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.seo-faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.seo-faq-item[open] {
  border-color: var(--accent);
}

.seo-faq-question {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.seo-faq-question::-webkit-details-marker {
  display: none;
}

.seo-faq-question::after {
  content: "＋";
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 400;
}

.seo-faq-item[open] .seo-faq-question::after {
  content: "－";
  color: var(--accent);
}

.seo-faq-answer {
  padding: 0 18px 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.seo-copyright-bar {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.seo-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.seo-link:hover {
  text-decoration: underline;
}

@media (max-width: 680px) {
  .file-preview-item::after {
    display: none;
  }
  .media-viewer {
    padding: 8px;
  }
  .media-viewer-box {
    max-height: calc(100vh - 16px);
  }
  .media-viewer-header {
    padding: 10px 12px;
  }
  .media-viewer-content {
    min-height: 240px;
    padding: 8px;
  }
  .seo-main-heading {
    font-size: 18px;
  }
  .seo-footer-container {
    padding: 32px 16px 24px;
  }
}

