:root {
  --bg-dark: #0a0a0f;
  --bg-card: rgba(20, 20, 30, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-glass: rgba(255, 255, 255, 0.08);
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --accent-hover: #818cf8;
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: var(--bg-dark);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

/* Header */
.header {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 48px;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
  transition: transform 0.3s ease;
}

.brand:hover .logo-icon {
  transform: scale(1.05) rotate(5deg);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.logo {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Upload Container */
.upload-container {
  width: 100%;
  max-width: 600px;
}

/* Drop Zone */
.drop-zone {
  position: relative;
  border: 2px dashed var(--border-glass);
  border-radius: 20px;
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
  opacity: 0.3;
}

.drop-zone.uploading {
  pointer-events: none;
}

/* Upload Options */
.options-container {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
}

.option {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.option select {
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

.option select:hover {
  border-color: var(--accent);
}

/* Admin Styles */
.admin-container {
  width: 100%;
  max-width: 1000px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  text-align: left;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.btn-delete {
  padding: 0.5rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-delete:hover {
  background: #ef4444;
  color: white;
}

.login-form {
  max-width: 400px;
  margin: 100px auto;
  text-align: center;
  padding: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
}

.login-form h2 {
  margin-bottom: 1.5rem;
}

.login-form input {
  width: 100%;
  padding: 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  color: var(--text-primary);
  margin-bottom: 1rem;
  outline: none;
}

.login-form button {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.drop-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px var(--accent-glow);
}

.drop-icon svg {
  width: 36px;
  height: 36px;
  stroke: white;
  stroke-width: 2;
  fill: none;
}

.drop-text h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.drop-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.drop-text .limit {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1rem;
}

input[type="file"] {
  display: none;
}

/* Progress */
.progress-container {
  display: none;
  margin-top: 2rem;
}

.progress-container.active {
  display: block;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.file-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-glass);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.progress-bar {
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a855f7);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.progress-metrics {
  text-align: center;
  font-size: 0.8rem;
  color: #718096;
  margin-top: 0.25rem;
  font-family: monospace;
}

/* Success state */
.success-container {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid var(--border-glass);
}

.success-container.active {
  display: block;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--success), #34d399);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px var(--success-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.success-icon svg {
  width: 40px;
  height: 40px;
  stroke: white;
  stroke-width: 3;
  fill: none;
}

.success-container h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.success-container p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.share-link {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.share-link input {
  flex: 1;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}

.copy-btn {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px var(--accent-glow);
}

.copy-btn.copied {
  background: var(--success);
}

.new-upload-btn {
  padding: 0.75rem 2rem;
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.new-upload-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 640px) {
  body {
    padding: 1rem;
  }

  .drop-zone {
    padding: 3rem 1.5rem;
  }

  .share-link {
    flex-direction: column;
  }

  .share-link input {
    text-align: center;
  }
}

/* Admin Button */
.admin-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: #ef4444;
  color: white !important;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  z-index: 100;
  border: 1px solid rgba(239, 68, 68, 0.4);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.admin-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #1a1b1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: left;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-content h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: white;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-btn {
  flex: 1;
  padding: 0.85rem;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.modal-btn.primary {
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: white;
}

.modal-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.input-block {
  margin-bottom: 1.5rem;
}

.input-block label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

.input-block select,
.input-block input {
  width: 100%;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-block select:focus,
.input-block input:focus {
  border-color: var(--accent);
}

/* Recent Uploads Section */
.recent-uploads {
  margin-top: 5rem;
  width: 100%;
  max-width: 800px;
  display: none;
}

.recent-uploads.active {
  display: block;
}

.recent-uploads h2 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.recent-uploads h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}

.uploads-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upload-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s ease;
}

.upload-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.item-icon {
  width: 44px;
  height: 44px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.item-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
}

.item-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.75rem;
}

.item-expiry {
  color: #fca5a5;
  font-weight: 500;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  padding: 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.action-btn.copy {
  color: var(--text-secondary);
}

.action-btn.copy:hover {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.action-btn.copy.copied {
  background: #22c55e;
  color: white;
  transform: scale(1.2);
}

.action-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: rgba(31, 32, 35, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast i {
  width: 18px;
  height: 18px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast i svg {
  width: 12px;
  height: 12px;
  stroke: white;
  stroke-width: 3;
}

@keyframes toast-in {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.fade-out {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-out {
  to {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* Stylish Custom Dropdown */
.custom-select {
  position: relative;
  width: 100%;
  cursor: pointer;
}

.select-trigger {
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.select-trigger:hover,
.custom-select.active .select-trigger {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.select-trigger::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-top: -4px;
}

.custom-select.active .select-trigger::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #1f2023;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  overflow: hidden;
  backdrop-filter: blur(15px);
}

.custom-select.active .select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.select-option {
  padding: 0.85rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.select-option:hover {
  background: rgba(139, 92, 246, 0.15);
  color: white;
}

.select-option.selected {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent);
  font-weight: 600;
}
