:root {
  --bg-main: #050713;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.2);
  --text-main: #f5f7ff;
  --text-muted: #a3adc7;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --transition-fast: 0.2s ease-out;
}
html, body { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1b2340 0, #050713 45%, #02030a 100%);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.lang-switch {
  position: fixed;
  top: 14px;
  right: 60px; /* leave room for settings button */
  z-index: 10001;
}
.qr-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 60px 24px 40px;
  text-align: center;
}

.qr-name {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px;
}

.qr-role {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 32px;
}

.qr-code {
  width: 280px;
  height: 280px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 255, 0.35);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(79, 140, 255, 0.15),
    0 0 40px rgba(79, 140, 255, 0.2),
    0 0 80px rgba(79, 140, 255, 0.08);
}

.qr-code img {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 36px;
}

.qr-contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 32px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
}

.qr-contacts-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 4px;
  width: 100%;
  text-align: center;
}

.qr-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  width: 100%;
}

a.qr-contact-item:hover { color: var(--accent); }

.qr-contact-icon {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.qr-contact-label {
  color: var(--text-main);
  font-weight: 500;
  min-width: 80px;
}

.qr-contact-value {
  color: var(--text-muted);
  word-break: break-all;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.qr-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

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

.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(5, 7, 19, 0.97);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  padding: 18px 24px;
  z-index: 10000;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  border-top: 1px solid var(--border-subtle);
}
.cookie-content {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.cookie-content p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.cookie-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cookie-content a:hover { color: var(--text-main); }
.cookie-actions { display: inline-flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: border-color 0.2s ease-out, color 0.2s ease-out, transform 0.2s ease-out;
}
.cookie-btn:hover { background: #3a75e0; transform: translateY(-1px); }
.cookie-btn.secondary {
  background: rgba(148, 163, 184, 0.18);
  color: #e8eef8;
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.cookie-btn.secondary:hover { background: rgba(148, 163, 184, 0.24); transform: translateY(-1px); }

@media (max-width: 480px) {
  .qr-page { padding: 40px 16px 32px; }
  .qr-code { width: 240px; height: 240px; }
  .qr-contacts { padding: 18px; }
  .qr-contact-label { min-width: 70px; }
  .cookie-content { flex-direction: column; text-align: center; gap: 14px; }
  .cookie-actions { width: 100%; flex-direction: column; }
  .cookie-btn { width: 100%; }
}

/* ===== Light theme ===== */
html[data-theme="light"] {
  --bg-main: #f0f3fb;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.16);
  --text-main: #0b1220;
  --text-muted: #3e4c63;
  --border-subtle: rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] body {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08) 0, #f0f3fb 44%, #e6ebf7 100%);
  color: var(--text-main);
}
html[data-theme="light"] .qr-contacts {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 20px rgba(2, 6, 23, 0.07);
}
html[data-theme="light"] .qr-code {
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 8px 28px rgba(2, 6, 23, 0.10), 0 0 0 1px rgba(37, 99, 235, 0.10);
}
html[data-theme="light"] .qr-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 2px 8px rgba(2, 6, 23, 0.05);
}
html[data-theme="light"] .qr-btn:hover {
  border-color: rgba(37, 99, 235, 0.28);
}
html[data-theme="light"] .cookie-banner {
  background: rgba(240, 243, 251, 0.96);
  border-top-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 -8px 24px rgba(2, 6, 23, 0.08);
}
html[data-theme="light"] .cookie-content p { color: #334155; }
html[data-theme="light"] .cookie-btn.secondary {
  background: #ffffff;
  color: #1e293b;
  border-color: rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] .cookie-btn.secondary:hover {
  background: #f8faff;
  border-color: rgba(37, 99, 235, 0.20);
}
