/* ============================================================
   FileBeam — style.css
   Aesthetic: Dark-space luxury with teal/electric accents.
   Fonts: Syne (display) + DM Sans (body) + DM Mono (code)
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:      #08081a;
  --bg-card:      #0f0f24;
  --bg-input:     #14142e;
  --bg-hover:     #1a1a38;
  --border:       #1e1e40;
  --border-light: #2a2a50;

  --text-primary:   #e8e8f8;
  --text-secondary: #9090b8;
  --text-muted:     #525278;

  --accent-teal:  #00e5c8;
  --accent-blue:  #0095ff;
  --accent-grad:  linear-gradient(135deg, #00e5c8 0%, #0095ff 100%);
  --accent-glow:  0 0 24px rgba(0, 229, 200, 0.18);

  --danger:  #ff4d6d;
  --success: #00e5a0;
  --warning: #f5a623;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-teal); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

/* ── Site Header ──────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 26, 0.85);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.5px;
}

.logo-beam {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.7; }
}

.nav-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-teal);
  border: 1px solid rgba(0, 229, 200, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  letter-spacing: 0.5px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 72px 40px 56px;
  text-align: center;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,200,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,200,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 18px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-headline em {
  font-style: normal;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Upload Container ─────────────────────────────────────── */
main { flex: 1; }

.upload-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── Drop Zone ────────────────────────────────────────────── */
.drop-zone {
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.dragover {
  border-color: var(--accent-teal);
  background: var(--bg-hover);
  box-shadow: var(--accent-glow), inset 0 0 0 1px rgba(0,229,200,0.08);
  outline: none;
}

.drop-zone-inner {
  padding: 52px 32px;
  text-align: center;
  pointer-events: none;
}

.drop-icon {
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 229, 200, 0.06);
  border: 1px solid rgba(0, 229, 200, 0.12);
}

.drop-primary {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.drop-secondary {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-teal);
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-body);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  pointer-events: all;
}

.drop-limits {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ── File Queue ───────────────────────────────────────────── */
.file-queue {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow: hidden;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.queue-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.queue-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-teal);
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.2s ease;
}
.queue-item:last-child { border-bottom: none; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.queue-file-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.queue-file-info { flex: 1; min-width: 0; }

.queue-file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.queue-file-size {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.queue-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.queue-remove:hover { color: var(--danger); background: rgba(255, 77, 109, 0.1); }

.queue-total {
  padding: 12px 20px;
  background: var(--bg-input);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* ── Transfer Form ────────────────────────────────────────── */
.transfer-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.form-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.form-row .form-group { flex: 1; min-width: 0; }

.form-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
}

.form-group { margin-bottom: 20px; }
.form-group:last-of-type { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.label-optional {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(0, 229, 200, 0.1);
}

.form-input.error { border-color: var(--danger); }

.form-textarea { resize: vertical; min-height: 90px; }

/* ── Progress Bar ─────────────────────────────────────────── */
.upload-progress { margin: 24px 0; }

.progress-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-grad);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Alerts ───────────────────────────────────────────────── */
.form-alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
  margin: 20px 0;
}

.form-alert--error {
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid rgba(255, 77, 109, 0.3);
  color: #ff8fa3;
}

.form-alert--success {
  background: rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(0, 229, 160, 0.3);
  color: #00e5a0;
}

/* ── Send Button ──────────────────────────────────────────── */
.btn-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 32px;
  margin-top: 24px;
  background: var(--accent-grad);
  border: none;
  border-radius: var(--radius-md);
  color: #060614;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.btn-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 229, 200, 0.3);
}

.btn-send:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn-send.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ── Features ─────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0 0;
}

.feature {
  background: var(--bg-deep);
  padding: 36px 32px;
  transition: background var(--transition);
}

.feature:hover { background: var(--bg-card); }

.feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Site Footer ──────────────────────────────────────────── */
.site-footer {
  padding: 24px 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Download Page ────────────────────────────────────────── */
.download-page body,
body.download-page { /* applied on download.php */ }

.download-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
}

.download-card {
  width: 100%;
  max-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.download-hero {
  padding: 40px 36px 28px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0,229,200,0.04) 0%, transparent 100%);
}

.transfer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 229, 200, 0.06);
  border: 1px solid rgba(0, 229, 200, 0.15);
  margin-bottom: 18px;
}

.download-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.download-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

.sender-tag {
  color: var(--accent-teal);
  font-weight: 500;
}

.transfer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 36px;
  border-bottom: 1px solid var(--border);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.transfer-message {
  padding: 18px 36px;
  border-bottom: 1px solid var(--border);
}

.transfer-message p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  font-style: italic;
  padding-left: 14px;
  border-left: 2px solid var(--accent-teal);
}

.file-list { padding: 8px 0; }

.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 36px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--bg-hover); }

.file-icon { font-size: 24px; flex-shrink: 0; width: 32px; text-align: center; }

.file-info { flex: 1; min-width: 0; }

.file-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.btn-download-single {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--accent-teal);
  flex-shrink: 0;
  transition: background var(--transition), box-shadow var(--transition);
}

.btn-download-single:hover {
  background: rgba(0, 229, 200, 0.1);
  box-shadow: 0 0 12px rgba(0, 229, 200, 0.15);
}

.download-all-hint {
  padding: 16px 36px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  text-align: center;
}

.download-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 36px;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ── Error page ───────────────────────────────────────────── */
.error-container {
  max-width: 480px;
  margin: 80px auto;
  text-align: center;
  padding: 0 24px;
}

.error-code {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.error-message {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 32px;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent-grad);
  border-radius: var(--radius-md);
  color: #060614;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 229, 200, 0.25);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-header { padding: 16px 20px; }
  .hero { padding: 48px 20px 36px; }
  .hero-headline { font-size: 36px; letter-spacing: -1px; }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .form-arrow { display: none; }
  .form-row .form-group { margin-bottom: 20px; }

  .transfer-form { padding: 20px; }
  .download-hero { padding: 28px 24px 20px; }
  .transfer-meta, .file-item, .transfer-message,
  .download-footer, .download-all-hint { padding-left: 24px; padding-right: 24px; }

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

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