:root {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
}

body {
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(1200px 800px at 50% 120%, #071a2d 0%, #040812 55%, #020308 100%);
  -webkit-text-size-adjust: 100%;
}

/* ===== Aurora Canvas ===== */
#aurora {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: none;
}

/* ===== Intro Screen ===== */
@font-face {
  font-family: "Nadpis";
  src: url("fonts/nadpis.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 5;

  display: grid;
  place-items: center;

  transition: opacity 0.8s ease;
}

.intro h1 {
  font-family: "Nadpis", sans-serif;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: normal;
  letter-spacing: 0.1em;
  color: white;
  margin: 0;
  text-align: center;
  text-shadow: 0 0 40px rgba(120, 255, 220, 0.6);
}

/* Mobil – výrazně větší text */
@media (max-width: 600px) {
  .intro h1 {
    font-size: clamp(4rem, 18vw, 8rem);
    letter-spacing: 0.05em;
  }
}

.intro.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== Center Content Wrapper ===== */
.content {
  position: relative;
  z-index: 1;

  /* mobilní prohlížeče: 100vh někdy skáče, proto min-height + dvh */
  min-height: 100vh;
  min-height: 100dvh;

  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 24px);
}

/* ===== Glass Panel ===== */
.panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(520px, 100%);
  max-width: 520px;

  z-index: 9999;

  padding: clamp(14px, 4.5vw, 26px) clamp(16px, 4vw, 28px);
  border-radius: clamp(14px, 3vw, 20px);

  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
  text-align: center;
  color: rgba(255, 255, 255, 0.95);

  overflow: hidden;
}

/* ===== Auth Tabs ===== */
.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-tab {
  padding: 10px 14px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.10);
  color: rgba(255,255,255,0.75);

  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-tab:hover {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.9);
}

.auth-tab.active {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.95);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.18);
}

/* ===== Form Layout ===== */
#loginForm,
#registerForm,
#adminForm,
#pollForm,
#tournamentForm,
#miniTournamentForm,
#editProfileForm,
#changePasswordForm {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3.5vw, 18px);
}

label {
  font-size: clamp(0.9rem, 2.6vw, 0.95rem);
  opacity: 0.9;
}

/* ===== Inputs ===== */
.row {
  display: grid;
  grid-template-columns: 1fr;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
select {
  width: 100%;
  height: clamp(42px, 6vh, 46px);

  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);

  background: rgba(10, 14, 24, 0.6);
  color: rgba(255, 255, 255, 0.95);

  outline: none;
  font-size: 1rem;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus {
  border-color: rgba(120, 255, 220, 0.6);
  box-shadow: 0 0 0 4px rgba(120, 255, 220, 0.15);
}

/* datum – ať je v dark režimu čitelný i picker */
input[type="date"] {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.85;
  cursor: pointer;
}

input[type="time"] {
  color-scheme: dark;
}

input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.85;
  cursor: pointer;
}

/* ===== Buttons ===== */
#loginForm button,
#registerForm button,
#adminForm button,
#pollForm button,
#tournamentForm button,
#miniTournamentForm button,
#editProfileForm button,
#changePasswordForm button,
#addOptionBtn,
#pushAdminForm button,
#autoPushForm button,
#editNewsForm button,
#addNewsBtn {
  min-height: 36px;
  height: auto;

  padding: 10px 22px;
  border-radius: 10px;

  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);

  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;

  transition: background 0.2s ease, box-shadow 0.2s ease;
  margin: 0 auto;

  min-width: 140px;
}

#loginForm button:hover,
#registerForm button:hover,
#adminForm button:hover,
#pollForm button:hover,
#tournamentForm button:hover,
#miniTournamentForm button:hover,
#editProfileForm button:hover,
#changePasswordForm button:hover,
#addOptionBtn:hover,
#pushAdminForm button:hover,
#autoPushForm button:hover,
#editNewsForm button:hover,
#addNewsBtn:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(120, 255, 220, 0.35);
}

#loginForm button:active,
#registerForm button:active,
#adminForm button:active,
#pollForm button:active,
#tournamentForm button:active,
#miniTournamentForm button:active,
#editProfileForm button:hover,
#changePasswordForm button:hover,
#addOptionBtn:active,
#pushAdminForm button:active,
#autoPushForm button:active,
#editNewsForm button:active,
#addNewsBtn:active {
  transform: translateY(1px);
}

