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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

#app {
  max-width: 1200px;
  margin: 0 auto;
}

.container {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  color: #667eea;
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.header p {
  color: #666;
  font-size: 1.1rem;
}

.connection-status {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.connection-status.connected {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.connection-status.disconnected {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.connection-status.connecting {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.peer-id {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 24px;
}

.peer-id input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
}

.peer-id button {
  padding: 8px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.peer-id button:hover {
  background: #5568d3;
}

.peer-id button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.card {
  padding: 24px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  background: #f8f9fa;
}

.card h2 {
  color: #333;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.file-input-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.file-input-wrapper input[type="file"] {
  display: none;
}

.file-input-label {
  display: block;
  padding: 48px 24px;
  border: 2px dashed #667eea;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.file-input-label:hover {
  border-color: #5568d3;
  background: #f0f4ff;
}

.file-input-label.has-file {
  border-style: solid;
  background: #e7f3ff;
}

.target-peer-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.send-button {
  width: 100%;
  padding: 12px 24px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.send-button:hover:not(:disabled) {
  background: #218838;
}

.send-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s;
}

.file-list {
  list-style: none;
}

.file-item {
  padding: 16px;
  background: white;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #dee2e6;
}

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

.file-name {
  font-weight: 600;
  color: #333;
  word-break: break-word;
}

.file-size {
  color: #666;
  font-size: 0.9rem;
}

.file-status {
  font-size: 0.9rem;
  color: #666;
  margin-top: 8px;
}

.download-button {
  padding: 8px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
  margin-top: 8px;
}

.download-button:hover {
  background: #5568d3;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #666;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .header h1 {
    font-size: 2rem;
  }
}
