:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --success: #22c55e;
  --error: #ef4444;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-2: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --radius-sm: 8px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 48px;
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.logo-icon {
  font-size: 2rem;
  -webkit-text-fill-color: initial;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Upload Area */
.upload-area {
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.upload-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
}

.upload-area:hover::before,
.upload-area.dragover::before {
  opacity: 0.03;
}

.upload-content {
  position: relative;
  z-index: 1;
}

.upload-icon {
  color: var(--accent);
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.upload-text {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.upload-hint {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.highlight {
  color: var(--accent);
  font-weight: 500;
}

.upload-formats {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* Progress */
.progress-section {
  margin-top: 32px;
}

.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-1);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.progress-text {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 0.875rem;
}

/* Results */
.results-section {
  margin-top: 40px;
}

.results-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-title::before {
  content: "✓";
  color: var(--success);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.result-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-tertiary);
}

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

.result-name {
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-url {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-url input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: monospace;
}

.copy-btn {
  background: var(--gradient-1);
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.copy-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.copy-btn:active {
  transform: scale(0.98);
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 48px;
  text-align: center;
}

.admin-link {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.admin-link:hover {
  color: var(--accent);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  color: var(--text-primary);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--error);
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 40px 16px;
  }

  .logo {
    font-size: 2rem;
  }

  .upload-area {
    padding: 40px 24px;
  }

  .result-item {
    flex-direction: column;
    align-items: stretch;
  }

  .result-thumb {
    width: 100%;
    height: 120px;
  }
}
