:root {
  color-scheme: dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #050506;
  color: #e6e6ff;
  --bg: #050506;
  --surface: rgba(16, 18, 29, 0.82);
  --surface-strong: rgba(22, 26, 41, 0.96);
  --border: rgba(120, 86, 255, 0.22);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text-muted: #93a1c3;
  --accent: #8c6bff;
  --accent-alt: #2fe7ff;
  --shadow: 0 28px 100px rgba(0, 0, 0, 0.2);
  --radius: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background: radial-gradient(circle at top left, rgba(111, 77, 255, 0.18), transparent 28%), radial-gradient(circle at bottom right, rgba(31, 231, 255, 0.14), transparent 24%), #050506;
  color: #f1f3ff;
}

body {
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

button, input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.hero-panel {
  display: grid;
  gap: 28px;
  padding: 30px 34px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  background: rgba(10, 12, 22, 0.7);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  color: #7c79ff;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero-panel h1 {
  max-width: 780px;
  font-size: clamp(2.6rem, 4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 680px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cdd4ff;
  font-size: 0.96rem;
}

.upload-shell {
  margin-top: 36px;
  display: grid;
  gap: 18px;
}

.dropzone {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 18, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow);
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(140, 107, 255, 0.12), rgba(47, 231, 255, 0.08));
  opacity: 0.9;
}

.dropzone input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.dropzone-body {
  position: relative;
  z-index: 1;
  min-height: 360px;
  display: grid;
  place-items: center;
  gap: 18px;
  text-align: center;
  padding: 52px 24px;
}

.dropzone-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(111, 77, 255, 0.24), transparent 24%), radial-gradient(circle at center, rgba(47, 231, 255, 0.16), transparent 32%);
  filter: blur(30px);
  opacity: 0.65;
}

.drop-icon {
  display: inline-flex;
  width: 84px;
  height: 84px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 2.4rem;
  color: #d3d3ff;
}

.dropzone-body strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.dropzone-body p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-muted);
}

.drop-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.94rem;
}

.dropzone.drag-active {
  border-color: rgba(140, 107, 255, 0.9);
}

.dropzone.drag-active .dropzone-glow {
  opacity: 1;
  transform: scale(1.02);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slider {
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  transition: background 0.24s ease;
}

.slider::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f7f8ff;
  box-shadow: 0 12px 30px rgba(46, 37, 255, 0.18);
  transition: transform 0.24s ease;
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, rgba(140, 107, 255, 0.92), rgba(47, 231, 255, 0.82));
}

.switch input:checked + .slider::after {
  transform: translateX(24px);
}

.switch-text {
  color: #c8ccf5;
  font-size: 0.98rem;
}

.progress-shell {
  width: 100%;
  min-width: 260px;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8c6bff, #2fe7ff);
  transition: width 0.28s ease;
}

.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  border-radius: 30px;
  background: rgba(14, 16, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.status-copy {
  display: grid;
  gap: 8px;
}

.status-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.share-link {
  color: #b2b6ff;
  font-size: 0.98rem;
  word-break: break-all;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e6e6ff;
  padding: 14px 22px;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.ghost-button:hover {
  transform: translateY(-1px);
  border-color: rgba(140, 107, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.hidden {
  display: none !important;
}

.admin-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(140, 107, 255, 0.3);
  color: #d3d3ff;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-btn:hover {
  background: rgba(140, 107, 255, 0.15);
  border-color: rgba(140, 107, 255, 0.6);
  transform: scale(1.05);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: linear-gradient(135deg, rgba(16, 18, 29, 0.98), rgba(22, 26, 41, 0.96));
  border: 1px solid rgba(140, 107, 255, 0.25);
  border-radius: 24px;
  padding: 32px 28px;
  width: min(420px, calc(100% - 32px));
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.4);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: #f1f3ff;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #e6e6ff;
  font-size: 1rem;
  margin-bottom: 20px;
  transition: border-color 0.22s ease, background 0.22s ease;
}

.modal-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(140, 107, 255, 0.5);
}

.modal-buttons {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.22s ease;
}

.modal-btn-primary {
  background: linear-gradient(135deg, #8c6bff, #2fe7ff);
  color: #050506;
}

.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(140, 107, 255, 0.3);
}

.modal-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #d3d3ff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* QR styles removed */

.admin-shell {
  padding: 30px 0 60px;
}

.admin-header {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 30px 34px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  background: rgba(10, 12, 22, 0.7);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.admin-back-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #d3d3ff;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
}

.admin-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(140, 107, 255, 0.4);
}

.admin-main {
  width: 100%;
}

.admin-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.refresh-btn {
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(140, 107, 255, 0.2), rgba(47, 231, 255, 0.15));
  border: 1px solid rgba(140, 107, 255, 0.3);
  border-radius: 12px;
  color: #d3d3ff;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.22s ease;
}

.refresh-btn:hover {
  background: linear-gradient(135deg, rgba(140, 107, 255, 0.3), rgba(47, 231, 255, 0.25));
  border-color: rgba(140, 107, 255, 0.5);
  transform: translateY(-1px);
}

.file-count {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.admin-table-wrapper {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 16, 28, 0.88);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  color: #f1f3ff;
}

.admin-table thead {
  background: rgba(22, 26, 41, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  color: #d3d3ff;
}

.admin-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.22s ease;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-table td {
  padding: 14px 16px;
  font-size: 0.95rem;
  color: #c8ccf5;
}

.file-name {
  color: #b2b6ff;
  font-weight: 500;
  word-break: break-word;
  max-width: 300px;
}

.actions {
  display: flex;
  gap: 8px;
}

.download-btn,
.delete-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #d3d3ff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.22s ease;
}

.download-btn:hover {
  background: rgba(47, 231, 255, 0.15);
  border-color: rgba(47, 231, 255, 0.4);
}

.delete-btn:hover {
  background: rgba(255, 77, 77, 0.16);
  border-color: rgba(255, 77, 77, 0.4);
}

.empty-state td {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 16px;
  font-style: italic;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
    padding: 30px 0 60px;
  }

  .hero-panel {
    padding: 28px;
  }

  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dropzone-body {
    min-height: 320px;
    padding: 42px 18px;
  }
}

@media (max-width: 620px) {
  .hero-panel h1 {
    font-size: 2.4rem;
  }

  .hero-copy {
    font-size: 0.98rem;
  }

  .dropzone-body {
    padding: 34px 16px;
  }

  .drop-icon {
    width: 68px;
    height: 68px;
    font-size: 2rem;
  }

  .status-card {
    flex-direction: column;
    align-items: stretch;
  }
}
