/* ═══════════════════════════════════════════════════════════
   FridayTransfer — CSS Design System
   ═══════════════════════════════════════════════════════════ */

/* ─── Custom Properties ─── */
:root {
  --bg-primary: #07070e;
  --bg-secondary: #0d0d18;
  --bg-tertiary: #111122;
  --bg-card: rgba(17, 17, 34, 0.6);
  --bg-card-hover: rgba(25, 25, 50, 0.7);
  --border-subtle: rgba(130, 140, 255, 0.08);
  --border-glow: rgba(130, 140, 255, 0.2);

  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #555577;

  --accent-blue: #818cf8;
  --accent-purple: #c084fc;
  --accent-pink: #f472b6;
  --accent-green: #34d399;
  --accent-red: #f87171;
  --accent-amber: #fbbf24;

  --gradient-primary: linear-gradient(135deg, #818cf8, #c084fc);
  --gradient-glow: linear-gradient(135deg, rgba(129, 140, 248, 0.15), rgba(192, 132, 252, 0.15));
  --gradient-bg: radial-gradient(ellipse at 20% 0%, rgba(129, 140, 248, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(192, 132, 252, 0.04) 0%, transparent 50%);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(129, 140, 248, 0.15);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-bg);
  pointer-events: none;
  z-index: 0;
}

#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ─── Screens ─── */
.screen {
  display: none;
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.screen.active {
  display: flex;
}

/* ─── Glassmorphism Card ─── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* ─── Inputs ─── */
.glass-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.glass-input::placeholder {
  color: var(--text-muted);
}

.glass-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

/* ─── Buttons ─── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-glow .btn-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(248, 113, 113, 0.15);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.2);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-content {
  position: relative;
  z-index: 1;
}

/* Setup screen removed — credentials are hardcoded */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ═══════════════════════════════════════════════════════════
   APP HEADER
   ═══════════════════════════════════════════════════════════ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(7, 7, 14, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: flex;
  align-items: center;
}

.header-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.header-brand span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.online {
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent-green);
}

.status-badge.offline {
  background: rgba(248, 113, 113, 0.1);
  color: var(--accent-red);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 2s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD SCREEN
   ═══════════════════════════════════════════════════════════ */
#dashboard-screen {
  flex-direction: column;
}

.dashboard-main {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  width: 100%;
}

.hero-section {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeInUp 0.5s ease-out;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.mode-card {
  padding: 32px 28px;
  text-align: center;
  animation: fadeInUp 0.6s ease-out;
}

.mode-card:nth-child(2) {
  animation-delay: 0.1s;
}

.mode-icon-wrap {
  margin-bottom: 20px;
}

.mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: var(--gradient-glow);
  border: 1px solid var(--border-glow);
  color: var(--accent-blue);
  transition: var(--transition);
}

.mode-card:hover .mode-icon {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.join-icon {
  color: var(--accent-purple);
}

.mode-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.mode-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.mode-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.join-form {
  width: 100%;
}

.code-input-group {
  display: flex;
  gap: 8px;
}

.code-input {
  font-family: 'Inter', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}

/* System Load Indicator */
.system-load-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  animation: fadeInUp 0.5s ease-out;
}

.load-detail {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Features Strip */
.features-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  animation: fadeInUp 0.7s ease-out;
}

.feature-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   ROOM SCREEN
   ═══════════════════════════════════════════════════════════ */
#room-screen {
  flex-direction: column;
  height: 100vh;
}

.room-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.room-mode-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--gradient-glow);
  border: 1px solid var(--border-glow);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.peers-count {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ─── Share Panel ─── */
.share-panel {
  width: 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  overflow-y: auto;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-bottom: none;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.share-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.share-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.code-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
}

.code-text {
  font-family: 'Inter', monospace;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 3px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.link-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.link-text {
  flex: 1;
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
  display: flex;
}

.copy-btn:hover {
  color: var(--accent-blue);
}

.copy-btn.copied {
  color: var(--accent-green);
}

.qr-section {
  align-items: center;
}

.qr-container {
  padding: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  display: inline-flex;
}

#qr-canvas {
  display: block;
  image-rendering: pixelated;
}

.panel-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.peers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.peer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  animation: fadeInUp 0.3s ease-out;
}

.peer-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.peer-name {
  font-size: 0.8rem;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peer-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  flex-shrink: 0;
}

.peer-status.connecting {
  background: var(--accent-amber);
  animation: blink 1s infinite;
}

.peer-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 8px;
  font-style: italic;
}

/* ─── Transfer Area ─── */
.transfer-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: var(--transition);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
  opacity: 1;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent-blue);
  transform: scale(1.005);
}

