body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.hero {
  text-align: center;
  color: white;
  padding: 60px 20px 40px;
}

.hero h1 {
  font-size: 56px;
  margin: 0 0 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 20px;
  opacity: 0.9;
  margin: 0;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.demo-section {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.feature {
  background: white;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature h3 {
  color: #1f2937;
  margin: 0 0 12px;
  font-size: 20px;
}

.feature p {
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 40px;
  }
  .demo-section {
    padding: 24px;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; } :host { display: block; font-family: system-ui, -apple-system, sans-serif; --primary: #3b82f6; --success: #10b981; --error: #ef4444; --bg: #ffffff; --border: #e5e7eb; --text: #1f2937; } .container { max-width: 600px; margin: 0 auto; padding: 24px; background: var(--bg); border: 2px solid var(--border); border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); } .header { text-align: center; margin-bottom: 24px; } .header h2 { font-size: 28px; color: var(--text); margin-bottom: 8px; } .connection-mode { background: #f0f9ff; border: 2px solid #bfdbfe; border-radius: 8px; padding: 16px; margin-bottom: 20px; } .connection-mode.offline { background: #fef3c7; border-color: #fbbf24; } .connection-mode.webrtc { background: #dcfce7; border-color: #86efac; } .mode-title { font-size: 14px; font-weight: 600; color: #1e40af; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; } .device-info { background: #f0f9ff; border: 2px solid #bfdbfe; border-radius: 8px; padding: 16px; margin-bottom: 20px; } .device-info-title { font-size: 14px; font-weight: 600; color: #1e40af; margin-bottom: 8px; } .device-details { display: flex; flex-direction: column; gap: 6px; } .device-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #1e3a8a; } .device-label { font-weight: 500; min-width: 80px; } .device-value { font-family: monospace; background: white; padding: 4px 8px; border-radius: 4px; flex: 1; } .peer-info { background: #dcfce7; border: 2px solid #86efac; border-radius: 8px; padding: 16px; margin-bottom: 20px; } .peer-info-title { font-size: 14px; font-weight: 600; color: #166534; margin-bottom: 8px; } .connection-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: white; border-radius: 6px; font-size: 13px; font-weight: 500; margin-top: 8px; } .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: pulse 2s infinite; } .status-dot-off { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .mode-switch { display: flex; gap: 12px; margin-bottom: 24px; padding: 4px; background: #f9fafb; border-radius: 8px; } .mode-btn { flex: 1; padding: 12px; border: none; border-radius: 6px; font-size: 16px; font-weight: 500; cursor: pointer; background: transparent; color: #6b7280; transition: all 0.2s; } .mode-btn.active { background: white; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); } .drop-zone { border: 2px dashed var(--border); border-radius: 8px; padding: 40px 20px; text-align: center; cursor: pointer; transition: all 0.2s; margin-bottom: 16px; } .drop-zone:hover { border-color: var(--primary); background: #eff6ff; } .drop-zone.drag-over { border-color: var(--primary); background: #eff6ff; } .drop-zone svg { width: 48px; height: 48px; color: #9ca3af; margin-bottom: 12px; } input[type="file"] { display: none; } .code-section { text-align: center; padding: 24px; background: #f9fafb; border-radius: 8px; margin: 20px 0; } .code-label { font-size: 14px; color: #6b7280; margin-bottom: 8px; } .code-display { font-size: 56px; font-weight: bold; color: var(--primary); letter-spacing: 12px; font-family: monospace; margin: 12px 0; user-select: all; } .code-input { width: 100%; max-width: 200px; padding: 16px; border: 2px solid var(--border); border-radius: 8px; font-size: 32px; text-align: center; text-transform: uppercase; letter-spacing: 8px; font-family: monospace; font-weight: bold; } button { width: 100%; padding: 14px 24px; border: none; border-radius: 8px; font-size: 16px; font-weight: 500; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; } button:disabled { opacity: 0.5; cursor: not-allowed; } .btn-primary { background: var(--primary); color: white; } .btn-primary:hover:not(:disabled) { background: #2563eb; } .file-info { background: #f9fafb; padding: 16px; border-radius: 8px; margin-bottom: 16px; } .file-name { font-weight: 600; color: var(--text); margin-bottom: 4px; } .file-size { font-size: 14px; color: #6b7280; } .progress { margin-top: 16px; } .progress-bar { width: 100%; height: 10px; background: #e5e7eb; border-radius: 5px; overflow: hidden; } .progress-fill { height: 100%; background: var(--primary); transition: width 0.3s; } .progress-text { text-align: center; margin-top: 8px; font-size: 14px; color: #6b7280; font-weight: 500; } .status { text-align: center; padding: 12px; border-radius: 8px; margin-top: 16px; font-size: 14px; font-weight: 500; } .status.success { background: #d1fae5; color: #065f46; } .status.error { background: #fee2e2; color: #991b1b; } .status.info { background: #dbeafe; color: #1e40af; } .directory { margin-top: 32px; border-top: 2px solid var(--border); padding-top: 24px; } .directory-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; } .directory-title { font-size: 18px; font-weight: 600; color: var(--text); } .clear-btn { padding: 6px 12px; font-size: 14px; background: #f3f4f6; color: #6b7280; } .clear-btn:hover { background: #e5e7eb; } .file-list { display: flex; flex-direction: column; gap: 8px; } .file-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: #f9fafb; border-radius: 8px; transition: all 0.2s; } .file-item:hover { background: #f3f4f6; } .file-item-info { flex: 1; min-width: 0; } .file-item-name { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .file-item-meta { font-size: 12px; color: #6b7280; margin-top: 4px; } .download-btn { padding: 8px 16px; font-size: 14px; background: var(--primary); color: white; width: auto; } .download-btn:hover { background: #2563eb; } .empty-state { text-align: center; padding: 40px 20px; color: #9ca3af; } .empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.5; } .hidden { display: none !important; } .toggle-switch { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 12px; background: #f9fafb; border-radius: 8px; } .switch { position: relative; display: inline-block; width: 50px; height: 28px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 28px; } .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .3s; border-radius: 50%; } input:checked + .slider { background-color: #10b981; } input:checked + .slider:before { transform: translateX(22px); } 

* { box-sizing: border-box; margin: 0; padding: 0; }

:host {
  display: block;
  font-family: system-ui, -apple-system, sans-serif;
  --primary: #3b82f6;
  --success: #10b981;
  --error: #ef4444;
  --bg: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
}

.container { max-width: 600px; margin: 0 auto; padding: 24px; background: var(--bg); border: 2px solid var(--border); border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.header { text-align: center; margin-bottom: 24px; }
.header h2 { font-size: 28px; color: var(--text); margin-bottom: 8px; }

.connection-mode { background: #f0f9ff; border: 2px solid #bfdbfe; border-radius: 8px; padding: 16px; margin-bottom: 20px; }
.connection-mode.offline { background: #fef3c7; border-color: #fbbf24; }
.connection-mode.webrtc { background: #dcfce7; border-color: #86efac; }
.mode-title { font-size: 14px; font-weight: 600; color: #1e40af; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }

.device-info { background: #f0f9ff; border: 2px solid #bfdbfe; border-radius: 8px; padding: 16px; margin-bottom: 20px; }
.device-info-title { font-size: 14px; font-weight: 600; color: #1e40af; margin-bottom: 8px; }
.device-details { display: flex; flex-direction: column; gap: 6px; }
.device-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #1e3a8a; }
.device-label { font-weight: 500; min-width: 80px; }
.device-value { font-family: monospace; background: white; padding: 4px 8px; border-radius: 4px; flex: 1; }

.peer-info { background: #dcfce7; border: 2px solid #86efac; border-radius: 8px; padding: 16px; margin-bottom: 20px; }
.peer-info-title { font-size: 14px; font-weight: 600; color: #166534; margin-bottom: 8px; }
.connection-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: white; border-radius: 6px; font-size: 13px; font-weight: 500; margin-top: 8px; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: pulse 2s infinite; }
.status-dot-off { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.mode-switch { display: flex; gap: 12px; margin-bottom: 24px; padding: 4px; background: #f9fafb; border-radius: 8px; }
.mode-btn { flex: 1; padding: 12px; border: none; border-radius: 6px; font-size: 16px; font-weight: 500; cursor: pointer; background: transparent; color: #6b7280; transition: all 0.2s; }
.mode-btn.active { background: white; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.drop-zone { border: 2px dashed var(--border); border-radius: 8px; padding: 40px 20px; text-align: center; cursor: pointer; transition: all 0.2s; margin-bottom: 16px; }
.drop-zone:hover { border-color: var(--primary); background: #eff6ff; }
.drop-zone.drag-over { border-color: var(--primary); background: #eff6ff; }
.drop-zone svg { width: 48px; height: 48px; color: #9ca3af; margin-bottom: 12px; }
input[type="file"] { display: none; }

.code-section { text-align: center; padding: 24px; background: #f9fafb; border-radius: 8px; margin: 20px 0; }
.code-label { font-size: 14px; color: #6b7280; margin-bottom: 8px; }
.code-display { font-size: 56px; font-weight: bold; color: var(--primary); letter-spacing: 12px; font-family: monospace; margin: 12px 0; user-select: all; }
.code-input { width: 100%; max-width: 200px; padding: 16px; border: 2px solid var(--border); border-radius: 8px; font-size: 32px; text-align: center; text-transform: uppercase; letter-spacing: 8px; font-family: monospace; font-weight: bold; }

button { width: 100%; padding: 14px 24px; border: none; border-radius: 8px; font-size: 16px; font-weight: 500; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: #2563eb; }

.file-info { background: #f9fafb; padding: 16px; border-radius: 8px; margin-bottom: 16px; }
.file-name { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.file-size { font-size: 14px; color: #6b7280; }

.progress { margin-top: 16px; }
.progress-bar { width: 100%; height: 10px; background: #e5e7eb; border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); transition: width 0.3s; }
.progress-text { text-align: center; margin-top: 8px; font-size: 14px; color: #6b7280; font-weight: 500; }

.status { text-align: center; padding: 12px; border-radius: 8px; margin-top: 16px; font-size: 14px; font-weight: 500; }
.status.success { background: #d1fae5; color: #065f46; }
.status.error { background: #fee2e2; color: #991b1b; }
.status.info { background: #dbeafe; color: #1e40af; }

.directory { margin-top: 32px; border-top: 2px solid var(--border); padding-top: 24px; }
.directory-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.directory-title { font-size: 18px; font-weight: 600; color: var(--text); }
.clear-btn { padding: 6px 12px; font-size: 14px; background: #f3f4f6; color: #6b7280; }
.clear-btn:hover { background: #e5e7eb; }

.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: #f9fafb; border-radius: 8px; transition: all 0.2s; }
.file-item:hover { background: #f3f4f6; }
.file-item-info { flex: 1; min-width: 0; }
.file-item-name { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-meta { font-size: 12px; color: #6b7280; margin-top: 4px; }
.download-btn { padding: 8px 16px; font-size: 14px; background: var(--primary); color: white; width: auto; }
.download-btn:hover { background: #2563eb; }

.empty-state { text-align: center; padding: 40px 20px; color: #9ca3af; }
.empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.5; }
.hidden { display: none !important; }

.toggle-switch { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 12px; background: #f9fafb; border-radius: 8px; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 28px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: #10b981; }
input:checked + .slider:before { transform: translateX(22px); }

.header-row { display: flex; justify-content: space-between; align-items: center; }
.subtitle { color: #6b7280; font-size: 14px; }
.toggle-label { font-weight: 600; font-size: 14px; }
.toggle-desc { font-size: 12px; color: #6b7280; }
.mode-details { font-size: 12px; color: #6b7280; margin-top: 8px; }
.mt-sm { margin-top: 8px; }
.hint-text { font-size: 14px; color: #6b7280; margin-top: 8px; }
.sending-icon { color: #3b82f6; }

.warning-box { margin-top: 12px; padding: 10px; background: #fef3c7; border: 1px solid #fbbf24; border-radius: 6px; }
.warning-title { margin: 0; font-weight: 600; color: #92400e; }
.warning-text { margin: 8px 0 0 0; color: #78350f; }
.warning-text-sm { font-size: 11px; }
.code-inline { display: block; margin-top: 6px; padding: 6px; background: white; border-radius: 4px; font-size: 11px; color: #1e3a8a; }

.share-url-box { margin-top: 12px; padding: 8px; background: white; border-radius: 6px; font-size: 12px; color: #6b7280; word-break: break-all; }
.btn-row-center { display: flex; gap: 10px; justify-content: center; margin-top: 15px; }
.btn-auto { width: auto; }
.btn-compact { padding: 4px 8px; }
.qrcode-box { margin: 20px auto; display: flex; justify-content: center; }

.dropzone-title { font-weight: 600; margin-bottom: 4px; }
.file-list-scroll { max-height: 200px; overflow-y: auto; margin-bottom: 16px; }
.selected-files-title { font-weight: 600; margin-bottom: 8px; color: #1f2937; }
.mb-sm { margin-bottom: 8px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

.header-row { display: flex; justify-content: space-between; align-items: center; }
.subtitle { color: #6b7280; font-size: 14px; }
.toggle-label { font-weight: 600; font-size: 14px; }
.toggle-desc { font-size: 12px; color: #6b7280; }
.mode-details { font-size: 12px; color: #6b7280; margin-top: 8px; }
.mt-sm { margin-top: 8px; }
.hint-text { font-size: 14px; color: #6b7280; margin-top: 8px; }
.sending-icon { color: #3b82f6; }

.warning-box { margin-top: 12px; padding: 10px; background: #fef3c7; border: 1px solid #fbbf24; border-radius: 6px; }
.warning-title { margin: 0; font-weight: 600; color: #92400e; }
.warning-text { margin: 8px 0 0 0; color: #78350f; }
.warning-text-sm { font-size: 11px; }
.code-inline { display: block; margin-top: 6px; padding: 6px; background: white; border-radius: 4px; font-size: 11px; color: #1e3a8a; }

.share-url-box { margin-top: 12px; padding: 8px; background: white; border-radius: 6px; font-size: 12px; color: #6b7280; word-break: break-all; }
.btn-row-center { display: flex; gap: 10px; justify-content: center; margin-top: 15px; }
.btn-auto { width: auto; }
.btn-compact { padding: 4px 8px; }
.qrcode-box { margin: 20px auto; display: flex; justify-content: center; }

.dropzone-title { font-weight: 600; margin-bottom: 4px; }
.file-list-scroll { max-height: 200px; overflow-y: auto; margin-bottom: 16px; }
.selected-files-title { font-weight: 600; margin-bottom: 8px; color: #1f2937; }
.mb-sm { margin-bottom: 8px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }