/* VERZE: stav aktual - Round 15 (Final Opaque) */
html {
  scrollbar-gutter: stable;
}

:root {
  --bg: #0f1020;
  --bg-soft: #1a1d3a;
  --card: #14162b;
  --accent: #ff7b1c;
  --accent-2: #3fd0ff;
  --accent-3: #ffe66d;
  --text: #f8f7ff;
  --muted: #c8c8d8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #2a2f66, var(--bg) 45%) fixed,
    radial-gradient(circle at 20% 80%, #2a0f48, transparent 40%) fixed;
  min-height: 100vh;
}

.page {
  position: relative;
  overflow-x: hidden;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    url("LOGO_SC2.svg");
  background-size: 28px 28px, 140%;
  background-repeat: repeat, no-repeat;
  background-position: center, center;
  pointer-events: none;
  opacity: 0.14;
  animation: logo-breathe 24s ease-in-out infinite;
}

@keyframes logo-breathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 6vw;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 25, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo img {
  height: 48px;
  width: auto;
}

.logo {
  order: 1;
}

.nav {
  display: flex;
  gap: 20px;
  order: 2;
  margin: 0 auto;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav a.active,
.nav a:hover {
  color: var(--text);
}

.hidden {
  display: none !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  order: 4;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

body.nav-open .nav {
  display: flex;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.brand {
  color: var(--accent-2);
}


.cta {
  background: var(--accent);
  color: #0d0d0f;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.user-menu {
  position: relative;
  order: 3;
}

.user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  cursor: pointer;
}

.user-link i,
.user-link .bi {
  margin-right: 8px !important;
}

.bi {
  line-height: 1;
  display: inline-block;
  vertical-align: -0.125em;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: rgba(15, 16, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  min-width: 220px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow);
  z-index: 20;
  transform-origin: top right;
}

.user-menu.open .user-link {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
}

.user-menu.open .user-dropdown {
  top: 100%;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.user-dropdown[hidden] {
  display: none;
}

.user-dropdown a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.user-dropdown a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.user-dropdown .user-logout {
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  font-family: inherit;
  width: 100%;
  border: none;
  cursor: pointer;
  font-size: inherit;
}

.user-dropdown .user-logout:hover {
  background: rgba(255, 255, 255, 0.12);
}

main {
  padding: 40px 6vw 80px;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: center;
  margin-bottom: 70px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 12px;
  color: var(--accent-2);
  margin-bottom: 16px;
}

h1,
h2,
h3 {
  font-family: "Bungee", cursive;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(32px, 4vw, 54px);
  margin: 0 0 16px;
}

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px !important;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  border: 2px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn i,
.btn .bi,
.btn [class^="bi-"],
.btn [class*=" bi-"] {
  margin-right: 12px !important;
  display: inline-block !important;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.9);
}

.btn.primary {
  background: var(--accent);
  color: #0f0f12;
}

.btn.primary:hover {
  background: white;
  color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 123, 28, 0.4);
}

.btn.ghost {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  color: white;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
  font-size: 13px;
}

.hero-card {
  background: linear-gradient(150deg, #23244f, #0f1020 50%, #1b2b3f);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.card-rim {
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(130deg, rgba(255, 230, 109, 0.3), rgba(63, 208, 255, 0.2));
}

.card-spotlight {
  background: rgba(15, 16, 32, 0.9);
  border-radius: 16px;
  padding: 20px;
}

.badge {
  background: var(--accent-2);
  color: #06121a;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.stat {
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 16px;
}

.steps h2 {
  margin-bottom: 24px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.step {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-num {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-3);
  margin-bottom: 10px;
}

.cta-banner {
  margin-top: 70px;
  padding: 28px;
  background: linear-gradient(120deg, rgba(255, 123, 28, 0.25), rgba(63, 208, 255, 0.2));
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer {
  padding: 26px 6vw 40px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

/* Auth and admin */
.auth-grid,
.admin-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.admin-list {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

/* Rozcestník – zúžená karta */
.admin-hub-card {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Celý box jako klikatelné tlačítko */
.admin-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
  transform: translateX(4px);
}

.admin-nav-item:active {
  transform: translateX(2px) scale(0.99);
}

.admin-nav-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-nav-text strong {
  font-weight: 700;
  font-size: 15px;
}

.admin-nav-text small {
  color: var(--muted);
  font-size: 12px;
}

.admin-nav-arrow {
  font-size: 18px;
  color: var(--accent);
  opacity: 0.6;
  transition: opacity 0.18s ease, transform 0.18s ease;
  flex-shrink: 0;
}

.admin-nav-item:hover .admin-nav-arrow {
  opacity: 1;
  transform: translateX(4px);
}



.admin-list .row {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  align-items: flex-start;
}

.admin-list .row+.row {
  margin-top: 10px;
}

.admin-list .row>div:last-child {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-list .row>div:last-child .btn {
  margin-bottom: 6px;
}

.message-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-card+.message-card {
  margin-top: 12px;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-list .row>div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-list .row>div:last-child {
  flex: 0 0 180px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-list .row button {
  white-space: nowrap;
}

.admin-list .row p {
  margin: 6px 0 0;
  white-space: normal;
  word-break: break-word;
}

.admin-list .row.stack>div:last-child {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

/* Master detail page */
.master-detail-page {
  display: grid;
  gap: 24px;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  align-items: stretch;
}

.detail-media {
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  height: auto;
  width: 100%;
  min-width: 0;
  background: linear-gradient(140deg, rgba(255, 123, 28, 0.4), rgba(63, 208, 255, 0.25));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(var(--photo-x, 0px), var(--photo-y, 0px)) scale(var(--photo-zoom, 1));
  transform-origin: center;
}

.detail-main h1 {
  margin: 8px 0 6px;
}

.accordion-btn {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-panel {
  margin-top: 12px;
}

.accordion-caret {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.accordion-btn[aria-expanded="true"] .accordion-caret {
  transform: rotate(90deg);
}

.detail-main {
  min-width: 0;
}

/* Masters page */

.masters-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 32px;
}

.masters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1300px) {
  .masters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.master-card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(15, 16, 32, 0.9));
  border-radius: 18px;
  padding: 16px;
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.master-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 230, 109, 0.5);
}

.master-card .thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(255, 123, 28, 0.4), rgba(63, 208, 255, 0.25));
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  position: relative;
}

.master-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(var(--photo-x, 0px), var(--photo-y, 0px)) scale(var(--photo-zoom, 1));
  transform-origin: center;
}

.form-card .thumb {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(255, 123, 28, 0.25), rgba(63, 208, 255, 0.2));
  display: grid;
  place-items: center;
}

.form-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(var(--photo-x, 0px), var(--photo-y, 0px)) scale(var(--photo-zoom, 1));
  transform-origin: center;
}

.photo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  position: relative;
}

.photo-row .icon-btn {
  position: relative;
  margin-left: auto;
  align-self: center;
}

.password-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.password-row .icon-btn {
  width: 40px;
  height: 40px;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.profile-actions .btn {
  width: 100%;
}

/* Generalized active outline for edit mode */
.active-outline,
.btn.active-outline,
input.active-outline {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(255, 123, 28, 0.25) !important;
}

@media (max-width: 700px) {
  .profile-actions {
    grid-template-columns: 1fr;
  }
}

.socials-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.social-chip i {
  font-size: 16px;
}

.social-chip .sc-logo {
  width: 16px;
  height: 16px;
  display: inline-block;
  background: url("LOGO_SC2.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
}

.social-chip i,
.social-chip .bi {
  margin-right: 8px !important;
}

.social-chip[data-disabled="1"] {
  opacity: 0.45;
  pointer-events: none;
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  color: #ff4d4d;
  /* Red for trash/delete feel */
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.icon-btn:active {
  transform: scale(0.9);
}

.icon-btn i {
  font-size: 18px;
  line-height: 1;
}

.master-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 60%);
}

.master-card .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.master-card h3 {
  margin: 12px 0 6px;
  font-size: 18px;
}

.master-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.master-detail {
  position: sticky;
  top: 120px;
  align-self: start;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(20, 22, 43, 0.96));
  border-radius: 24px;
  padding: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.master-detail .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.master-detail .badge {
  margin: 0;
}

.master-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.master-stats .stat {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
}

.master-stats .stat span {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted, #aaa);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.master-stats .stat strong {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}

.master-tags {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  overflow: hidden;
  position: relative;
  /* Maskování okrajů - plynulé vytrácení */
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  padding: 10px 0;
  min-height: 120px;
}

.tags-scroller-row {
  display: flex;
  white-space: nowrap;
  gap: 16px;
  width: max-content;
  /* Důležité pro správný výpočet % v transformaci */
  will-change: transform;
}

.tags-scroller-row.row-1 {
  animation: scroll-linear var(--duration, 40s) linear infinite;
}

.tags-scroller-row.row-2 {
  animation: scroll-linear var(--duration, 35s) linear infinite;
}

/* Pauza při hoveru odstraněna na přání uživatele */


.master-tags span {
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  flex-shrink: 0;
  display: inline-block;
}

.master-tags span:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.master-tags span.collected {
  background: var(--accent);
  color: #000;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 15px rgba(255, 230, 109, 0.4);
  font-weight: 700;
}

.master-tags span.just-collected {
  animation: tag-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tag-pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes scroll-linear {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.tag-game-box {
  margin-top: 24px;
  padding: 16px;
  background: rgba(255, 230, 109, 0.05);
  border: 1px dashed rgba(255, 230, 109, 0.3);
  border-radius: 16px;
  text-align: center;
  width: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.tag-game-box h4 {
  margin: 0;
  font-family: 'Bungee', cursive;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.tag-game-box p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.tag-game-box .result-score {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(255, 230, 109, 0.4);
}

.tag-game-box .game-btn {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.tag-game-box .game-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 230, 109, 0.4);
}

/* Speciální barva pro druhou fázi výběru */
.master-tags span.memory-selected {
  background: #3fd0ff;
  color: #000;
  box-shadow: 0 0 15px rgba(63, 208, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

.form-card {
  margin-top: 32px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 10, 20, 0.7);
  color: var(--text);
  font-family: inherit;
}

.admin-card {
  border: 1px dashed rgba(255, 230, 109, 0.5);
}

form {
  display: grid;
  gap: 12px;
}

label {
  font-size: 13px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 10, 20, 0.7);
  color: var(--text);
  font-family: inherit;
}

textarea {
  min-height: 100px;
}

input:disabled,
textarea:disabled,
select:disabled {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--muted) !important;
  cursor: not-allowed;
  opacity: 0.7;
  border-color: rgba(255, 255, 255, 0.1) !important;
}


.notice {
  background: rgba(63, 208, 255, 0.2);
  border: 1px solid rgba(63, 208, 255, 0.6);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text);
}

.notice .copy-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  font-weight: 700;
}

.notice .copy-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.notice .inline-link {
  margin-left: 10px;
  color: var(--text);
  text-decoration: underline;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.7);
  display: grid;
  place-items: center;
  z-index: 100;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(420px, 90vw);
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow);
}

.modal-card h3 {
  margin: 0 0 8px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Role badge */
.role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.role-admin {
  background: rgba(255, 123, 28, 0.22);
  color: #ffaa55;
  border: 1px solid rgba(255, 123, 28, 0.4);
}

.role-ucednik {
  background: rgba(63, 208, 255, 0.18);
  color: #5dd4f8;
  border: 1px solid rgba(63, 208, 255, 0.35);
}

.role-navstevnik {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* User controls – search + filter */
.user-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.role-filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-filter-btn {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.role-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.role-filter-btn.active {
  background: var(--accent);
  color: #0f0f12;
  border-color: transparent;
}



/* Responsive */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .detail-card {
    grid-template-columns: 1fr;
  }

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

  .masters-layout {
    grid-template-columns: 1fr;
  }

  .master-detail {
    position: relative;
    top: 0;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav {
    width: 100%;
    justify-content: center;
    display: none;
    flex-direction: column;
    align-items: center;
    padding-bottom: 8px;
    order: 4;
  }

  .user-link {
    margin-left: auto;
    margin-right: 8px;
    order: 2;
  }

  .user-dropdown {
    right: 0;
    max-width: calc(100vw - 16px);
  }
}

@media (max-width: 420px) {
  .user-dropdown {
    right: -8px;
    max-width: calc(100vw - 8px);
  }
}

@media (max-width: 1200px) and (min-width: 981px) {
  /* keep the same mask ratio, only crop via object-fit */
}

@media (max-width: 620px) {
  .nav {
    width: 100%;
    justify-content: center;
  }

  .cta {
    width: 100%;
    text-align: center;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .admin-list .row>div:last-child {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
}

@keyframes sparkle-out {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }

  50% {
    transform: scale(1.1);
    filter: brightness(1.5);
  }

  100% {
    transform: scale(0.5);
    opacity: 0;
    filter: brightness(2);
  }
}

@keyframes sparkle-in {
  0% {
    transform: scale(0.5);
    opacity: 0;
    filter: brightness(2);
  }

  60% {
    transform: scale(1.1);
    opacity: 1;
    filter: brightness(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
}

.tag-sparkle-out {
  animation: sparkle-out 0.6s ease-in forwards;
}

.tag-sparkle-in {
  animation: sparkle-in 0.6s ease-out forwards;
}



.tag-sparkle-out::before,
.tag-sparkle-in::before,
.tag-sparkle-out::after,
.tag-sparkle-in::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.8);
  opacity: 0;
}

/* Define sparkle float animations */
@keyframes float-sparkle-1 {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }

  100% {
    transform: translate(-150%, -150%) scale(1.5);
    opacity: 0;
  }
}

@keyframes float-sparkle-2 {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }

  100% {
    transform: translate(50%, -180%) scale(1.2);
    opacity: 0;
  }
}

/* Apply to pseudo elements during animation classes */
.tag-sparkle-out::before {
  animation: float-sparkle-1 0.4s ease-out forwards;
}

.tag-sparkle-out::after {
  animation: float-sparkle-2 0.4s ease-out 0.1s forwards;
  /* slight delay */
}

.tag-sparkle-in::before {
  animation: float-sparkle-2 0.5s ease-out forwards;
}

.tag-sparkle-in::after {
  animation: float-sparkle-1 0.5s ease-out 0.1s forwards;
}

@keyframes sparkle-out {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }

  40% {
    transform: scale(1.3);
    filter: brightness(3) drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  }

  100% {
    transform: scale(0);
    opacity: 0;
    filter: brightness(5);
  }
}

@keyframes sparkle-in {
  0% {
    transform: scale(0);
    opacity: 0;
    filter: brightness(5);
  }

  60% {
    transform: scale(1.15);
    opacity: 1;
    filter: brightness(2) drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
  }

  100% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
}

.particle {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  background: radial-gradient(circle, #fff 40%, transparent 80%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.8);
  will-change: transform, opacity;
}

@keyframes dissolve-out {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }

  100% {
    opacity: 0.2;
    filter: blur(4px);
    transform: scale(0.95);
  }
}

.tag-dissolve {
  animation: dissolve-out 0.8s ease-in forwards;
}

/* Gallery Presentation Styles */
.detail-media {
  position: relative;
  overflow: hidden;
  display: block;
  /* ensure it's a block for positioning */
  cursor: grab;
  background: #14162b;
  /* Match app background for gaps */
}

.detail-media:active {
  cursor: grabbing;
}

.gallery-track {
  display: flex;
  height: 100%;
  width: 100%;
  gap: 20px;
  /* Physical gap to prevent sub-pixel bleeding */
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.detail-media .media-content {
  flex: 0 0 calc(100% + 2px);
  width: calc(100% + 2px);
  margin-left: -1px;
  height: 100%;
  object-fit: cover;
  position: relative;
  opacity: 1;
  z-index: 1;
  user-select: none;
  -webkit-user-drag: none;
  max-width: none;
  /* Sub-pixel rendering fixes */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

/* Controls */
.media-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.detail-media:hover .media-controls {
  opacity: 1;
}

.media-controls button {
  pointer-events: auto;
}

/* Hide controls on mobile/touch devices - use swipe instead */
@media (max-width: 768px),
(hover: none) {
  .media-controls {
    display: none;
  }
}

.control-btn {
  background: rgba(15, 16, 32, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 20px;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  border-color: var(--accent);
}

.control-btn i {
  line-height: 1;
}

.gallery-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  padding: 6px 10px;
  background: rgba(15, 16, 32, 0.4);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transform: scale(1.2);
}

.social-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.switch-block {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  user-select: none;
  transition: opacity 0.2s;
}

.switch-block:hover {
  opacity: 0.8;
}

.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
  background-color: var(--accent);
  border-color: var(--accent);
}

input:checked+.slider:before {
  transform: translateX(16px);
}

.social-field.hidden {
  display: none !important;
}

/* Audio Player */
.audio-player-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  width: 100%;
}

.player-main {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.play-button-wrapper {
  position: relative;
  width: 140px;
  /* Increased to 140px for wider visualizer overlap */
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.play-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #14162b;
  /* Opaque background as requested */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  outline: none;
  box-shadow: none;
  color: var(--accent);
  opacity: 1 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 24px;
}

.play-button:hover,
.play-button:active {
  background: #14162b;
  box-shadow: 0 0 15px rgba(255, 123, 28, 0.3);
  transform: scale(1.05);
}

/* Custom icons to ensure hollow look and masking */
.play-button i {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  will-change: transform;
}



.play-button svg {
  display: block;
}

.progress-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
  pointer-events: none;
  z-index: 11;
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.1s linear;
  stroke: #ffffff;
}

.visualizer-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  /* Doubled length as requested */
  height: 44px;
  background: transparent;
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  /* Pure white as requested */
}

.audio-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  opacity: 0.7;
}

#detail-desc {
  margin-top: 16px;
  line-height: 1.6;
}

#detail-desc p {
  margin-bottom: 12px;
}

