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

:root {
  --bg: #030303;
  --surface: #0a0a0c;
  --surface2: #121216;
  --border: #1f1f23;
  --accent: #0066ff;
  --accent-hover: #0052cc;
  --text: #ffffff;
  --text-muted: #94a3b8;
  --success: #10b981;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.landing {
  margin-bottom: 32px;
}

.landing-content {
  text-align: center;
  padding: 40px 20px;
}

.landing h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: #fff;
}

.landing p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

.landing-features {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.feature-icon {
  margin-bottom: 4px;
  color: var(--accent);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 480px;
}

.header {
  text-align: center;
  margin-bottom: 48px;
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header p {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow);
}

/* drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(0, 102, 255, 0.03);
}

.drop-icon {
  font-size: 3rem;
  line-height: 1;
  color: var(--text-muted);
}

.drop-label {
  font-size: 1rem;
  font-weight: 500;
}

.drop-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.drop-limit {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* file preview */
.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.file-icon {
  font-size: 1.8rem;
}

.file-meta {
  flex: 1;
  overflow: hidden;
}

.file-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.btn-icon:hover {
  color: var(--text);
}

/* options */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.option-toggle {
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
}

.option-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

select:focus {
  border-color: var(--accent);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-full {
  width: 100%;
}

/* progress */
.progress-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.2s;
}

/* result */
.result {
  text-align: center;
  gap: 16px;
}

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

.result-label {
  font-size: 1.05rem;
  font-weight: 600;
}

.link-box {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.link-box span {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.85rem;
  word-break: break-all;
  text-align: left;
  color: var(--accent);
  font-family: monospace;
}

.btn-copy {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-copy:hover {
  background: var(--accent-hover);
}

.btn-copy:active {
  transform: scale(0.98);
}

.btn-copy.copied {
  background: var(--success);
}

.result-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* qr code */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.qr-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 500;
}

.qr-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.qr-wrap canvas {
  display: block;
  border-radius: 4px;
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
}

.btn-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-danger.deleted {
  background: rgba(100, 100, 100, 0.1);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: default;
}

/* ── mobile ── */
@media (max-width: 560px) {
  body {
    padding: 0;
    align-items: flex-start;
    min-height: 100vh;
  }

  .container {
    max-width: 100%;
    padding: 20px 16px 40px;
  }

  .header {
    margin-bottom: 24px;
  }

  .header h1 {
    font-size: 1.6rem;
  }

  .card {
    padding: 20px 16px;
    border-radius: 10px;
    gap: 16px;
  }

  .drop-zone {
    padding: 32px 16px;
  }

  .link-box {
    flex-direction: column;
    border-radius: 8px;
  }

  .link-box span {
    padding: 12px 14px;
    border-radius: 8px 8px 0 0;
    font-size: 0.8rem;
  }

  .btn-copy {
    padding: 11px;
    border-radius: 0 0 8px 8px;
    text-align: center;
  }

  .qr-wrap {
    padding: 10px;
  }

  #qr-canvas canvas,
  #qr-canvas img {
    width: 160px !important;
    height: 160px !important;
  }

  .result-actions {
    gap: 8px;
  }

  .btn {
    padding: 12px 16px;
    font-size: 0.88rem;
  }
}

.hidden {
  display: none !important;
}

/* ── auth & dashboard ── */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  /* Slightly darker backdrop */
  display: flex !important;
  /* Ensure it's always flex */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(8px);
  /* Add glass/blur effect for premium feel */
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-content {
  width: 100%;
  max-width: 380px;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Bounce effect */
  transform: scale(1);
}

.modal.hidden .modal-content {
  transform: scale(0.95);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-content .card {
  gap: 24px;
  padding: 40px;
}

.auth-toggle {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
}

.auth-toggle a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group input {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px;
  border-radius: 4px;
  font-size: 0.95rem;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}

.dashboard-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.upload-limit {
  font-size: 0.8rem;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 500;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.file-item:hover {
  border-color: var(--border);
}

.file-item-info {
  flex: 1;
  overflow: hidden;
}

.file-item-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-item-actions {
  display: flex;
  gap: 8px;
}

.empty-msg {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 32px 0;
}@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .spin { animation: spin 1s linear infinite; } #dashboard-card { margin-bottom: 32px; } #upload-card { margin-bottom: 32px; } .user-name { font-weight: 500; color: var(--text-muted); margin-right: 12px; }
