:root {
  --bg-primary: #0b0f19;
  --bg-card: rgba(22, 31, 49, 0.7);
  --bg-card-hover: rgba(30, 41, 65, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #6366f1;
  --accent-primary: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --accent-secondary: #a855f7;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Dynamic Orb Background */
.app-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: var(--accent-primary);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-secondary);
  bottom: -150px;
  right: -100px;
  animation-delay: -9s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 820px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
}

.logo svg {
  color: var(--accent-primary);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-accent {
  color: var(--accent-primary);
}

.status-pills {
  display: flex;
  gap: 0.5rem;
}

.pill {
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.pill-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.pill-info {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
}

/* Glassmorphism Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Admin Secret Drawer */
.admin-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--warning);
}

.admin-banner input {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  outline: none;
}

/* Upload Drop Zone */
.upload-card {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  cursor: pointer;
  text-align: center;
  position: relative;
}

.upload-card:hover, .upload-card.drag-over {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-2px);
}

.upload-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  transition: transform 0.3s ease;
}

.upload-card:hover .upload-icon-wrapper {
  transform: scale(1.1);
}

.upload-icon {
  width: 42px;
  height: 42px;
}

.upload-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.upload-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #fff;
}

/* Upload Options Controls */
.upload-options {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.option-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.custom-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

/* Custom Toggle Switch */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
}

.toggle-checkbox {
  display: none;
}

.toggle-slider {
  width: 42px;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  position: relative;
  transition: background 0.3s;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
}

.toggle-checkbox:checked + .toggle-slider {
  background: var(--accent-primary);
}

.toggle-checkbox:checked + .toggle-slider::after {
  transform: translateX(20px);
}

/* Progress Card */
.progress-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.file-details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filename-text {
  font-weight: 600;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filesize-text, .speed-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 10px;
  transition: width 0.2s ease;
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Share Links Card */
.share-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-box-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.link-input-container label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.9rem;
  outline: none;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-outline:hover {
  color: #fff;
  border-color: #fff;
}

.btn-large {
  padding: 1rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Preview Media Page */
.preview-card {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0;
  overflow: hidden;
}

.preview-media-wrapper {
  background: rgba(0, 0, 0, 0.4);
  min-height: 280px;
  max-height: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.preview-img {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.preview-video {
  width: 100%;
  max-height: 500px;
}

.preview-audio {
  width: 80%;
  margin: 3rem 0;
}

.preview-pdf {
  width: 100%;
  height: 500px;
  border: none;
}

.preview-code {
  width: 100%;
  max-height: 450px;
  padding: 1.5rem;
  overflow: auto;
  font-family: monospace;
  font-size: 0.85rem;
  color: #e5e7eb;
  background: #0d1117;
  white-space: pre-wrap;
}

.preview-placeholder {
  font-size: 1.25rem;
  color: var(--text-muted);
  padding: 4rem 1rem;
}

.preview-details-section {
  padding: 2rem 2.5rem 2.5rem;
}

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

.preview-filename {
  font-size: 1.75rem;
  font-weight: 700;
  word-break: break-all;
  margin-bottom: 0.75rem;
}

.file-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  text-transform: uppercase;
}

.badge-warning {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.meta-value {
  font-weight: 600;
  font-size: 0.95rem;
}

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

/* Spinner & Utility Classes */
.hidden {
  display: none !important;
}

.loading-card, .error-card {
  text-align: center;
  padding: 4rem 2rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}