/* ===== Top Icons (User + Admin) ===== */
.top-icons {
  position: fixed;
  top: clamp(10px, 2.5vw, 18px);
  right: clamp(10px, 2.5vw, 18px);
  z-index: 2;

  display: flex;
  gap: 12px;
}

.icon {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;

  cursor: pointer;
  opacity: 0.6;
  outline: none;

  -webkit-tap-highlight-color: transparent;

  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.icon:hover,
.icon:focus,
.icon:active {
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.6;
}

.icon svg {
  width: 22px;
  height: 22px;
  display: block;
  opacity: 0.9;
}

/* ===== Small screens tweaks ===== */
@media (max-width: 360px) {
  .panel {
    border-radius: 14px;
  }

  #loginForm button,
  #registerForm button,
  #adminForm button,
  #pollForm button,
  #tournamentForm button {
    min-width: 120px;
  }

  .top-icons {
    gap: 8px;
  }
}

/* ===== Utility ===== */
.hidden {
  display: none;
}

#registerForm.hidden,
#loginForm.hidden {
  display: none;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;

  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);

  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;

  -webkit-tap-highlight-color: transparent;
}

.close-btn:hover {
  color: white;
}

/* ✅ Unified Window Header (for all windows/panels) */
.window-head{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.window-title{
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  text-align: center;
  pointer-events: none;
}

.window-close{
  position: absolute;
  top: 10px;
  right: 12px;

  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);

  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;

  -webkit-tap-highlight-color: transparent;
}

.window-close:hover{
  color: white;
}

/* Poll sidebar header: allow space for arrows + centered title */
.poll-window-head{
  gap: 22px;
  padding-top: 12px;
}

.poll-window-head .poll-nav{
  flex: 0 0 44px;
}



/* Admin aktivní stav */
.icon.admin-active svg path,
.icon.admin-active svg rect {
  stroke: #00ff88;
}

.icon.admin-active {
  opacity: 0.9;
}

.icon-wrap {
  position: relative;
}

/* dropdown menu */
.menu {
  position: absolute;
  top: 48px;           /* pod ikonou */
  right: 0;
  z-index: 100;

  min-width: 180px;
  padding: 8px;
  border-radius: 14px;

  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
}

.menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
}

.menu-item:hover {
  background: rgba(255,255,255,0.08);
}

.menu-item.danger {
  color: rgba(255, 90, 90, 0.95);
}

.menu-item.danger:hover {
  background: rgba(255, 90, 90, 0.12);
}

.menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 1px;
}

/* ========================= */
/* ✅ NOVINKY (návštěvníci) */
/* ========================= */

.novinky-wrap{
  /* vždy stejný layout jako na mobilech: výběr nahoře, detail dole */
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  text-align: left;

  /* celková výška okna novinek */
  height: min(68vh, 640px);
  min-height: 360px;
}

/* výška jedné položky v seznamu (kvůli 2.5 položkám) */
:root{
  --novinky-row-h: 64px;
}

/* seznam = tmavší pozadí */
.novinky-left{
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 auto;
}

/* otevřená novinka = světlejší pozadí + vnitřní scroll */
.novinky-right{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;

  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.novinky-list{
  overflow: auto;
  /* 2.5 položky viditelné, zbytek scroll */
  max-height: calc(var(--novinky-row-h) * 2.5);
}

.novinky-detail{
  padding: 14px 14px 16px;

  /* scroll pro dlouhý text */
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  max-height: 100%;
}

.novinky-item{

  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.9);
  padding: 12px 12px;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.08);

  /* jednotná výška řádku pro "2.5 položky" */
  min-height: var(--novinky-row-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.novinky-item:hover{
  background: rgba(255,255,255,0.06);
}

.novinky-item.active{
  background: rgba(255,255,255,0.10);
}

.novinky-item-title{
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.15;
}

.novinky-item-date{
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 4px;
}

.novinky-detail{
  padding: 14px 14px 16px;
  overflow: auto;
  /* důležité pro scroll uvnitř ve flex layoutu */
  min-height: 0;
  max-height: 100%;
}

.novinky-detail h2{
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.novinky-detail .novinky-detail-date{
  font-size: 0.82rem;
  opacity: 0.75;
  margin-bottom: 10px;
}

.novinky-detail .novinky-detail-text{
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 0.96rem;
  opacity: 0.92;
}

.novinky-empty{
  padding: 14px;
  opacity: 0.75;
  text-align: center;
}

.novinky-reactions{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: flex;
  gap: 12px;
  align-items: center;
}

.novinky-reaction-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 70px;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;
}

.novinky-reaction-btn:hover{
  background: rgba(255,255,255,0.09);
}

.novinky-reaction-btn:active{
  transform: translateY(1px);
}

.novinky-reaction-btn:disabled{
  opacity: .7;
  cursor: wait;
}

.novinky-reaction-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.novinky-reaction-icon svg{
  display: block;
}

.novinky-reaction-count{
  font-size: .92rem;
  font-weight: 700;
}

.novinky-reaction-btn.is-like{
  color: #2ecc71;
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.10);
}

