/* ═══════════════════════════════════════════════════════════════════════════
   CLIP! – Minimalist Dark Mode Design System
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #121212;
  --bg-secondary: #1a1a1a;
  --bg-card: #222222;
  --bg-card-hover: #2a2a2a;
  
  --border-subtle: #2d2d2d;
  --border-accent: #3d3d3d;
  --border-focus: #555555;

  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;

  --accent-color: #4a5a80;
  --accent-danger: #b71c1c;
  --accent-success: #1b5e20;
  --accent-warning: #e65100;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --transition-normal: 150ms ease-in-out;
}

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

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ─── Screens ────────────────────────────────────────────────────────────── */
.screen {
  display: none;
  min-height: 100vh;
  position: relative;
}

.screen.active {
  display: flex;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
#login-screen {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: #070709;
  /* Blueprint-like structural workspace grid */
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: center;
  position: relative;
  overflow: hidden;
}

/* Centered radial gradient mask for grid vignette fade-out */
#login-screen::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 10%, #070709 80%);
  pointer-events: none;
  z-index: 1;
}

.login-header {
  margin-bottom: 24px;
  z-index: 2;
  /* Will be animated from 0 opacity */
}

.login-logo-text {
  display: inline-block;
  font-size: 4rem;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  will-change: transform, opacity, filter, letter-spacing, text-shadow;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  animation: logoReveal 1.6s cubic-bezier(0.25, 1.25, 0.4, 1) forwards;
}

@keyframes logoReveal {
  0% {
    opacity: 0;
    transform: perspective(800px) rotateX(-90deg) rotateY(-10deg) scale(0.3) translateY(-80px) translateZ(-150px);
    letter-spacing: -0.15em;
    filter: blur(12px) brightness(3);
    text-shadow: 0 0 0px rgba(255, 255, 255, 0);
  }
  35% {
    opacity: 0.9;
    filter: blur(4px) brightness(2);
  }
  100% {
    opacity: 1;
    transform: perspective(800px) rotateX(0deg) rotateY(0deg) scale(1) translateY(0) translateZ(0);
    letter-spacing: 0.15em;
    filter: blur(0) brightness(1);
    text-shadow: 
      0 0 15px rgba(255, 255, 255, 0.5),
      0 0 35px rgba(255, 255, 255, 0.25);
  }
}



.login-container {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 400px;
  width: 90%;
  padding: 44px 32px;
  background: #101014;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 40px 80px rgba(0, 0, 0, 0.7), 
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  animation: loginEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #161620 0%, #0e0e12 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  margin-bottom: 24px;
  box-shadow: 
    0 12px 28px rgba(0, 0, 0, 0.4), 
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: iconFloat 4s ease-in-out infinite;
  position: relative;
}

.lock-icon::before {
  content: '';
  position: absolute;
  width: 130%;
  height: 130%;
  background: radial-gradient(circle, rgba(92, 107, 150, 0.1) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #14141a;
  border: 1px solid #24242f;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  animation: badgePulse 2s infinite alternate;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 8px #4caf50;
}

.badge-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

@keyframes badgePulse {
  0% {
    border-color: #24242f;
    box-shadow: 0 0 4px rgba(36, 36, 47, 0.4);
  }
  100% {
    border-color: #353545;
    box-shadow: 0 0 10px rgba(92, 107, 150, 0.15);
  }
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.login-form {
  width: 100%;
}

.input-group {
  display: flex;
  align-items: center;
  background: #09090c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
  position: relative;
  transition: border-color 0.25s ease;
}

.input-group:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
}

.input-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 14px;
  color: var(--text-muted);
}

.input-group input {
  flex: 1;
  padding: 14px 12px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  box-shadow: none;
}

.input-group input::placeholder {
  color: var(--text-muted);
}

#login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  margin: 4px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-color);
  color: white;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#login-btn:hover {
  background: #566790;
}

/* Metallic specular shine reflection sweep on hover */
#login-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.25) 50%, 
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: none;
}

#login-btn:hover::after {
  left: 150%;
  transition: 0.75s ease-in-out;
}

#login-btn:active {
  transform: scale(0.97);
}

.hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.error-msg {
  font-size: 0.8rem;
  color: #ff8a80;
  margin-top: 12px;
  padding: 10px 14px;
  background: #2a1313;
  border: 1px solid var(--accent-danger);
  border-radius: var(--radius-sm);
  text-align: left;
}

.error-msg.hidden {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 8, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #0f0f13;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.6), 
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modalAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

@keyframes modalAppear {
  0% {
    opacity: 0;
    transform: translateY(25px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  margin-bottom: 20px;
}

.modal-icon-danger {
  border-color: rgba(239, 83, 80, 0.2);
  background: rgba(239, 83, 80, 0.04);
  color: #ef5350;
}

.modal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ─── Specific Pairing Request Modal Styling ─── */
#pair-request-modal .modal-icon {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  animation: connectionRingPulse 2s infinite ease-in-out;
}

@keyframes connectionRingPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    border-color: rgba(255, 255, 255, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    border-color: rgba(255, 255, 255, 0.15);
  }
}

#pair-request-modal h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 40%, #b2b2c2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#pair-request-modal p {
  font-size: 0.92rem;
  color: #a0a0ab;
  line-height: 1.7;
  margin-bottom: 30px;
}

