:root {
  --bg: #0b1020;
  --card: rgba(20, 28, 52, 0.88);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #eef2ff;
  --muted: #9aa7cc;
  --accent: #6366f1;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.28;
  animation: floatOrb 14s ease-in-out infinite alternate;
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: #6366f1;
  top: -80px;
  left: -60px;
}

.orb-2 {
  width: 340px;
  height: 340px;
  background: #06b6d4;
  bottom: -80px;
  right: -60px;
  animation-delay: -6s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(35px, 25px) scale(1.1); }
}

.navbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.78);
  border-bottom: 1px solid var(--card-border);
  z-index: 20;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.inline-form {
  display: inline;
}

.container {
  max-width: 780px;
  margin: 36px auto;
  padding: 0 20px 60px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.5;
}

.anim-enter {
  animation: fadeSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qr-pop {
  animation: qrPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes qrPopIn {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

input[type="text"],
input[type="url"],
input[type="password"],
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 15, 30, 0.75);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.dropzone input[type="file"] {
  display: none;
}

.preview-box {
  margin-top: 14px;
  display: none;
  text-align: center;
}

.preview-box.visible {
  display: block;
  animation: fadeSlideUp 0.3s ease both;
}

.preview-box img,
.preview-box video {
  max-width: 100%;
  max-height: 240px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.9rem;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin 0.7s linear infinite;
}

.loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.qr-result {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  text-align: center;
}

.qr-frame {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.qr-frame img {
  display: block;
  width: 220px;
  height: 220px;
}

.actions-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.url-pill {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  word-break: break-all;
}

.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  animation: fadeSlideUp 0.3s ease both;
}

.flash-success { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.45); }
.flash-error { background: rgba(239, 68, 68, 0.18); border: 1px solid rgba(239, 68, 68, 0.45); }
.flash-info { background: rgba(56, 189, 248, 0.18); border: 1px solid rgba(56, 189, 248, 0.45); }

.flash-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}


.site-footer {
  border-top: 1px solid var(--card-border);
  background: rgba(11, 16, 32, 0.72);
  backdrop-filter: blur(12px);
  margin-top: auto;
}

body {
  display: flex;
  flex-direction: column;
}

main.container {
  flex: 1 0 auto;
  width: 100%;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-sep {
  margin: 0 6px;
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}