.novinky-reaction-btn.is-dislike{
  color: #ff4d4f;
  border-color: rgba(255, 77, 79, 0.45);
  background: rgba(255, 77, 79, 0.10);
}

/* ========================= */
/* ✅ ADMIN: správa novinek */
/* ========================= */

.manage-news-top{
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.manage-news-list{
  display: grid;
  gap: 10px;
  text-align: left;
  max-height: min(60vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.news-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: rgba(0,0,0,0.16);
}

.news-row strong{
  display: block;
}

.news-row .muted{
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 4px;
}

.news-actions{
  display: flex;
  gap: 8px;
}

.news-actions button{
  min-width: unset;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.news-actions .delete{
  border-color: rgba(255, 90, 90, 0.45);
  color: rgba(255, 120, 120, 0.95);
}

.news-textarea{
  width: 100%;
  min-height: 180px;
  max-height: 46vh;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10, 14, 24, 0.6);
  color: rgba(255,255,255,0.95);
  outline: none;
  font-size: 1rem;
  line-height: 1.35;
}

.news-textarea:focus{
  border-color: rgba(120, 255, 220, 0.6);
  box-shadow: 0 0 0 4px rgba(120, 255, 220, 0.15);
}

/* ===== Avatar carousel ===== */
.avatar-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.avatar-arrow {
  width: 44px;
  height: 44px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.95);

  cursor: pointer;
  font-size: 26px;
  line-height: 1;

  display: grid;
  place-items: center;

  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.avatar-arrow:hover {
  background: rgba(255,255,255,0.18);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.25);
}

.avatar-arrow:active {
  transform: translateY(1px);
}

.avatar-circle {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;

  border: 3px solid rgba(120, 255, 220, 0.55);
  box-shadow: 0 0 26px rgba(120, 255, 220, 0.25);

  background: rgba(10, 14, 24, 0.35);
  display: grid;
  place-items: center;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-hint {
  margin-top: -6px;
  font-size: 0.9rem;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .avatar-circle {
    width: 104px;
    height: 104px;
  }
}

@media (max-width: 600px) {
  /* menší mezery mezi prvky */
  .avatar-carousel {
    gap: 8px;
  }

  /* zúžení šipek (tlačítka), aby se to vešlo */
  .avatar-arrow {
    width: 34px;
    height: 44px;
    border-radius: 10px;
    font-size: 22px;
    padding: 0;
  }

  /* kruh drž pevně (nebude se deformovat) */
  .avatar-circle {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
  }

  .avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ========================= */
/* ✅ ADMIN: Správa turnajů a anket */
/* ========================= */

.manage-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.manage-section {
  text-align: left;
  margin-top: 6px;
}

.manage-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 6px 2px 8px;
  opacity: 0.95;
}
.manage-head-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 8px;
}

.manage-head-row .manage-title{
  margin: 0;
}

.admin-create{
  min-width: auto;
  padding: 8px 10px;
  border-radius: 10px;

  border: 1px solid rgba(120, 255, 220, 0.35);
  background: rgba(120, 255, 220, 0.10);
  color: rgba(255,255,255,0.92);

  cursor: pointer;
}

.admin-create:hover{
  background: rgba(120, 255, 220, 0.16);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.14);
}

.admin-create:disabled{
  opacity: 0.6;
  cursor: default;
}


.admin-list {
  display: grid;
  gap: 10px;
  max-height: min(55vh, 520px);
  overflow: auto;
  padding-right: 6px;
}

