* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #0f1117;
  color: #e1e4e8;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.container {
  width: 100%;
  max-width: 900px;
}

/* Card */
.card {
  background: #1a1d27;
  border: 1px solid #2d3142;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #e1e4e8;
}

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
}

.card-icon {
  text-align: center;
  color: #6c8aff;
  margin-bottom: 8px;
}

/* Login */
.login-card {
  max-width: 380px;
  margin: 80px auto 0;
  text-align: center;
}

.login-card h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}

.subtitle {
  color: #8b8fa3;
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-form input {
  padding: 12px 16px;
  background: #12141c;
  border: 1px solid #2d3142;
  border-radius: 8px;
  color: #e1e4e8;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.login-form input:focus {
  border-color: #6c8aff;
}

.login-form input::placeholder {
  color: #555a6e;
}

.login-form button {
  padding: 12px;
  background: #6c8aff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.login-form button:hover {
  background: #5a75e0;
}

.status-text {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #f87171;
  min-height: 1.2em;
}

.status-text.success {
  color: #4ade80;
}

/* Drop Zone */
.drop-zone {
  position: relative;
  border: 2px dashed #2d3142;
  border-radius: 10px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover {
  border-color: #6c8aff;
  background: rgba(108, 138, 255, 0.04);
}

.drop-zone.drag-over {
  border-color: #6c8aff;
  background: rgba(108, 138, 255, 0.08);
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-zone-content {
  pointer-events: none;
  color: #8b8fa3;
}

.drop-zone-content svg {
  margin-bottom: 12px;
  color: #555a6e;
}

.drop-zone-content p {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.browse-link {
  color: #6c8aff;
  font-weight: 500;
}

.drop-zone-hint {
  font-size: 0.78rem !important;
  color: #555a6e !important;
}

/* Selected File */
.selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #12141c;
  border: 1px solid #2d3142;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
}

.selected-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #8b8fa3;
}

.selected-file-info div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.selected-file-name {
  font-size: 0.9rem;
  color: #e1e4e8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-file-size {
  font-size: 0.78rem;
  color: #8b8fa3;
}

.remove-file-btn {
  background: none;
  border: none;
  color: #555a6e;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}

.remove-file-btn:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

/* Upload Button */
.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: #6c8aff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.upload-btn:hover {
  background: #5a75e0;
}

.upload-btn:disabled {
  background: #3a3f55;
  color: #666a7e;
  cursor: not-allowed;
}

/* Progress */
.progress-container {
  margin-top: 16px;
}

.progress-bar-wrapper {
  width: 100%;
  height: 8px;
  background: #12141c;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6c8aff, #a78bfa);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar-fill.complete {
  background: linear-gradient(90deg, #4ade80, #22d3ee);
}

.progress-details {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
  color: #8b8fa3;
}

.upload-status {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #8b8fa3;
}

.upload-status.error {
  color: #f87171;
}

.upload-status.success {
  color: #4ade80;
}

/* Speed Graph */
.speed-graph {
  width: 100%;
  height: 120px;
  margin-top: 12px;
  border-radius: 6px;
  background: #12141c;
  border: 1px solid #2d3142;
}

.speed-graph-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.7rem;
  color: #555a6e;
}

/* File List */
.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.file-list-empty {
  text-align: center;
  color: #555a6e;
  font-size: 0.88rem;
  padding: 24px 0;
  grid-column: 1 / -1;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #e1e4e8;
  background: #12141c;
  border: 1px solid #2d3142;
  transition: background 0.15s, border-color 0.15s;
}

.file-item:hover {
  background: rgba(108, 138, 255, 0.06);
  border-color: #3d4260;
}

.file-item-icon {
  flex-shrink: 0;
  color: #555a6e;
}

.file-item-details {
  flex: 1;
  min-width: 0;
}

.file-item-name {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.file-item-size {
  font-size: 0.75rem;
  color: #8b8fa3;
}

.file-item-download {
  flex-shrink: 0;
  color: #555a6e;
  transition: color 0.15s;
}

.file-item:hover .file-item-download {
  color: #6c8aff;
}

/* Refresh Button */
.refresh-btn {
  background: none;
  border: 1px solid #2d3142;
  color: #8b8fa3;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}

.refresh-btn:hover {
  color: #6c8aff;
  border-color: #6c8aff;
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 20px 12px;
  }

  .card {
    padding: 20px;
  }

  .login-card {
    margin-top: 40px;
  }

  .drop-zone {
    padding: 28px 16px;
  }
}