.drop-zone.drag-over {
  border-style: solid;
  box-shadow: 0 0 40px rgba(129, 140, 248, 0.15);
}

.drop-zone-content {
  position: relative;
  z-index: 1;
}

.drop-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
  transition: var(--transition);
}

.drop-zone:hover .drop-icon {
  color: var(--accent-blue);
  transform: translateY(-4px);
}

.drop-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.drop-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.drop-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Sections */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.file-order-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.section-actions {
  display: flex;
  gap: 8px;
}

/* Queued Files */
.queued-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queued-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  animation: fadeInUp 0.3s ease-out;
}

.queue-order {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-glow);
  border: 1px solid var(--border-glow);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.file-icon.image {
  background: rgba(244, 114, 182, 0.12);
}

.file-icon.video {
  background: rgba(129, 140, 248, 0.12);
}

.file-icon.audio {
  background: rgba(52, 211, 153, 0.12);
}

.file-icon.doc {
  background: rgba(96, 165, 250, 0.12);
}

.file-icon.archive {
  background: rgba(251, 191, 36, 0.12);
}

.file-icon.code {
  background: rgba(167, 139, 250, 0.12);
}

.file-icon.generic {
  background: rgba(148, 163, 184, 0.12);
}

.file-info {
  flex: 1;
  overflow: hidden;
}

.file-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.file-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: var(--transition);
}

.file-remove:hover {
  color: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════════
   ACTIVE TRANSFER CARD
   ═══════════════════════════════════════════════════════════ */
.active-transfer-card {
  padding: 24px;
  animation: fadeInUp 0.3s ease-out;
}

.transfer-file-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.transfer-file-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.transfer-file-details {
  flex: 1;
  overflow: hidden;
}

.transfer-file-name {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transfer-file-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.transfer-file-counter {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--gradient-glow);
  border: 1px solid var(--border-glow);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.transfer-progress-wrap {
  margin-bottom: 12px;
}

.transfer-progress-bar-wrap {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.transfer-progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  transition: width 0.3s ease;
  position: relative;
}

.transfer-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 1.5s infinite;
}

.transfer-progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.overall-progress {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.overall-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   KILL BUTTON
   ═══════════════════════════════════════════════════════════ */
.kill-btn {
  animation: fadeInUp 0.2s ease-out;
}

.kill-btn:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.25);
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════
   WAITING STATE
   ═══════════════════════════════════════════════════════════ */
.waiting-card {
  padding: 48px 32px;
  text-align: center;
  animation: fadeInUp 0.3s ease-out;
}

.waiting-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.waiting-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.waiting-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════════════════════════════════════
   COMPLETED FILES
   ═══════════════════════════════════════════════════════════ */
.completed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.completed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(52, 211, 153, 0.04);
  border: 1px solid rgba(52, 211, 153, 0.1);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  animation: fadeInUp 0.3s ease-out;
}

.completed-name {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completed-size {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.completed-check {
  color: var(--accent-green);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  max-width: 440px;
  width: 90%;
  padding: 32px;
  text-align: center;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.modal-file-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 12px;
  text-align: left;
}

.modal-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.modal-file-item span:first-child {
  flex-shrink: 0;
}

.modal-file-item span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.modal-file-size {
  color: var(--text-muted);
  font-size: 0.72rem;
  flex-shrink: 0;
}

.modal-more {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 4px;
}

.modal-summary {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.modal-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions .btn {
  min-width: 140px;
  padding: 12px 24px;
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease-out;
  max-width: 360px;
  font-size: 0.85rem;
}

.toast.toast-out {
  animation: toastOut 0.3s ease-in forwards;
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-success {
  border-color: rgba(52, 211, 153, 0.2);
}

.toast-error {
  border-color: rgba(248, 113, 113, 0.2);
}

.toast-info {
  border-color: rgba(129, 140, 248, 0.2);
}

.toast-warning {
  border-color: rgba(251, 191, 36, 0.2);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .modes-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .room-body {
    flex-direction: column;
  }

  .share-panel {
    width: 100%;
    min-width: unset;
    max-height: 50vh;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .qr-section {
    display: none;
  }

  .transfer-area {
    padding: 16px;
  }

  .drop-zone {
    padding: 32px 16px;
  }

  .modal {
    padding: 24px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    min-width: unset;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 10px 16px;
  }

  .dashboard-main {
    padding: 24px 16px 40px;
  }

  .mode-card {
    padding: 24px 20px;
  }

  .features-strip {
    gap: 6px;
  }

  .feature-chip {
    padding: 4px 10px;
    font-size: 0.65rem;
  }
}

/* ─── Utility ─── */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}