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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: rgba(0, 0, 0, 0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, #1e293b 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo a {
  color: inherit;
  text-decoration: none;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.upload-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.drop-zone {
  background: var(--bg-card);
  border: 3px dashed var(--border);
  border-radius: 1rem;
  padding: 4rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

.drop-zone-content {
  pointer-events: none;
}

.upload-icon {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.drop-zone h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.upload-hint {
  color: var(--text-muted);
  margin: 0.5rem 0;
}

.upload-limits {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.upload-progress {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px var(--shadow);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.file-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 1rem;
}

.progress-percent {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

.progress-bar {
  background: var(--bg-hover);
  height: 8px;
  border-radius: 1rem;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 1rem;
}

.upload-result {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px var(--shadow);
}

.result-success {
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
  color: white;
}

.result-success h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.result-link {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.result-link input {
  flex: 1;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-copy {
  background: var(--primary-dark);
  color: white;
  white-space: nowrap;
}

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

input[type="text"] {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  width: 100%;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
}

.file-preview {
  flex: 1;
}

.file-card {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px var(--shadow);
  margin-bottom: 1.5rem;
}

.file-header {
  margin-bottom: 1.5rem;
}

.file-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.file-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.file-preview-container {
  margin-bottom: 1.5rem;
  background: var(--bg);
  border-radius: 0.5rem;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.video-preview video {
  width: 100%;
  height: auto;
  display: block;
}

.text-preview iframe {
  width: 100%;
  height: 400px;
  background: white;
}

.file-icon-preview {
  padding: 4rem 2rem;
  text-align: center;
}

.file-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.file-type {
  color: var(--text-muted);
}

.file-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.file-actions .btn {
  flex: 1;
  min-width: 200px;
}

.share-card {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px var(--shadow);
}

.share-card h3 {
  margin-bottom: 1rem;
}

.share-link {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.share-copied {
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.error-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-content {
  max-width: 500px;
}

.error-code {
  font-size: 6rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.error-message {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .file-actions {
    flex-direction: column;
  }
  
  .file-actions .btn {
    min-width: auto;
  }
  
  .result-link {
    flex-direction: column;
  }
  
  .share-link {
    flex-direction: column;
  }
}