.admin-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;

  padding: 10px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
}

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

.admin-name {
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-meta {
  margin-top: 4px;
  font-size: 0.82rem;
  opacity: 0.7;
  line-height: 1.2;
}

.admin-del {
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 10px;

  border: 1px solid rgba(255, 90, 90, 0.35);
  background: rgba(255, 90, 90, 0.12);
  color: rgba(255, 210, 210, 0.95);

  cursor: pointer;
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-edit {
  min-width: 92px;
  padding: 8px 10px;
  border-radius: 10px;

  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);

  cursor: pointer;
}

.admin-edit:hover {
  background: rgba(255,255,255,0.16);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.14);
}

.admin-edit:disabled {
  opacity: 0.6;
  cursor: default;
}

.admin-del:hover {
  background: rgba(255, 90, 90, 0.18);
  box-shadow: 0 0 18px rgba(255, 90, 90, 0.18);
}

.admin-del:disabled {
  opacity: 0.6;
  cursor: default;
}

.admin-empty {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.18);
  opacity: 0.75;
}

/* ========================= */
/* ✅ Leaderboards */
/* ========================= */

.poll-sidebar-leaderboards-btn {
  margin-top: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.95);

  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.poll-sidebar-leaderboards-btn:hover {
  background: rgba(255,255,255,0.18);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.18);
}

.lb-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lb-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.lb-tab {
  padding: 10px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.10);
  color: rgba(255,255,255,0.75);

  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.lb-tab:hover {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.9);
}

.lb-tab.active {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.95);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.18);
}

.lb-mode-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.lb-mode-btn {
  min-width: 110px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.10);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1;
}

.lb-mode-btn:hover {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.9);
}

.lb-mode-btn.active {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.95);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.18);
}

.lb-scope-wrap {
  margin-bottom: 2px;
}

.lb-scope-btn {
  min-width: 140px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.10);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1;
}

.lb-scope-btn:hover {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.9);
}

.lb-scope-btn.active {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.95);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.18);
}

.lb-subtitle {
  margin: 4px 0 8px;
  font-size: 14px;
  opacity: .9;
  text-align: center;
}

.lb-list {
  display: grid;
  gap: 10px;
  max-height: calc((48px + 10px) * 4);
  overflow: auto;
  padding-right: 6px;
  text-align: left;
}

.lb-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;

  

  height: 48px;
padding: 10px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
}

.lb-rank {
  opacity: 0.9;
  font-weight: 700;
  min-width: 28px;
}

.lb-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-value {
  opacity: 0.9;
  font-weight: 700;
}

.lb-empty {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.18);
  opacity: 0.75;
}




/* pevný blok pod seznamem (tvoje pozice) */
.lb-me{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

/* zvýraznění "já" */
.lb-item.is-me{
  border-color: rgba(120, 255, 220, 0.40);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.12);
}
/* ========================= */
/* ✅ Bottom bar: Ankety + Žebříček */
/* ========================= */

.bottom-bar{
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 18px 18px 0 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.45);
  width: 100%;    

}

