:root {
  --primary: #5bbcff;
  --primary-soft: rgba(91, 188, 255, 0.25);
  --bg: #0a0f18;
  --card: rgba(18, 26, 45, 0.75);
  --border: rgba(91, 188, 255, 0.15);
  --text: #f1f6ff;
  --muted: #9fb0c8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #122044, transparent 60%),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* MAIN CARD */
.app {
  width: 100%;
  max-width: 440px;
  padding: 2.2rem;
  background: var(--card);
  backdrop-filter: blur(16px);
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow:
    0 30px 80px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.03);
  animation: fadeUp .6s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* HEADER */
h1 {
  margin: 0;
  text-align: center;
  font-size: 2.1rem;
  letter-spacing: 1px;
}

h1 span {
  color: var(--primary);
}

p {
  margin: .4rem 0 1.6rem;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
}

/* FILE UPLOAD */
.file-box {
  border: 1.5px dashed var(--border);
  border-radius: 22px;
  padding: 1.8rem 1.2rem;
  text-align: center;
  background: rgba(6, 11, 22, 0.6);
  transition: .25s ease;
}

.file-box:hover {
  border-color: var(--primary);
  box-shadow: 0 0 35px var(--primary-soft);
}

.file-box span {
  font-weight: 600;
  font-size: 1.05rem;
}

.file-box small {
  display: block;
  margin-top: .3rem;
  color: var(--muted);
  font-size: .8rem;
}

/* BUTTON */
.normalbtn {
  width: 100%;
  margin-top: 1.2rem;
  padding: 15px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6ec6ff, #3b8dff);
  color: #021321;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: .25s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px var(--primary-soft);
}

button:active {
  transform: scale(.97);
}

/* LINK BOX */
#linkBox {
  margin-top: 1.2rem;
}

input[readonly] {
  width: 100%;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(6, 11, 22, 0.6);
  color: var(--text);
  outline: none;
  font-size: .85rem;
}

/* STATUS */
#status {
  margin-top: 1.2rem;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  font-size: .95rem;
}

/* PROGRESS */
progress {
  width: 100%;
  height: 10px;
  margin-top: 1rem;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
}

progress::-webkit-progress-bar {
  background: rgba(6, 11, 22, 0.6);
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, #6ec6ff, #3b8dff);
}

/* WAITING TEXT */
.waiting {
  text-align: center;
  color: var(--primary);
  font-weight: 600;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0% { opacity: .4; }
  50% { opacity: 1; }
  100% { opacity: .4; }
}

/* MOBILE */
@media (max-width: 480px) {
  .app {
    padding: 1.6rem;
    border-radius: 22px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .footer {
    bottom: 20px;
    font-size: .7rem;
  }

  .copy-bar input {
    font-size: .75rem;
  }

  .copy-bar button {
    padding: 0 18px;
  }

  .brand img {
    width: 56px;
    height: 56px;
  }

  .side-ad {
    display: none;
  }
}

/* PARTICLE GLOW BACKGROUND */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 30%, rgba(91,188,255,.12), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(91,188,255,.08), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(91,188,255,.1), transparent 40%);
  animation: floatParticles 18s linear infinite;
}

body::after {
  animation-duration: 28s;
  filter: blur(40px);
}

@keyframes floatParticles {
  0% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-40px) translateX(30px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

.copy-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(8, 14, 28, 0.6);
  border: 1px solid rgba(255,255,255,.08);
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* INPUT – KLÍČOVÁ ČÁST */
.copy-bar input {
  flex: 1;              /* ← TOHLE JE NEJDŮLEŽITĚJŠÍ */
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.05);
  color: #cfe8ff;
  font-size: .85rem;
  outline: none;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* BUTTON */
.copy-bar button {
  flex-shrink: 0;
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6ec6ff, #3b8dff);
  color: #031626;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* CHECKMARK */
.copy-bar .copy-check {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.6);
  transition: .25s ease;
}

.copy-bar button.copied .copy-text {
  opacity: 0;
}

.copy-bar button.copied .copy-check {
  opacity: 1;
  transform: scale(1);
}

.modal.hidden { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: 90%;
  max-width: 420px;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
  padding: 24px;
  border-radius: 20px;
  background: radial-gradient(
    circle at top,
    rgba(100,180,255,.18),
    rgba(8,14,28,.95)
  );
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 0 60px rgba(80,160,255,.25);
  text-align: center;
}

.modal-card h2 {
  margin-bottom: 16px;
  color: #cfe8ff;
}

#qrCanvas {
  margin: 18px auto;
  width: 180px;
  height: 180px;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}

.close-btn {
  width: 100%;
  padding: 15px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6ec6ff, #3b8dff);
  color: #021321;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: .25s ease;
  margin-top: 12px;
}

.footer {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;

  font-size: .75rem;
  color: var(--muted);
  opacity: .75;
  text-align: center;
  pointer-events: auto;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 4px;
  transition: .2s ease;
}

.footer a:hover {
  text-decoration: underline;
  opacity: 1;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: .6rem;
}

.brand img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(91,188,255,.35);
}

.brand h1 {
  margin: 0;
  font-size: 2.1rem;
  letter-spacing: 1px;
}

.brand h1 span {
  color: var(--primary);
}

.side-ad {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  min-height: 600px;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: .85;
  z-index: 0;
}

.left-ad {
  left: 20px;
}

.right-ad {
  right: 20px;
}

/* app musí být nad reklamou */
.app {
  position: relative;
  z-index: 2;
}

.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}

.page-transition.active {
  opacity: 1;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 18px;
  margin-top: 1.6rem;

  border-radius: 999px;
  border: 1px solid var(--border);

  background: rgba(6, 11, 22, 0.5);
  backdrop-filter: blur(10px);

  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;

  cursor: pointer;
  transition: .25s ease;
}

.back-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 25px var(--primary-soft);
  transform: translateX(-2px);
}

.back-btn:active {
  transform: scale(.97);
}

.back-btn::before {
  content: "←";
  transition: transform .25s ease;
}

.back-btn:hover::before {
  transform: translateX(-4px);
}

