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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a26;
  --border: #2a2a3a;
  --border-highlight: #0061E3;
  --accent: #0061E3;
  --accent-hover: #0050c2;
  --accent-glow: rgba(0, 97, 227, 0.15);
  --text-primary: #e8e8ed;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 560px;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  width: 100%;
  max-width: 1230px;
  height: auto;
  aspect-ratio: 1230 / 350;
  margin-bottom: 16px;
  object-fit: contain;
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* Upload Area */
.upload-area {
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 32px;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.upload-area.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 30px rgba(0, 97, 227, 0.1);
}

.upload-content {
  text-align: center;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 16px;
}

.upload-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.upload-or {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.browse-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.browse-btn:hover {
  background: var(--accent-hover);
}

.upload-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Progress */
.progress-container {
  text-align: left;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.file-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.file-name {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.15s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Result */
.result-container {
  text-align: center;
}

.success-icon {
  width: 48px;
  height: 48px;
  color: var(--success);
  margin-bottom: 12px;
}

.result-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.link-box {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.share-url {
  flex: 1;
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-primary);
  padding: 12px 14px;
  font-size: 14px;
  font-family: monospace;
  outline: none;
  min-width: 0;
}

.copy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--accent-hover);
}

.copy-btn.copied {
  background: var(--success);
}

.expires-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.upload-another-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.upload-another-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* Error */
.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 16px;
  text-align: center;
}

/* Viewer page */
.viewer-container {
  width: 100%;
  max-width: 960px;
}

.video-wrapper {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-wrapper video {
  width: 100%;
  display: block;
  max-height: 80vh;
}

.video-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.video-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 16px;
}

.video-meta {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 404 page */
.error-container {
  text-align: center;
}

.error-code {
  font-size: 72px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.error-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.error-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.home-link {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.home-link:hover {
  background: var(--accent-hover);
}

@media (max-width: 600px) {
  .upload-area {
    padding: 32px 20px;
  }

  .video-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