.bottom-btn{
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 0;
  background: transparent !important; /* žádná výplň */
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

/* gradientní border bez výplně */
.bottom-btn::before{
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;                 /* tloušťka borderu */
  border-radius: inherit;

  background: linear-gradient(135deg, #00ffd5, #5b8cff, #c850ff);

  /* vyřízne střed -> zůstane jen okraj */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  pointer-events: none;
}

/* hover – jen glow, žádná výplň */
.bottom-btn:hover{
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.35);
}

/* aktivní stav */
.bottom-btn.active{
  box-shadow: 0 0 22px rgba(120, 255, 220, 0.55);
}

/* disabled */
.bottom-btn.is-disabled{
  opacity: 0.45;
  pointer-events: none;
}

/* klik */
.bottom-btn:active{
  transform: translateY(1px);
}

.bottom-btn img{
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1; /* nad pseudo-elementem */
}

@media (max-width: 600px){
  .bottom-bar{bottom: 0; border-radius: 16px 16px 0 0;}
  .bottom-btn{ width: 58px; height: 58px; border-radius: 14px; }
  .bottom-btn img{ width: 40px; height: 40px; }
}

/* ✅ zabrání automatickému otevření ankety (otevře se až po kliknutí) */
#pollSidebar.force-hidden{ display: none !important; }



/* ========================= */
/* ✅ Poll window – stejný design jako Leaderboards */
/* ========================= */

.poll-sidebar {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(520px, 100%);
  max-width: 520px;

  z-index: 9999;

  padding: clamp(14px, 4.5vw, 26px) clamp(16px, 4vw, 28px);
  border-radius: clamp(14px, 3vw, 20px);

  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
  color: rgba(255,255,255,0.95);

  overflow: hidden;
}


/* DŮLEŽITÉ: aby .hidden vždy vyhrálo */
.poll-sidebar.hidden {
  display: none !important;
}

/* ========================= */
/* ✅ Přepínání anket (víc anket) */
/* ========================= */

.poll-switch{
  margin-top: 10px;
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 22px;
  align-items: center;
}

.poll-switch-btn{
  width: 44px;
  height: 44px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.10);
  color: rgba(255,255,255,0.95);

  cursor: pointer;
  font-size: 26px;
  line-height: 1;

  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;

  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.poll-switch-btn:hover{
  background: rgba(255,255,255,0.18);
  box-shadow: 0 0 18px rgba(120, 255, 220, 0.18);
}

.poll-switch-btn:active{
  transform: translateY(1px);
}

.poll-switch-select{
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);

  background: rgba(10, 14, 24, 0.55);
  color: rgba(255,255,255,0.95);
  outline: none;

  padding: 0 12px;
  font-size: 0.95rem;

  appearance: none;
}

.poll-switch-select:focus{
  border-color: rgba(120, 255, 220, 0.6);
  box-shadow: 0 0 0 4px rgba(120, 255, 220, 0.15);
}

@media (max-width: 600px){
  .poll-switch{
    grid-template-columns: 40px 1fr 40px;
    gap: 14px;
  }
  .poll-switch-btn{ width: 40px; height: 44px; border-radius: 10px; font-size: 22px; }
}

.poll-sidebar-body {
  padding: 10px 14px 14px;
}

.poll-card-title {
  font-size: 1.05rem;
  margin: 0 0 12px 0;
}

/* meta texty */
.poll-meta {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-bottom: 0;
}

/* ===== Checkbox options ===== */
.poll-checks {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

/* řádek možnosti */
.poll-check-row {
  position: relative;
  overflow: hidden;

  display: flex;
  gap: 10px;
  align-items: center;

  padding: 10px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10, 14, 24, 0.50);

  cursor: pointer;
  user-select: none;
}

/* bar v pozadí podle procent (ankety.js nastavuje --pct: "45%") */
.poll-check-row::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    90deg,
    rgba(120, 255, 220, 0.28) var(--pct, 0%),
    rgba(0, 0, 0, 0) 0
  );

  pointer-events: none;
}

/* obsah nad barem */
.poll-check-row > * {
  position: relative;
  z-index: 1;
}

.poll-check-row:hover {
  background: rgba(255,255,255,0.08);
}

.pollCheck {
  width: 18px;
  height: 18px;
  margin: 0;
}

.poll-check-text {
  flex: 1;
  text-align: left;
  opacity: 0.95;
}

/* pokud někdy použiješ disabled */
.poll-disabled {
  opacity: 0.6;
  pointer-events: none;
}


.poll-check-row-col {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

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

.poll-right {
  opacity: 0.75;
  font-size: 0.9rem;
  white-space: nowrap;
  margin-left: auto;
}

.poll-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 28px; /* zarovná pod text vedle checkboxu */
}

.poll-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

/* ========================= */
/* Intro merged from intro.css: Top Title */
/* ========================= */

/* ===== Top Title (Quiz Time) ===== */
.top-title {
  position: fixed;
  top: clamp(12px, 2.5vw, 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;

  font-family: "Nadpis", sans-serif;
  font-weight: normal;
  letter-spacing: 0.1em;
  color: white;
  text-shadow: 0 0 28px rgba(120, 255, 220, 0.45);

  font-size: clamp(1.15rem, 3.2vw, 1.65rem);
  line-height: 1;
  white-space: nowrap;

  pointer-events: none;
}

/* 📱 Mobile úprava */
@media (max-width: 600px) {
  .top-title {
    font-size: clamp(1.35rem, 5vw, 1.9rem);
    left: 50%;
    top: clamp(22px, 6vw, 30px); /* posunutí níž */
  }
}

/* během intra schovej celý spodní panel natvrdo */
body.intro-running .bottom-bar{
  display: none !important;
}

/* === Top absolute close button (above header) === */
.panel-top-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  z-index: 10000;
  -webkit-tap-highlight-color: transparent;
}

