:root {
  --bg: #07111f;
  --bg-soft: #0c1a2e;
  --card: rgba(11, 20, 35, 0.72);
  --card-border: rgba(145, 180, 255, 0.14);
  --text: #edf4ff;
  --muted: #95a8c7;
  --primary: #6c8cff;
  --primary-strong: #88b7ff;
  --danger: #ff5d73;
  --success: #34d399;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(108, 140, 255, 0.2), transparent 34%),
    radial-gradient(circle at top right, rgba(52, 211, 153, 0.12), transparent 30%),
    linear-gradient(180deg, #06101d 0%, #08111f 100%);
  color: var(--text);
}

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

button,
input {
  font: inherit;
}

.auth-page,
.dashboard-page {
  position: relative;
  overflow-x: hidden;
}

.glass-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(100%, 460px);
  border-radius: 28px;
  padding: 36px;
  position: relative;
  z-index: 1;
}

.brand-badge {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #9b7dff);
  color: white;
  box-shadow: 0 14px 34px rgba(108, 140, 255, 0.38);
}

.eyebrow {
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  color: var(--muted);
}

.auth-card h1,
.hero-copy h2,
.section-head h2 {
  margin: 0;
  line-height: 1.05;
}

.auth-card h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.lead,
.hero-copy p,
.file-meta,
.dropzone-text,
.empty-state p,
.upload-status,
.section-chip,
.stat-card span,
.link-label {
  color: var(--muted);
}

.lead {
  margin: 14px 0 24px;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

.field span {
  color: #c8d6f0;
}

.input,
.link-input {
  width: 100%;
  border: 1px solid rgba(154, 184, 255, 0.16);
  border-radius: 16px;
  background: rgba(6, 12, 24, 0.66);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input:focus,
.link-input:focus {
  border-color: rgba(108, 140, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(108, 140, 255, 0.16);
}

.btn {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8a6cff);
  color: #fff;
  box-shadow: 0 16px 30px rgba(108, 140, 255, 0.24);
}

.btn-secondary {
  background: rgba(108, 140, 255, 0.14);
  color: #dce7ff;
  border: 1px solid rgba(108, 140, 255, 0.18);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #e8efff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-danger {
  background: rgba(255, 93, 115, 0.14);
  color: #ffd7dd;
  border: 1px solid rgba(255, 93, 115, 0.18);
}

.btn-small {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
}

.alert {
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 18px;
  border: 1px solid transparent;
}

.alert-error {
  background: rgba(255, 93, 115, 0.12);
  border-color: rgba(255, 93, 115, 0.22);
  color: #ffd7dd;
}

.alert-success {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.22);
  color: #d4fff0;
}

.auth-aurora,
.dashboard-aurora {
  position: fixed;
  border-radius: 50%;
  filter: blur(30px);
  pointer-events: none;
  opacity: 0.75;
}

.auth-aurora-one,
.dashboard-aurora-one {
  width: 360px;
  height: 360px;
  background: rgba(108, 140, 255, 0.22);
  top: -120px;
  right: -90px;
}

.auth-aurora-two,
.dashboard-aurora-two {
  width: 280px;
  height: 280px;
  background: rgba(52, 211, 153, 0.12);
  bottom: -100px;
  left: -70px;
}

.topbar {
  margin: 24px auto 0;
  width: min(1400px, calc(100% - 32px));
  border-radius: 28px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 16px;
  z-index: 10;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-wrap h1 {
  margin: 0;
  font-size: 1.2rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-pill,
.section-chip,
.stat-card,
.file-tag {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.user-pill {
  border-radius: 999px;
  padding: 10px 14px;
  color: #d9e4ff;
}

.dashboard-grid {
  width: min(1400px, calc(100% - 32px));
  margin: 24px auto 40px;
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
}

.hero-panel,
.upload-panel,
.files-panel {
  border-radius: 28px;
  padding: 24px;
}

.hero-panel {
  display: grid;
  gap: 20px;
}

.hero-copy h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.hero-copy p {
  line-height: 1.7;
  margin: 14px 0 0;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  border-radius: 22px;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.stat-card strong {
  font-size: 1.5rem;
}

.panel {
  display: grid;
  gap: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-chip {
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.dropzone {
  width: 100%;
  min-height: 240px;
  border-radius: 26px;
  border: 1px dashed rgba(136, 183, 255, 0.5);
  background: linear-gradient(180deg, rgba(108, 140, 255, 0.08), rgba(6, 12, 24, 0.42));
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--text);
  padding: 24px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone.hover {
  transform: translateY(-2px);
  border-color: rgba(136, 183, 255, 0.9);
  background: linear-gradient(180deg, rgba(108, 140, 255, 0.12), rgba(6, 12, 24, 0.52));
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #8b6dff);
  font-size: 1.4rem;
  box-shadow: 0 16px 30px rgba(108, 140, 255, 0.25);
}

.dropzone-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.upload-footer {
  display: grid;
  gap: 10px;
}

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

#bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #34d399);
  transition: width 0.14s ease;
}

.file-grid {
  display: grid;
  gap: 14px;
}

.file-card {
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  gap: 16px;
}

.file-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.file-card h3 {
  margin: 10px 0 8px;
  font-size: 1.05rem;
  word-break: break-word;
}

.file-meta {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.file-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.file-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.delete-form {
  margin: 0;
}

.preview-link {
  display: block;
}

.preview {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.link-label {
  font-size: 0.9rem;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.link-input {
  padding: 13px 14px;
}

.empty-state {
  padding: 36px 22px;
  text-align: center;
  border-radius: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.empty-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 14px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: rgba(108, 140, 255, 0.14);
  color: var(--primary-strong);
  font-size: 1.8rem;
}

.empty-state h3 {
  margin: 0;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 18px;
  }

  .auth-card,
  .hero-panel,
  .upload-panel,
  .files-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .topbar {
    width: calc(100% - 18px);
    padding: 16px;
    border-radius: 22px;
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .file-card-top,
  .link-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .file-actions {
    justify-content: flex-start;
  }
}
