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

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

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header */
header {
  margin-bottom: 32px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-icon {
  flex-shrink: 0;
}

.dot {
  color: #6c5ce7;
}

.log-btn {
  background: none;
  border: 1px solid #2a2a3e;
  color: #888;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.log-btn:hover {
  border-color: #6c5ce7;
  color: #6c5ce7;
}

.ephemeral-badge {
  display: inline-block;
  background: rgba(230, 126, 34, 0.12);
  color: #e67e22;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* Storage bar */
.storage-bar {
  position: relative;
  height: 28px;
  background: #1a1a2e;
  border-radius: 14px;
  overflow: hidden;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, #6c5ce7, #a29bfe);
  border-radius: 14px;
  transition: width 0.4s ease;
  width: 0%;
}

.storage-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Dropzone */
.dropzone {
  border: 2px dashed #2a2a3e;
  border-radius: 16px;
  padding: 48px 20px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-bottom: 32px;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #6c5ce7;
  background: rgba(108, 92, 231, 0.05);
}

.dropzone-content svg {
  color: #555;
  margin-bottom: 12px;
}

.dropzone.dragover .dropzone-content svg {
  color: #6c5ce7;
}

.dropzone-content p {
  font-size: 1rem;
  color: #888;
  margin-bottom: 8px;
}

.or {
  display: block;
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 12px;
}

.btn {
  background: #6c5ce7;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: #5a4bd1;
}

/* File list */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #111122;
  border-radius: 10px;
  padding: 12px 16px;
  transition: background 0.15s;
}

.file-item:hover {
  background: #1a1a33;
}

/* File thumbnails */
.file-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #1e1e3a;
}

.file-thumb img,
.file-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1rem;
}

.file-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #1e1e3a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #a29bfe;
  text-transform: uppercase;
}

.file-icon.pdf-icon {
  color: #e74c3c;
  cursor: pointer;
}

.file-icon.audio-icon {
  color: #2ecc71;
  font-size: 1.2rem;
  cursor: pointer;
}

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

.file-name {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 0.75rem;
  color: #666;
  margin-top: 2px;
}

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

.file-actions button {
  background: none;
  border: 1px solid #2a2a3e;
  color: #888;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.file-actions button:hover {
  border-color: #6c5ce7;
  color: #6c5ce7;
}

.file-actions button.delete:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

/* Upload progress overlay */
.upload-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  z-index: 100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.upload-overlay.active {
  display: flex;
}

.upload-progress-bar {
  width: 300px;
  height: 8px;
  background: #1a1a2e;
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6c5ce7, #a29bfe);
  border-radius: 4px;
  transition: width 0.15s;
  width: 0%;
}

.upload-text {
  color: #aaa;
  font-size: 0.9rem;
}

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

/* Log panel (slide from right) */
.log-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.log-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.log-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #0e0e1a;
  border-left: 1px solid #1e1e3a;
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.log-panel.open {
  transform: translateX(0);
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #1e1e3a;
}

.log-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

.log-close {
  background: none;
  border: none;
  color: #666;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.log-close:hover {
  color: #e0e0e0;
}

.log-entries {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.log-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  background: #111122;
}

.log-entry:hover {
  background: #1a1a33;
}

.log-action {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.log-upload {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.log-download {
  background: rgba(108, 92, 231, 0.15);
  color: #a29bfe;
}

.log-delete {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.log-filename {
  font-size: 0.8rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-size {
  font-size: 0.7rem;
  color: #555;
  flex-shrink: 0;
}

.log-meta {
  font-size: 0.65rem;
  color: #444;
  width: 100%;
}

.log-empty {
  text-align: center;
  color: #444;
  padding: 40px 0;
  font-size: 0.85rem;
}

/* Preview modal */
.preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.92);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}

.preview-overlay.active {
  display: flex;
}

.preview-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #888;
  font-size: 2rem;
  cursor: pointer;
  z-index: 301;
  line-height: 1;
}

.preview-close:hover {
  color: #fff;
}

.preview-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-content img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.preview-content video {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
}

.preview-content audio {
  width: 360px;
}

.preview-content iframe {
  width: 80vw;
  height: 85vh;
  border-radius: 8px;
  background: #fff;
}
