/* ==========================================================================
   OmShare - World-Class Professional Design System
   Engineered with Obsidian Glassmorphism, Electric Amber & Cyber Emerald Accents
   ========================================================================== */

:root {
  /* Brand Palette */
  --brand-primary: #FF6B35;
  --brand-primary-light: #FF8E53;
  --brand-primary-dark: #E0531D;
  --brand-primary-glow: rgba(255, 107, 53, 0.28);
  --brand-emerald: #10B981;
  --brand-emerald-glow: rgba(16, 185, 129, 0.25);
  --brand-danger: #EF4444;
  --brand-danger-glow: rgba(239, 68, 68, 0.2);

  /* Obsidian & Slate Surfaces */
  --bg-core: #070A10;
  --bg-card: rgba(15, 22, 36, 0.75);
  --bg-card-hover: rgba(21, 31, 50, 0.85);
  --bg-input: rgba(10, 15, 26, 0.8);
  --bg-subtle: rgba(255, 255, 255, 0.03);
  --bg-pill: rgba(255, 255, 255, 0.06);

  /* Glass Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(255, 107, 53, 0.45);
  --border-active: #FF6B35;

  /* Typography */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #070A10;

  /* Fonts */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-card: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-glow: 0 0 25px var(--brand-primary-glow);
  --shadow-glow-emerald: 0 0 25px var(--brand-emerald-glow);

  /* Legacy / Utility Aliases */
  --color-primary: var(--brand-primary);
  --color-primary-hover: var(--brand-primary-dark);
  --color-accent: var(--brand-emerald);
  --color-bg: var(--bg-core);
  --color-bg-card: var(--bg-card);
  --color-bg-elevated: var(--bg-card-hover);
  --color-bg-input: var(--bg-input);
  --color-border: var(--border-subtle);
  --color-border-hover: var(--border-hover);
  --color-text: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-tertiary: var(--text-muted);
  --color-success: var(--brand-emerald);
  --color-error: var(--brand-danger);

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms var(--ease-smooth);
  --transition-normal: 250ms var(--ease-smooth);
  --transition-slow: 400ms var(--ease-spring);
}

/* ==========================================
   RESET & CORE BASE
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-core);
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(255, 107, 53, 0.12), transparent 75%),
    radial-gradient(ellipse 60% 40% at 90% 90%, rgba(16, 185, 129, 0.06), transparent 70%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-wrapper {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==========================================
   HEADER & LOGO
   ========================================== */
.header {
  text-align: center;
  padding: 12px 0 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  text-decoration: none;
}

.logo svg {
  filter: drop-shadow(0 4px 12px rgba(255, 107, 53, 0.35));
  transition: transform var(--transition-normal);
}

.logo:hover svg {
  transform: translateY(-2px) scale(1.04);
}

.logo-text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.75px;
  background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 60%, var(--brand-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ==========================================
   MAIN APP CARD CONTAINER
   ========================================== */
.main {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color var(--transition-normal);
}

.main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* ==========================================
   PILL TABS NAVIGATION
   ========================================== */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.tab.active {
  background: var(--bg-card-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.tab.active svg {
  color: var(--brand-primary);
}

/* ==========================================
   PANELS
   ========================================== */
.panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 250ms ease-out;
}

.panel.active {
  display: flex;
}

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

/* ==========================================
   UPLOAD DROPZONE
   ========================================== */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 36px 20px;
  text-align: center;
  background: rgba(10, 15, 26, 0.4);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--brand-primary);
  background: rgba(255, 107, 53, 0.04);
  box-shadow: 0 0 25px rgba(255, 107, 53, 0.15);
  transform: translateY(-2px);
}

.upload-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 142, 83, 0.05));
  border: 1px solid rgba(255, 107, 53, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  transition: transform var(--transition-normal);
}

.upload-zone:hover .upload-icon-wrapper {
  transform: scale(1.08);
}

.upload-text-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.browse-link {
  color: var(--brand-primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

.dropzone-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  width: 100%;
  max-width: 320px;
}

.btn-dropzone {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-pill);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-dropzone:hover {
  background: rgba(255, 107, 53, 0.15);
  border-color: var(--brand-primary);
  color: var(--brand-primary-light);
  transform: translateY(-1px);
}

.format-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.format-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px 8px;
}

/* ==========================================
   BATCH FILE PREVIEW CARD
   ========================================== */
.batch-preview-card {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.file-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid rgba(255, 107, 53, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.file-icon-box.folder-icon-box {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--brand-emerald);
}

.file-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-submeta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-size-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.file-ready-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-emerald);
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

#remove-file:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--brand-danger);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Scrollable Batch File List */
.batch-file-list {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.batch-file-list::-webkit-scrollbar {
  width: 5px;
}

.batch-file-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.batch-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 12px;
}

.batch-file-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.batch-file-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.batch-file-item-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-file-item-path {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.batch-file-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.batch-file-item-size {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
}

.batch-file-item-del {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.batch-file-item-del:hover {
  color: var(--brand-danger);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 20px var(--brand-primary-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.45);
}

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

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
}

.btn-danger-outline {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--brand-danger);
  color: #FFFFFF;
  box-shadow: 0 0 20px var(--brand-danger-glow);
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: rotate(30deg) translateX(-100%);
  transition: transform 600ms ease;
}

.btn-shine:hover::after {
  transform: rotate(30deg) translateX(100%);
}

/* ==========================================
   MULTI-DEVICE SHARING HUD
   ========================================== */
.sharing-session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: 9999px;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-emerald);
  box-shadow: 0 0 8px var(--brand-emerald);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.downloads-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 9999px;
  transition: all var(--transition-normal);
}

.downloads-count-badge.highlight-badge {
  color: var(--brand-primary-light);
  border-color: var(--brand-primary);
  background: rgba(255, 107, 53, 0.12);
}

