/* Airdroppy – Mobile First, sichere Datei-Übertragung */

:root {
  --bg: #0c1222;
  --bg-card: #141c2e;
  --border: rgba(255,255,255,0.08);
  --text: #e8eaed;
  --muted: #8b92a0;
  --accent: #0f766e;
  --accent-light: #14b8a6;
  --accent-dim: rgba(15,118,110,0.25);
  --error: #dc2626;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Syne', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
header a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
header a:hover { color: var(--accent-light); }
h1 { font-size: 1.35rem; font-weight: 700; }

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Kacheln Startseite */
.tiles {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.tile:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.tile-primary {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.tile-primary:hover {
  background: rgba(15,118,110,0.35);
}
.tile-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.tile-label { font-weight: 600; margin-bottom: 0.25rem; }
.tile-desc { font-size: 0.85rem; color: var(--muted); }

.info {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Karten & Formulare */
.panel { display: none; }
.panel.on { display: block; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.file-input {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
}
.file-input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, opacity 0.2s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-light);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 1rem;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}
.btn-delete {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  margin-top: 0.5rem;
}
.btn-delete:hover:not(:disabled) {
  border-color: var(--error);
  color: var(--error);
}

.error { color: var(--error); font-size: 0.9rem; margin-top: 0.5rem; }

/* Ladekreis (Spinner) */
.spinner-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 1rem;
}
.spinner-wrap.on {
  display: flex;
}
.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: airdroppy-spin 0.8s linear infinite;
}
.spinner-text {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
@keyframes airdroppy-spin {
  to { transform: rotate(360deg); }
}

.qrcode-container {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.qrcode-container canvas,
.qrcode-container img { max-width: 100%; height: auto; }

.meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.filename {
  word-break: break-all;
  margin: 0.5rem 0 1rem;
  font-weight: 500;
}
.link-back {
  display: inline-block;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.link-back:hover { color: var(--accent-light); }