.requester-code {
  display: inline-block;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: 6px;
  margin: 0 4px;
  letter-spacing: 0.05em;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

#pair-decline-btn {
  background: rgba(239, 83, 80, 0.06);
  border: 1px solid rgba(239, 83, 80, 0.2);
  color: #ef5350 !important;
  transition: all 0.25s ease;
}

#pair-decline-btn:hover {
  background: rgba(239, 83, 80, 0.14) !important;
  border-color: rgba(239, 83, 80, 0.35) !important;
  transform: translateY(-2px);
}

#pair-accept-btn {
  background: #ffffff !important;
  color: #070709 !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.12);
  transition: all 0.25s ease;
}

#pair-accept-btn:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.btn-primary, .btn-secondary {
  flex: 1;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: #5c6c96;
}

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

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

/* ═══════════════════════════════════════════════════════════════════════════
   WAITING SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
#waiting-screen {
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.waiting-container {
  text-align: center;
  z-index: 1;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

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

.waiting-container h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.waiting-container p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 360px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════════════════════════════ */
#app-screen {
  flex-direction: column;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-count-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf50;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   CODE SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.code-section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 32px 24px;
}

.code-area {
  display: flex;
  gap: 24px;
  align-items: stretch;
  max-width: 680px;
  width: 100%;
}

.code-card, .connect-card {
  flex: 1;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.my-code-card {
  border-color: var(--border-accent);
}

.code-label, .connect-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.code-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.code-timer-container {
  width: 120px;
  height: 3px;
  background: var(--border-subtle);
  margin-top: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-timer-bar {
  height: 100%;
  width: 100%;
  background: var(--text-secondary);
  transition: width 1s linear;
}

.code-timer-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}


.connect-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

#connect-code-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: var(--transition-normal);
}

#connect-code-input:focus {
  border-color: var(--border-focus);
}

.btn-connect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-color);
  color: white;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-connect:hover {
  background: #5c6c96;
}

.btn-connect:active {
  transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CLIPBOARD SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.clipboard-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
}

.clipboard-section.hidden {
  display: none;
}

.clipboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.clipboard-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.partner-badge {
  padding: 3px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-disconnect {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

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

#clipboard-textarea {
  flex: 1;
  min-height: 250px;
  width: 100%;
  padding: 20px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILE SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.file-section {
  border-top: 1px solid var(--border-subtle);
  padding: 16px 24px;
  background: var(--bg-secondary);
}

.file-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.file-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.file-pool-count {
  padding: 2px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.file-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* FILE MODE TOGGLE SWITCH (STRICT CSS) */
.file-mode-toggle {
  display: flex;
  align-items: center;
}

.toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 0.8rem;
  color: var(--text-secondary);
  gap: 8px;
}

.toggle-label input {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 34px;
  height: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  transition: var(--transition-normal);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  transition: var(--transition-normal);
}

.toggle-label input:checked + .toggle-slider {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.toggle-label input:checked + .toggle-slider::before {
  transform: translateX(16px);
  background-color: white;
}

.toggle-text {
  font-weight: 500;
}

/* Drop Zone */
.file-drop-zone {
  position: relative;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  background: var(--bg-primary);
}

.file-drop-zone:hover {
  border-color: var(--border-focus);
}

.file-drop-zone.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.drop-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Upload Progress */
.upload-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--border-subtle);
}

.upload-progress.hidden {
  display: none;
}

.progress-bar {
  height: 100%;
  background: var(--text-primary);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  top: -20px;
  right: 6px;
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* File List */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.file-list:empty {
  display: none;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.file-info {
  flex: 1;
  min-width: 0;
}

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

.file-size {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.file-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.file-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-normal);
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   CLIPBOARD FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.clipboard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  background: var(--bg-secondary);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 500;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf50;
}

.char-count {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER (IMPRESSUM / DATENSCHUTZ)
   ═══════════════════════════════════════════════════════════════════════════ */
.app-footer {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 50;
}

.app-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-normal);
}

.app-footer a:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* Legal Modals Styling */
.legal-modal {
  max-width: 580px;
  width: 90%;
  text-align: left;
}

.legal-modal h2 {
  margin-bottom: 16px;
  text-align: center;
}

.legal-content {
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 8px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.legal-content p {
  margin-bottom: 10px;
}

.legal-content p strong {
  color: var(--text-primary);
}

.legal-content p:last-child {
  margin-bottom: 0;
}

/* Custom Scrollbar for Legal Modals */
.legal-content::-webkit-scrollbar {
  width: 4px;
}
.legal-content::-webkit-scrollbar-track {
  background: transparent;
}
.legal-content::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  h1 {
    font-size: 1.5rem;
  }

  .code-area {
    flex-direction: column;
    gap: 16px;
  }

  .top-bar {
    padding: 10px 16px;
  }

  .code-section {
    padding: 20px 16px;
  }

  .clipboard-header {
    padding: 10px 16px;
  }

  #clipboard-textarea {
    padding: 16px;
    min-height: 200px;
  }

  .clipboard-footer {
    padding: 8px 16px;
  }

  .file-section {
    padding: 12px 16px;
  }

  .modal {
    padding: 24px;
  }
}