.code-card {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-medium);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.code-instructions {
  font-size: 13px;
  color: var(--text-secondary);
}

.code-boxes {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.code-digit {
  width: 44px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-normal);
}

.code-digit.filled {
  color: var(--brand-primary-light);
  border-color: rgba(255, 107, 53, 0.4);
  background: rgba(255, 107, 53, 0.05);
}

.sharing-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-action.copied {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--brand-emerald);
  color: var(--brand-emerald);
}

.btn-action.active-toggle {
  background: rgba(255, 107, 53, 0.15);
  border-color: var(--brand-primary);
  color: var(--brand-primary-light);
}

/* QR Code Display Card */
.qr-card {
  margin-top: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeIn 200ms ease;
}

.qr-container {
  background: #FFFFFF;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-container svg {
  display: block;
  width: 160px;
  height: 160px;
}

.qr-caption {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

/* ==========================================
   TRANSFER HUD & PROGRESS
   ========================================== */
.transfer-hud {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

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

.status-ripple {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-ripple.waiting {
  background: var(--brand-primary);
  box-shadow: 0 0 10px var(--brand-primary);
  animation: pulseLive 2s infinite;
}

.status-ripple.active {
  background: var(--brand-emerald);
  box-shadow: 0 0 12px var(--brand-emerald);
  animation: pulseLive 1s infinite;
}

.status-ripple.complete {
  background: var(--brand-emerald);
}

.status-msg {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-emerald) 100%);
  border-radius: 9999px;
  transition: width 150ms linear;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.progress-metrics {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.metric-percent {
  color: var(--text-primary);
}

.metric-speed {
  color: var(--brand-emerald);
}

.sharing-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.persistent-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================
   RECEIVE PANEL INPUT
   ========================================== */
.receive-header-group {
  text-align: center;
  margin-bottom: 4px;
}

.receive-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.receive-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.code-input-wrapper {
  position: relative;
}

.code-input {
  width: 100%;
  height: 60px;
  background: var(--bg-input);
  border: 2px solid var(--border-medium);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 12px;
  text-align: center;
  outline: none;
  transition: all var(--transition-normal);
  padding-left: 12px; /* Center letter-spacing compensation */
}

.code-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 25px var(--brand-primary-glow);
  background: rgba(15, 22, 36, 0.95);
}

.ready-pulse {
  animation: pulseButton 1.5s infinite alternate;
}

@keyframes pulseButton {
  from { box-shadow: 0 4px 15px var(--brand-primary-glow); }
  to { box-shadow: 0 8px 30px rgba(255, 107, 53, 0.6); }
}

.incoming-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 16px;
}

.incoming-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-emerald);
  flex-shrink: 0;
}

.incoming-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.incoming-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.incoming-submeta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stream-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-emerald);
}

/* ==========================================
   TOAST
   ========================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: none;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { border-color: rgba(16, 185, 129, 0.4); color: #A7F3D0; }
.toast.error { border-color: rgba(239, 68, 68, 0.4); color: #FECACA; }
.toast.info { border-color: rgba(255, 107, 53, 0.4); color: #FED7AA; }

.hidden {
  display: none !important;
}

/* ==========================================
   SEO CONTENT & FEATURES GRID
   ========================================== */
.seo-container {
  max-width: 960px;
  width: 100%;
  margin: 48px auto 0;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

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

.seo-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-align: center;
  color: var(--text-primary);
}

.seo-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: -12px auto 0;
}

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

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* ==========================================
   HOW IT WORKS STEPS
   ========================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.step-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-primary);
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid rgba(255, 107, 53, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
  align-self: flex-start;
}

.step-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================
   FAQ ACCORDION
   ========================================== */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.faq-item {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.faq-item:hover {
  border-color: var(--border-medium);
}

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

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

.faq-chevron {
  transition: transform var(--transition-normal);
  color: var(--text-muted);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--brand-primary);
}

.faq-answer {
  padding: 0 20px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================
   FOOTER V2 (OM PDF CREATOR STYLE)
   ========================================== */
.footer-v2 {
  margin-top: 80px;
  background: rgba(8, 12, 22, 0.85);
  border-top: 1px solid var(--border-subtle);
  backdrop-filter: blur(24px);
  padding: 60px 0 28px;
}

.footer-v2-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.footer-v2-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr 1fr;
  gap: 40px;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.brand-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 8px;
  max-width: 360px;
}

.creator-block {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.creator-badge .creator-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
}

.creator-badge .creator-link:hover {
  color: var(--brand-primary);
}

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

.badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.badge-github {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.badge-github:hover {
  background: rgba(255, 255, 255, 0.12);
}

.badge-donate {
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid rgba(255, 107, 53, 0.3);
  color: var(--brand-primary-light);
}

.badge-donate:hover {
  background: var(--brand-primary);
  color: #FFFFFF;
}

.footer-column-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.75px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-list a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-nav-list a:hover {
  color: var(--brand-primary);
}

.social-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.social-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.footer-v2-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
}

.trust-badges {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

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

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
  .app-wrapper {
    padding: 16px 12px;
  }

  .main {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .footer-v2-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-v2-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .trust-badges {
    flex-wrap: wrap;
    justify-content: center;
  }

  .code-boxes {
    gap: 6px;
  }

  .code-digit {
    width: 38px;
    height: 48px;
    font-size: 22px;
  }
}

/* ==========================================
   ACCESSIBILITY & FOCUS STATES (WCAG 2.1 AA)
   ========================================== */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
  box-shadow: 0 0 12px var(--brand-primary-glow);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .live-pulse-dot,
  .status-ripple,
  .btn-shine::after {
    animation: none !important;
  }
}