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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0f;
  color: #e0e0e0;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

header h1 {
  font-size: 2.5rem;
  color: #00d4ff;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.subtitle {
  color: #888;
  font-size: 1rem;
}

.upload-section {
  margin-bottom: 3rem;
}

.drop-zone {
  border: 2px dashed #333;
  border-radius: 16px;
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #111118;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #00d4ff;
  background: #0d1a2a;
}

.drop-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.drop-hint {
  color: #666;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.upload-progress {
  margin-top: 1.5rem;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #222;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #00ff88);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s;
}

.upload-result {
  text-align: center;
  margin-top: 1.5rem;
  padding: 2rem;
  background: #111118;
  border-radius: 12px;
}

.result-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.share-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.qr-container {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  display: inline-block;
}

.share-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1a1a2e;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
}

.share-link input {
  flex: 1;
  background: none;
  border: none;
  color: #00d4ff;
  font-size: 0.9rem;
  outline: none;
}

.share-link button {
  background: #00d4ff;
  color: #000;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.share-link button:hover {
  background: #00b8e0;
}

.studies-section h2 {
  font-size: 1.3rem;
  color: #aaa;
  margin-bottom: 1.5rem;
}

.studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.study-card {
  background: #111118;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.study-card:hover {
  border-color: #00d4ff;
  transform: translateY(-2px);
}

.study-card .modality-badge {
  display: inline-block;
  background: #00d4ff22;
  color: #00d4ff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.study-card h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.study-card .meta {
  color: #666;
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

.study-card .actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.study-card .actions button {
  background: #1a1a2e;
  color: #ccc;
  border: 1px solid #333;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

.study-card .actions button:hover {
  border-color: #00d4ff;
  color: #00d4ff;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #111118;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 2rem;
  max-width: 450px;
  width: 90%;
}

.modal h3 {
  margin-bottom: 1rem;
}

.modal label {
  display: block;
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  margin-top: 1rem;
}

.modal input, .modal select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
}

.modal .btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

.modal .btn-row button {
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.modal .btn-cancel {
  background: #333;
  color: #ccc;
}

.modal .btn-confirm {
  background: #00d4ff;
  color: #000;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  color: #555;
  padding: 3rem;
}
