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

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

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 16px;
}

h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff;
}

/* API Status */
.api-status {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 16px;
  background: #111;
  color: #888;
}
.api-status.online { background: #0a1a0a; color: #4caf50; border: 1px solid #1a3a1a; }
.api-status.offline { background: #1a0a0a; color: #ff5555; border: 1px solid #3a1a1a; }
.api-status.checking { background: #1a1a0a; color: #ffb347; }

/* Drop zone */
.drop-zone {
  border: 2px dashed #333;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  transition: .2s;
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.active {
  border-color: #6c8cff;
  background: rgba(108,140,255,.06);
}
.drop-zone p { color: #888; font-size: 14px; }
.drop-zone .hint { font-size: 12px; color: #444; margin-top: 6px; }
.link { color: #6c8cff; cursor: pointer; text-decoration: underline; }

/* Storage stats */
.storage-stats {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #111;
  border-radius: 10px;
  font-size: 13px;
  color: #888;
}
.storage-stats .bar {
  height: 6px;
  background: #1a1a1a;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.storage-stats .bar-fill {
  height: 100%;
  background: #6c8cff;
  border-radius: 3px;
  transition: width .3s;
}
.storage-stats .bar-fill.warn { background: #ffb347; }
.storage-stats .bar-fill.danger { background: #ff5555; }
.storage-stats .values {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: #555;
}

/* Progress */
.progress-bar {
  background: #222;
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}
.progress-fill {
  height: 3px;
  background: #6c8cff;
  width: 0%;
  transition: width .2s;
}
.progress-text {
  font-size: 12px;
  color: #555;
  padding: 6px 0 0;
}

/* File list */
.file-list { margin-top: 20px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #1a1a1a;
  transition: background .15s;
}
.file-item:hover { background: #141414; }

.file-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.icon-image { background: #1a2e1a; }
.icon-video { background: #2e1a1a; }
.icon-audio { background: #1a1a2e; }
.icon-doc   { background: #2e2a1a; }
.icon-file  { background: #1a1a1a; }

.file-info {
  flex: 1;
  min-width: 0;
}
.file-name {
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.file-name:hover { color: #6c8cff; }
.file-meta { font-size: 12px; color: #555; margin-top: 2px; }

.file-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon {
  width: 30px; height: 30px;
  border: none;
  border-radius: 6px;
  background: #1a1a1a;
  color: #888;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: .15s;
}
.btn-icon:hover { background: #252525; color: #fff; }
.btn-icon.del:hover { background: #3a1515; color: #ff5555; }

/* Empty state */
.empty {
  text-align: center;
  padding: 60px 0;
  color: #444;
  font-size: 14px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }

.modal-content {
  background: #111;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  min-width: 300px;
}

.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: #222;
  color: #aaa;
  font-size: 16px;
  cursor: pointer;
  z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #333; color: #fff; }

.modal-body {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}
.modal-body img, .modal-body video, .modal-body audio {
  max-width: 100%;
  max-height: 75vh;
}
.modal-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 13px;
  color: #ccc;
  max-height: 70vh;
  overflow: auto;
  width: 100%;
}

.modal-info {
  padding: 10px 16px;
  border-top: 1px solid #222;
  font-size: 12px;
  color: #555;
}
