:root{
  --bg:#0f1115; --fg:#e6eef8; --muted:#9fb0c9; --accent:#0ab4ff;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

/* Topbar customization for file sharing page */
.file-share-label {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 1rem;
}

/* File Sharing Page Styles */
.file-sharing-container {
  padding: 2rem 0;
}

.file-sharing-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.file-sharing-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
}

.connection-status {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(10, 180, 255, 0.1);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.file-sharing-header .connection-status {
  margin-top: 0.5rem;
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.1rem;
  padding: 0 1.2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.panel {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 300px;
}

.panel h2 {
  margin: 0 0 0.8rem 0;
  font-size: 1rem;
  color: var(--fg);
}

.panel-hint {
  margin: 0 0 0.8rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.file-wrap {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: rgba(10, 180, 255, 0.1);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.file-wrap:hover {
  background: rgba(10, 180, 255, 0.2);
  transform: translateY(-2px);
}

input[type=file] {
  display: none;
}

#fileMeta {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}

#peersList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.peer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(10, 180, 255, 0.2);
  transition: all 0.2s;
}

.peer-item:hover {
  background: rgba(10, 180, 255, 0.08);
  border-color: rgba(10, 180, 255, 0.4);
}

.peer-item span {
  flex: 1;
  font-weight: 500;
}

.peer-item button {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 0;
  background: var(--accent);
  color: #021018;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.peer-item button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(10, 180, 255, 0.4);
}

.empty-message {
  padding: 1.2rem 0.8rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

progress {
  width: 100%;
  height: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: rgba(0, 0, 0, 0.2);
}

progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 8px;
}

progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 8px;
}

#transferStatus {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  color: var(--fg);
}

.received-section {
  margin-top: 0.8rem;
}

.download-link {
  display: block;
  margin: 0.6rem 0;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  background: rgba(10, 180, 255, 0.1);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid var(--accent);
  transition: all 0.2s;
}

.download-link:hover {
  background: rgba(10, 180, 255, 0.2);
  transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
  
  .panel {
    min-height: 200px;
  }
  
  .file-sharing-header h1 {
    font-size: 1.5rem;
  }
}