#detail-desc ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

#detail-desc li {
  margin-bottom: 6px;
  list-style-type: disc;
}

#detail-desc strong {
  color: var(--accent);
  font-weight: 700;
}

#detail-desc h1,
#detail-desc h2,
#detail-desc h3 {
  margin: 20px 0 10px 0;
  color: white;
  font-family: 'Bungee', cursive;
}

#detail-desc h3 {
  font-size: 1.2rem;
}

/* Virtual Master Card */
.virtual-card {
  height: 100%;
}

.virtual-card .thumb i {
  font-size: 80px;
  line-height: 1;
}

/* Multi-select check chips */
.multi-select-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.check-chip input {
  display: none;
}

.check-chip span {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 1);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  color: var(--muted);
}

.check-chip input:checked+span {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(255, 123, 28, 0.3);
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Range input styling */
input[type="range"] {
  accent-color: var(--accent);
}

.loading-small {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
}

/* Admin requests specific styles */
.request-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.request-card h4 {
  margin: 0 0 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
}

.request-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.request-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .request-details {
    grid-template-columns: 1fr;
  }
}

/* Autocomplete styles */
.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  z-index: 1001;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: var(--shadow);
  margin-top: 4px;
}

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.autocomplete-item strong {
  color: var(--accent);
}

.autocomplete-item small {
  color: var(--muted);
}