.panel-top-close:hover {
  color: white;
}


/* ========================= */
/* ✅ Trezor */
/* ========================= */

.trezor-wrap{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trezor-empty{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.18);
  opacity: 0.75;
}

.trezor-value{
  font-size: clamp(2.2rem, 6vw, 3.1rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 0 26px rgba(120, 255, 220, 0.22);
}



/* ========================= */
/* ✅ Novinky */
/* ========================= */

.novinky-wrap{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.novinky-empty{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.18);
  opacity: 0.75;
}

/* ===== Push admin ===== */
.hint-text{
  margin-top: 10px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}


/* ===== Push Toggle ===== */

.toggle-row {
  display: flex;
  justify-content: center;
}

.toggle-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
}

.toggle-label input {
  display: none;
}

.toggle-slider {
  width: 46px;
  height: 24px;
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  position: relative;
  transition: 0.25s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 4px;
  background: white;
  border-radius: 50%;
  transition: 0.25s ease;
}

.toggle-label input:checked + .toggle-slider {
  background: #00ff88;
}

.toggle-label input:checked + .toggle-slider::before {
  transform: translateX(20px);
}


.trezor-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.trezor-image {
  width: 300px;
  max-width: 60%;
  height: auto;
  object-fit: contain;
}

.lb-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 0;
}

.lb-avatar{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.25);
  flex: 0 0 34px;
}

/* ===== Admin: Správa uživatelů ===== */
.manage-users-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.user-row img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.25;
}

.user-actions {
  display: grid;
  grid-template-columns: 1fr 1fr; /* dvě vedle sebe */
  gap: 6px;
  width: 80px; /* aby nebyly moc široké */
}

.user-actions button {
  padding: 5px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  cursor: pointer;
}

.user-actions button:hover{
  background: rgba(255,255,255,0.20);
}

.user-actions .reset {
  background: rgba(245, 158, 11, 0.85);
  color: #000;
  border-color: rgba(245, 158, 11, 0.25);
}

.user-actions .reset:hover{
  background: rgba(245, 158, 11, 1);
}

.user-actions .delete {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border-color: rgba(239, 68, 68, 0.25);
}

.user-actions .delete:hover{
  background: rgba(239, 68, 68, 1);
}

.user-actions .credit {
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
  border-color: rgba(34, 197, 94, 0.35);
}

.user-actions .credit:hover{
  background: rgba(34, 197, 94, 1);
}

.user-actions .trophy {
  background: rgba(59, 130, 246, 0.92);
  color: #fff;
  border-color: rgba(59, 130, 246, 0.35);
}

.user-actions .trophy:hover{
  background: rgba(59, 130, 246, 1);
}


#creditAdminPanel {
  max-width: 460px;
}

.credit-admin-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.credit-admin-stat {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.credit-admin-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.68);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.credit-admin-stat strong {
  font-size: 1.3rem;
  line-height: 1.1;
}

.credit-type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.credit-type-option {
  position: relative;
  cursor: pointer;
}

.credit-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.credit-type-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.86);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  text-align: center;
}

.credit-type-option input:checked + span {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
  color: #fff;
}

.credit-type-option:hover span {
  background: rgba(255,255,255,0.10);
}

@media (max-width: 520px) {
  .credit-admin-summary,
  .credit-type-switch {
    grid-template-columns: 1fr;
  }
}

/* ===== Správa uživatelů – omezená výška + scroll ===== */

#manageUsersPanel {
  max-height: 80vh;           /* okno nebude vyšší než 80% obrazovky */
  display: flex;
  flex-direction: column;
}

#manageUsersPanel .window-head {
  flex: 0 0 auto;             /* hlavička zůstane nahoře */
}

#manageUsersList {
  flex: 1 1 auto;
  overflow-y: auto;           /* scroll jen mezi uživateli */
  padding-right: 6px;         /* místo pro scrollbar */
}


#manageTrophiesPanel {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

