* {
  box-sizing: border-box;
}

:root {
  --bg: #040b22;
  --bg2: #08122f;
  --card: rgba(15, 23, 52, 0.88);
  --card-border: rgba(111, 96, 255, 0.16);
  --text: #f5f7ff;
  --muted: #9ea9d1;
  --accent1: #a855f7;
  --accent2: #4f8cff;
  --success-bg: rgba(8, 52, 56, 0.62);
  --success-border: rgba(43, 199, 170, 0.22);
  --danger: #ff708f;
  --dark-input: rgba(8, 14, 37, 0.88);
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 50% 0%, rgba(130, 84, 255, 0.15), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(79, 140, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #020817 0%, #040b22 35%, #020716 100%);
}

.page-glow {
  position: fixed;
  z-index: -2;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.45;
}

.glow-1 {
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 220px;
  background: rgba(130, 84, 255, 0.28);
}

.glow-2 {
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 180px;
  background: rgba(50, 105, 255, 0.12);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(2, 8, 23, 0.72);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-link {
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(116, 82, 255, 0.28);
  flex: 0 0 auto;
}

.brand-word {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.topnav {
  color: var(--muted);
  font-size: 15px;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 46px 20px 80px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.hero-logo-img {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 18px 60px rgba(116, 82, 255, 0.28));
}

.hero-title {
  margin: 0;
  font-size: 76px;
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-title-white {
  color: #ffffff;
}

.hero-title-gradient {
  background: linear-gradient(90deg, #9d5cff 0%, #7e67ff 40%, #4f8cff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 22px;
}

.hero-badges {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #edf1ff;
  font-size: 14px;
  font-weight: 700;
}

.upload-card,
.result-card,
.admin-table-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 28px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.upload-card {
  margin-top: 18px;
}

.dropzone {
  display: block;
  width: 100%;
  text-align: center;
  padding: 42px 20px 34px;
  border-radius: 24px;
  border: 2px dashed rgba(151, 100, 255, 0.7);
  background: rgba(22, 30, 70, 0.72);
  cursor: pointer;
  transition: 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
  background: rgba(28, 39, 86, 0.86);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.22);
}

.dropzone-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  color: #9c5cff;
}

.dropzone-icon svg {
  width: 100%;
  height: 100%;
}

.dropzone-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.dropzone-title span {
  color: #9c5cff;
}

.dropzone-subtitle {
  font-size: 18px;
  color: #bcc6ea;
  margin-bottom: 18px;
}

.dropzone-meta {
  font-size: 15px;
  color: #93a1d1;
}

.dropzone-meta b {
  color: #bfa5ff;
  font-weight: 700;
}

.selected-file {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(9, 16, 40, 0.9);
  border: 1px solid rgba(255,255,255,0.05);
}

.selected-file-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(168,85,247,0.18), rgba(79,140,255,0.18));
  font-size: 20px;
}

.selected-file-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  word-break: break-word;
}

.selected-file-size {
  color: #98a5d3;
  font-size: 14px;
  margin-top: 4px;
}

.primary-btn,
.secondary-btn,
.mini-btn {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  width: 100%;
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: 18px;
  color: #ffffff;
  font-size: 20px;
  background: linear-gradient(90deg, #9c5cff 0%, #7b63ff 42%, #4f8cff 100%);
  box-shadow: 0 18px 44px rgba(107, 94, 255, 0.34);
}

.primary-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-radius: 16px;
  color: #e8edff;
  font-size: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}

.secondary-btn:hover {
  background: rgba(255,255,255,0.12);
}

.status {
  margin-top: 18px;
  color: #d9def8;
  font-size: 15px;
}

.progress-wrap {
  margin-top: 18px;
}

.progress-bar {
  width: 100%;
  height: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a855f7, #4f8cff);
}

.progress-text {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.result-card {
  margin-top: 18px;
  background: var(--success-bg);
  border-color: var(--success-border);
}

.result-title {
  font-size: 24px;
  font-weight: 800;
  color: #4ef0bc;
}

.result-subtitle {
  margin-top: 6px;
  color: #bfeee0;
  font-size: 15px;
}

.result-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.result-item label {
  display: block;
  margin-bottom: 8px;
  color: #dbf6ee;
  font-size: 14px;
  font-weight: 700;
}

.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.input-row input,
.admin-filters input,
.admin-filters select {
  flex: 1;
  min-width: 240px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 255, 0.15);
  background: var(--dark-input);
  color: #f3f6ff;
  outline: none;
}

.mini-btn {
  padding: 14px 16px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #6e59ff, #4f8cff);
}

.danger-btn {
  background: linear-gradient(135deg, #ff5d7a, #ff7a59);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.link-btn {
  width: auto;
  min-width: 220px;
  text-align: center;
}

.file-meta-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-box {
  padding: 18px;
  border-radius: 18px;
  background: rgba(9, 16, 40, 0.72);
  border: 1px solid rgba(255,255,255,0.06);
}

.meta-box.full {
  grid-column: 1 / -1;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.meta-value {
  display: block;
  color: white;
  font-size: 17px;
  font-weight: 700;
  word-break: break-word;
}

.admin-container {
  max-width: 1400px;
}

.admin-title {
  margin: 0 0 20px;
  font-size: 34px;
  font-weight: 800;
}

.admin-filters {
  display: grid;
  grid-template-columns: 220px 1fr 140px 180px;
  gap: 12px;
  align-items: center;
}

.admin-btn {
  margin-top: 0;
  width: 100%;
}

.admin-table-card {
  margin-top: 18px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: top;
  text-align: left;
  font-size: 14px;
}

.admin-table th {
  color: #b9c3ea;
  font-weight: 700;
}

.admin-table td {
  color: #eef2ff;
}

.break-cell {
  word-break: break-word;
  max-width: 280px;
}

.log-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.log-badge.upload {
  background: rgba(39, 193, 158, 0.18);
  color: #80f0cc;
  border: 1px solid rgba(39, 193, 158, 0.25);
}

.log-badge.download {
  background: rgba(79, 140, 255, 0.18);
  color: #9fc4ff;
  border: 1px solid rgba(79, 140, 255, 0.25);
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .topbar-inner {
    padding: 16px 18px;
  }

  .container {
    padding: 28px 14px 56px;
  }

  .hero-logo-img {
    width: 110px;
    height: 110px;
  }

  .hero-title {
    font-size: 52px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .dropzone {
    padding: 34px 16px 28px;
  }

  .dropzone-title {
    font-size: 22px;
  }

  .file-meta-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .link-btn,
  .secondary-btn {
    width: 100%;
  }

  .admin-filters {
    grid-template-columns: 1fr;
  }
}