:root {
  --bg-primary: #0a0e14;
  --bg-secondary: #151920;
  --bg-tertiary: #1c2128;
  --accent-primary: #00e5cc;
  --accent-secondary: #358cc3;
  --text-primary: #e8eaed;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  --border-color: #2d3748;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(0, 229, 204, 0.15);
}

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

body {
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(124, 58, 237, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(0, 229, 204, 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 900px;
  width: 100%;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 229, 204, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 229, 204, 0);
  }
}

.logo-icon::before,
.logo-icon::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--bg-primary);
  border-radius: 50%;
}

.logo-icon::before {
  top: 10px;
  left: 8px;
}

.logo-icon::after {
  top: 10px;
  right: 8px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
}

/* Main Card */
.card {
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: scaleIn 0.4s ease-out 0.2s both;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.card-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(
    to bottom,
    var(--bg-secondary),
    var(--bg-tertiary)
  );
}

.user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.input-group {
  flex: 1;
  position: relative;
}

.input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.input-field {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 229, 204, 0.1);
}

.input-field::placeholder {
  color: var(--text-tertiary);
}

.username-wrap {
  display: flex;
  gap: 0.5rem;
}

.enter-btn {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--accent-primary);
  color: #000;
  font-weight: 600;
  cursor: pointer;
}

.enter-btn:hover {
  opacity: 0.9;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  min-width: 140px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.status-dot::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0;
    transform: scale(1.8);
  }
}

.status-online .status-dot {
  background: var(--success);
}

.status-online .status-dot::before {
  background: var(--success);
}

.status-offline .status-dot {
  background: var(--text-tertiary);
}

.status-connecting .status-dot {
  background: var(--warning);
}

.status-connecting .status-dot::before {
  background: var(--warning);
}

.peer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(0, 229, 204, 0.05);
  border: 1px solid rgba(0, 229, 204, 0.2);
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
}

.peer-label {
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.peer-id {
  color: var(--accent-primary);
  font-weight: 500;
}

/* Content Area */
.card-body {
  padding: 2rem;
}

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.panel {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.panel:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.panel-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.panel-send .panel-icon {
  background: linear-gradient(
    135deg,
    rgba(0, 229, 204, 0.2),
    rgba(0, 229, 204, 0.1)
  );
  color: var(--accent-primary);
}

.panel-receive .panel-icon {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.2),
    rgba(124, 58, 237, 0.1)
  );
  color: var(--accent-secondary);
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.file-drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.file-drop-zone::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 229, 204, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.file-drop-zone:hover {
  border-color: var(--accent-primary);
  background: rgba(0, 229, 204, 0.03);
}

.file-drop-zone:hover::before {
  left: 100%;
}

.file-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.file-drop-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.file-drop-hint {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.file-selected {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.file-preview {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.875rem;
}

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

.file-name {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.file-meta {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.incoming-file {
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.incoming-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.incoming-from {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.incoming-sender {
  color: var(--accent-secondary);
  font-family: "JetBrains Mono", monospace;
}

.incoming-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-accept {
  background: var(--success);
  color: white;
}

.btn-accept:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

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

/* Progress Section */
.progress-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.progress-status {
  font-size: 0.95rem;
  font-weight: 500;
}

.progress-percent {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-primary);
  font-weight: 600;
}

.progress-bar-container {
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  position: relative;
}

.progress-bar-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: slide 1.5s infinite;
}

@keyframes slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-details {
  display: flex;
  justify-content: space-between;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

/* Status Messages */
.status-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.status-message-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.status-message-content {
  flex: 1;
}

.status-message-text {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.status-message-time {
  font-size: 0.75rem;
  opacity: 0.7;
}

.status-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.status-success .status-message-icon {
  background: var(--success);
  color: white;
}

.status-success .status-message-text {
  color: var(--success);
}

.status-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.status-error .status-message-icon {
  background: var(--error);
  color: white;
}

.status-error .status-message-text {
  color: var(--error);
}

.status-info {
  background: rgba(0, 229, 204, 0.1);
  border-color: rgba(0, 229, 204, 0.3);
}

.status-info .status-message-icon {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.status-info .status-message-text {
  color: var(--accent-primary);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.5s,
    height 0.5s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: var(--bg-primary);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(0, 229, 204, 0.4);
  transform: translateY(-2px);
}

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

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

/* Footer */
.footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 229, 204, 0.1);
  border: 1px solid rgba(0, 229, 204, 0.2);
  border-radius: 6px;
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 1rem;
}

.privacy-icon {
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .panels {
    grid-template-columns: 1fr;
  }

  .card-header,
  .card-body {
    padding: 1.5rem;
  }

  .user-section {
    flex-direction: column;
  }

  .status-indicator {
    width: 100%;
  }

  .action-buttons {
    flex-direction: column;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-tertiary);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-text {
  font-size: 0.95rem;
}