#manageTrophiesPanel .window-head {
  flex: 0 0 auto;
}

.manage-trophies-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trophy-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
}

.trophy-admin-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.trophy-admin-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  flex: 0 0 52px;
}

.trophy-admin-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trophy-admin-text strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.trophy-admin-text span {
  font-size: 0.78rem;
  opacity: 0.6;
}

.trophy-admin-right {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.trophy-admin-toggle {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.trophy-admin-toggle:disabled {
  cursor: wait;
}

.trophy-admin-toggle:checked + .toggle-slider {
  background: #00ff88;
}

.trophy-admin-toggle:checked + .toggle-slider::before {
  transform: translateX(20px);
}

#manageTrophiesList::-webkit-scrollbar {
  width: 8px;
}

#manageTrophiesList::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
}

@media (max-width: 640px) {
  .trophy-admin-row {
    gap: 10px;
  }

  .trophy-admin-thumb {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .trophy-admin-text strong {
    font-size: 0.9rem;
  }
}

/* hezčí scrollbar (volitelné) */
#manageUsersList::-webkit-scrollbar {
  width: 8px;
}

#manageUsersList::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
}

/* Poll sidebar counter (e.g., 1 z 4) */
.poll-counter{
  margin-top: 4px;
  font-size: 0.8rem;
  opacity: 0.6;
  text-align: center;
}


.fullscreen-btn{
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 2000;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: white;
  cursor: pointer;
  opacity: 0.6;
  display: none; /* výchozí stav = skryté */
  place-items: center;
}

/* zobrazit jen na PC / zařízení s myší */
@media (hover: hover) and (pointer: fine) {
  .fullscreen-btn{
    display: grid;
  }
}

.fullscreen-btn:hover{
  opacity: 1;
}

.user-credit {
  position: fixed;
  top: 14px;
  left: 66px;
  z-index: 2000;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  min-height: 44px;
  padding: 0 8px;
  border-radius: 14px;


  background: rgba(0,0,0,0.12);
  color: rgba(255,255,255,0.92);

  font-size: 0.82rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: auto;

  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.user-credit::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #b6ffb6, #00d000 60%, #006400);
  box-shadow: 0 0 12px rgba(0,250,0,0.6);
  flex: 0 0 12px;
}


.user-credit span {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.user-credit .credit-separator {
  font-weight: 500;
  opacity: 0.6;
}

.gifted-credit-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gifted-credit-warning{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ff2b2b;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(255, 43, 43, 0.8);
  animation: giftedWarningPulse 1.2s ease-in-out infinite;
}

.gifted-credit-warning:hover{
  filter: brightness(1.08);
}

.gifted-credit-warning:focus-visible{
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}

.gifted-credit-tooltip{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(280px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 80, 80, 0.45);
  border-radius: 12px;
  background: rgba(20, 8, 8, 0.96);
  color: rgba(255,255,255,0.96);
  font-size: 0.8rem;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  box-shadow: 0 18px 34px rgba(0,0,0,0.45);
  z-index: 10;
}

.gifted-credit-tooltip::before{
  display: none;
}

@keyframes giftedWarningPulse{
  0%{
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 43, 43, 0.8);
  }
  70%{
    transform: scale(1.08);
    box-shadow: 0 0 0 10px rgba(255, 43, 43, 0);
  }
  100%{
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 43, 43, 0);
  }
}

.user-credit.flash {
  border-color: rgba(120, 255, 220, 0.42);
  background: rgba(255,255,255,0.16);
  box-shadow: 0 0 20px rgba(120, 255, 220, 0.18);
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .user-credit {
    top: 15px;
    left: 10px;
    min-height: 38px;
    border-radius: 12px;
    font-size: 0.72rem;
  }

  .user-credit span {
    font-size: 0.88rem;
  }

  .gifted-credit-wrap{
    gap: 6px;
  }

  .gifted-credit-warning{
    width: 16px;
    height: 16px;
    font-size: 0.75rem;
  }

  .gifted-credit-tooltip{
    width: min(250px, calc(100vw - 24px));
    font-size: 0.76rem;
  }
}

.icon-only{
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.icon-only svg{
  width: 18px;
  height: 18px;
}

/* ===== Trezor upgrade ===== */
.trezor-wrap {
  align-items: center;
  text-align: center;
  gap: 12px;
}

.trezor-image {
  width: min(300px, 65vw);
  max-width: 75%;
  height: auto;
  object-fit: contain;
}

.trezor-goal-text {
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.86);
}

.trezor-progress {
  width: min(100%, 340px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trezor-progress.hidden {
  display: none;
}

.trezor-progress-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 6px rgba(0,0,0,0.28);
}

.trezor-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(120, 255, 220, 0.55), rgba(120, 255, 220, 0.95));
  transition: width 0.25s ease;
}

.trezor-progress-text {
  font-size: 0.95rem;
  opacity: 0.85;
}

.trezor-donate-btn {
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.trezor-donate-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 20px rgba(120, 255, 220, 0.35);
}

.trezor-donate-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}




/* ===== USER CREDIT STACK FIX ===== */
.user-credit{
  left: 66px;              /* nechá fullscreen tlačítko volné */
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 12px;
}

.user-credit::before{
  display: none !important; /* schová původní zelené kolečko */
}

.user-credit span{
  display: inline-flex;
  align-items: center;
}

#creditValue::before{
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  background: radial-gradient(circle at 30% 30%, #b6ffb6, #00ff55 55%, #006400);
  box-shadow:
    0 0 6px rgba(0,255,120,0.9),
    0 0 12px rgba(0,255,120,0.8),
    0 0 20px rgba(0,255,120,0.7),
    0 0 32px rgba(0,255,120,0.5);
  flex: 0 0 12px;
}

#giftedCreditValue::before{
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  background: radial-gradient(circle at 30% 30%, #fff7c2, #ffd700 55%, #b89600);
  box-shadow:
    0 0 6px rgba(255,215,0,0.9),
    0 0 12px rgba(255,215,0,0.8),
    0 0 20px rgba(255,215,0,0.6),
    0 0 30px rgba(255,215,0,0.4);
  flex: 0 0 12px;
}

@media (max-width: 767px) {
  .user-credit{
    left: 10px;
    top: 15px;
    gap: 3px;
    padding: 7px 10px;
  }

  #creditValue::before,
  #giftedCreditValue::before{
    width: 10px;
    height: 10px;
    margin-right: 7px;
    flex: 0 0 10px;
  }
}


.bottom-btn-text{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 0 10px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
}

#openTrophyRoom img,
#openMozecek img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}



/* ===== CREDIT QR BUTTON ===== */
.credit-main-row{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.credit-qr-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.credit-qr-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.95);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.credit-qr-button:hover{
  background: rgba(255,255,255,0.18);
  box-shadow: 0 0 16px rgba(120, 255, 220, 0.2);
}

.credit-qr-button:active{
  transform: translateY(1px);
}

.credit-qr-button:focus-visible{
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}

.credit-qr-bubble{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(220px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px;
  background: rgba(10, 14, 24, 0.96);
  box-shadow: 0 18px 34px rgba(0,0,0,0.45);
  z-index: 20;
}

.credit-qr-bubble::before{
  display: none;
}

.credit-qr-bubble img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

@media (max-width: 767px) {
  .credit-main-row{
    gap: 6px;
  }

  .credit-qr-button{
    width: 22px;
    height: 22px;
    font-size: 0.95rem;
  }

  .credit-qr-bubble{
    width: min(180px, calc(100vw - 24px));
    padding: 8px;
  }
}


/* ===== Mini tournament mode toggle ===== */
.mode-toggle{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.mode-toggle-option{
  position: relative;
  display: block;
  width: 100%;
}

.mode-toggle-option input{
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.mode-toggle-option span{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(42px, 6vh, 46px);
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 14, 24, 0.6);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mode-toggle-option input:checked + span{
  border-color: rgba(120, 255, 220, 0.6);
  box-shadow: 0 0 0 4px rgba(120, 255, 220, 0.15);
  background: rgba(120, 255, 220, 0.10);
  color: rgba(255, 255, 255, 0.96);
}

/* ===== Prší výzvy ===== */
.challenge-prsi-state {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  padding: 18px 8px;
}

.challenge-prsi-title {
  font-size: 1rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.95);
}

.challenge-prsi-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.challenge-player-invite-btn--secondary {
  background: rgba(255,255,255,0.12);
}

.challenge-player-invite-btn--cancel {
  background: rgba(255, 90, 90, 0.22);
}
