/* ====== Background ====== */
body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg,#0e0c15,#1a1225);
    font-family: Arial,sans-serif;
    color: #fff;
}

/* ===== Language switch (pill) ===== */
.lang-switch{
  position: fixed !important;
  top: 14px !important; left: 14px !important; right: auto !important;
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(28,21,46,.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(139,92,246,.25);
  padding: 4px 6px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  z-index: 10000;
}

.lang-switch button{
  display: flex;
  align-items: center;
  justify-content: center;

  height: 30px;
  min-width: 44px;
  padding: 0 10px;

  font-size: 9px;           /* ✅ stejné jako v dashboard.html */
  font-weight: 650;         /* ✅ stejné – trochu tučnější */
  line-height: 1;

  border: none;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;

  transition: transform .12s ease, background .15s ease, box-shadow .2s ease;
}

.lang-switch button.active{
  background: rgba(139,92,246,.25);
  box-shadow: 0 0 0 2px rgba(139,92,246,.35) inset;
}

.lang-switch button:hover{ transform: translateY(-1px); }


/* ====== Wrapper ====== */
.auth-wrapper {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

/* ====== Card ====== */
.card {
    background: #1c152e;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 0 20px rgba(139,92,246,.2);
    width: 290px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card__head { margin-bottom: .5rem;padding-left: 0.8rem; }
.card__body { flex: 1 1 auto; min-height: 0; }
.card__head h2 {
  margin-left: 0.8rem;
}
/* ====== Actions ====== */
.card__actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-bottom: 1rem;
}

/* ====== Headings ====== */
.card h2 { margin: 0 0 .4rem 0; font-size: 1.15rem; }
.accent { color: #8b5cf6; }
.card p {font-size: 0.8rem;}

/* ====== Inputs ====== */
.card input {
  display: block; 
    width: calc(95%);
    margin: .45rem auto;
    padding: .72rem;
    border-radius: .6rem;
    border: none;
    outline: none;
    background: #2a1f47;
    color: #fff;
    font-size: 0.9rem;
}
.card input::placeholder { color: rgba(255,255,255,.6); }

/* ====== Buttons ====== */
.card .card__actions > button {
    width: 70%;
    padding: .9rem;
    font-size: 1rem;
    background: #8b5cf6;
    color: #fff;
    border: none;
    border-radius: .6rem;
    font-weight: normal;
    cursor: pointer;
}
.card .card__actions > button:hover { background: #a78bfa; }
.card .card__actions > button[disabled] { opacity: .75; cursor: not-allowed; }

/* ===== PRELOADER ===== */
#preloader {
  position: fixed; inset: 0;
  background: #0e0c15;
  display: flex; align-items: center; justify-content: center;
  z-index: 999999; transition: opacity .45s ease, visibility .45s ease;
}
#preloader.hide {
  opacity: 0; visibility: hidden;
}
.preloader-inner {
  width: 80px; height: 80px;
  display: grid; place-items: center;
}
.ring {
  width: 54px; height: 54px;
  border: 3px solid rgba(139,92,246,.25);
  border-top-color: #c084fc;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  box-shadow: 0 0 20px rgba(139,92,246,.2);
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* ====== Links ====== */
a { color: #8b5cf6; text-decoration: none; }
a:hover { text-decoration: underline; }
.link-center { display: block; text-align: center; margin-top: .6rem; }

/* ====== Messages ====== */
.form-message { min-height: 1.2rem; font-size: .9rem; margin: .4rem 0 0; text-align: center; }
.form-message.error { color: #f87171; }
.form-message.success { color: #34d399; }

/* Chyba pod heslem (registrace) */
.input-error {
    width: calc(100% - 40px);
    margin: .2rem 0 0;
    font-size: .85rem;
    color: #f87171;
    text-align: left;
}

/* ====== Logo ====== */
.logo-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.logo-wrap img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.35));
}

/* ===== Modal (zapomenuté heslo) ===== */
.modal-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .35s ease, background .35s ease;
}
.modal-backdrop.active{ display:flex; }

.modal{
  position: relative;
  background: #1c152e;
  width: 420px;
  max-width: calc(100% - 2rem);
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 0 24px rgba(139,92,246,.25);
  transform: translateY(18px);
  opacity: 0;
  transition: transform .33s cubic-bezier(.22,.9,.3,1), opacity .28s ease;
}
.modal-backdrop.active .modal {
  transform: translateY(0);
  opacity: 1;
}

/* menší a vycentrovaný input */
.modal input{
  display: block;
  width: 92%;
  margin: .6rem auto;
  padding: .8rem;
  border-radius: .6rem;
  border: none; outline: none;
  background: #2a1f47; color: #fff; font-size: 1rem;
}

/* akce – jen jedno tlačítko uprostřed */
.modal-actions{ display:flex; justify-content:center; margin-top:.5rem; }
.modal-actions .primary-wide{
  min-width: 200px;
  padding: .9rem 1.25rem;
  border:none; border-radius:.6rem;
  background:#8b5cf6; color:#fff; cursor:pointer;
}
.modal-actions .primary-wide:hover{ background:#a78bfa; }

/* kulaté fialové tlačítko s křížkem – zmenšené + efekt */
.modal-close{
  position:absolute; top:.5rem; right:.5rem;
  width: 28px; height: 28px; border-radius: 999px;
  display:flex; align-items:center; justify-content:center;
  border:none; background:#8b5cf6; color:#fff; cursor:pointer;
  font-size: 16px; line-height: 1;
  transition: transform .18s ease, box-shadow .25s ease, background .18s ease, rotate .25s ease;
}
.modal-close:hover{
  background:#9b87f5;
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(139,92,246,.15);
  rotate: 90deg; /* otočka křížku při hoveru */
  
}

/* === Resend (reset kód) – sjednocený vzhled s primárními tlačítky === */
.resend-wrap{
  display:flex;
  align-items:center;
  justify-content:center;     /* vycentrovat řádek */
  gap:.75rem;
  margin:.25rem 0 .5rem;
}

.resend-btn{
  min-width: 200px;            
  padding:.7rem 1.1rem;
  border:none;
  border-radius:.6rem;
  background:#8b5cf6;
  color:#fff;
  font-size:.95rem;
  font-weight:600;
  cursor:pointer;
  box-shadow: 0 6px 18px rgba(139,92,246,.25);
  transition: background .15s ease, transform .12s ease, box-shadow .2s ease;
}
.resend-btn:hover{ background:#a78bfa; transform: translateY(-1px); }

/* DŮLEŽITÉ: i když je disabled, ponech fialové pozadí – jen nižší krytí */
.resend-btn:disabled{
  background:#8b5cf6;
  color:#fff;
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.resend-timer{
  opacity:.9;
  font-size:.95rem;
  font-weight:600;
}


@media (max-width:1500px) {
  .lang-switch {
    position: fixed !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: 10000 !important;
  }
}

.bg-orbs{
  z-index: -1 !important;   /* stejně jako na home */
}

.orb{
  opacity: .12 !important;  /* méně nápadné */
  filter: blur(60px) !important;
}

/* Na menších zařízeních orbs úplně schovej */
@media (max-width: 1024px){
  .bg-orbs{ display: none !important; }
}
.bg-orbs{ display: none !important; }


.clickable-logo {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.clickable-logo:hover {
  transform: scale(1.06);
  filter: none !important;
}

/* ====== Utility ====== */
.hidden { display: none; }
\n\n/* ===== PATCH START ===== */\n

/* =========================
   FIX: centered logo on all sizes
   ========================= */
.logo-wrap {
  width: 100%;
  height: 100%;
  min-height: 200px; /* ensure vertical space so flex centering works */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.logo-wrap img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.35));
}


.logo-wrap{ position: relative; }
.logo-wrap::before{
  content: "";
  position: absolute;
  inset: 12% 14%;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
              rgba(139,92,246,0.18) 0%,
              rgba(139,92,246,0.10) 40%,
              rgba(139,92,246,0.06) 58%,
              rgba(139,92,246,0.00) 75%);
  filter: blur(16px);
  z-index: 0;
}
.logo-wrap img{
  position: relative;
  z-index: 1;
  /* soften the logo drop shadow a bit to match the subtle glow */
  filter: drop-shadow(0 4px 14px rgba(139,92,246,0.22));
}

/* keep hover effect (slightly brighter but not too strong) */
.clickable-logo:hover{
  transform: scale(1.03);
  filter: drop-shadow(0 8px 26px rgba(139,92,246,0.30));
}

.logo-wrap{ position: relative; }
.logo-wrap::before{
  content: "";
  position: absolute;
  inset: 20% 22%;                           /* tighter glow */
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
              rgba(139,92,246,0.14) 0%,
              rgba(139,92,246,0.08) 38%,
              rgba(139,92,246,0.04) 58%,
              rgba(139,92,246,0.00) 78%);
  filter: blur(12px);                        /* less spread */
  z-index: 0;
}

.modal-close {
  position:absolute; top:.5rem; right:.5rem;
  width: 28px; height: 28px; border-radius: 999px;
  display:flex; align-items:center; justify-content:center;
  border:none; background:#8b5cf6; color:#fff; cursor:pointer;
  font-size: 16px; line-height: 1;
  transition: transform .18s ease, box-shadow .25s ease, background .18s ease, rotate .25s ease;
}
.modal-close:hover{
  background:#9b87f5;
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(139,92,246,.15);
  rotate: 90deg;
}

/* === Popup: vždy uprostřed a ANIMACE zdola → nahoru === */
.modal-backdrop{
  position: fixed; inset: 0;
  display: none;
  align-items: center;              /* centrování vertikálně */
  justify-content: center;          /* centrování horizontálně */
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 9999;
}
.modal-backdrop.active{ display:flex; opacity:1; }

/* ==== ULTRA-COMPACT STACK MODE (2× menší) ==== */
/* ==== STACK (<=720px): reálné zmenšení, bez scale ==== */
@media (max-width: 720px) {
  body { padding: min(8px, 1.2svh) min(8px, 1.5vw) !important; }

  .auth-wrapper{
    flex-direction: column !important;
    align-items: center !important;
    gap: 18px !important;                 /* malá mezera mezi kartami */
  }

 .auth-wrapper > .card {
    width: min(78vw, 280px) !important;
    min-height: 200px !important;
    padding: 0.6rem 0.75rem !important;
    border-radius: 0.6rem !important;
    box-shadow: 0 0 10px rgba(139,92,246,.15) !important;
    transform: none !important;
    margin: 0 !important;
  }

  /* kompaktnější typografie */
  .card h2{ font-size: 0.9rem !important; margin-bottom: .25rem !important; }
  .card p { font-size: 0.8rem !important;  margin-bottom: .4rem !important; }

  /* menší inputy – pořád na střed a na 100 % šířky karty */
  .card input{
    display: block; 
    width: calc(92%);
    height: 26px !important;
    padding: 0 .55rem !important;
    margin: .35rem auto !important;
    font-size: .85rem !important;
    border-radius: .45rem !important;
    box-sizing: border-box !important;
  }

  /* menší tlačítka */
  .card .card__actions > button{
    width: 92% !important;
    height: 32px !important;
    font-size: .85rem !important;
    border-radius: .45rem !important;
    padding: 0.45rem 0 !important;
  }

  /* logo v pravé kartě také menší */
  .logo-wrap{ min-height: 110px !important; }
  .logo-wrap img{ max-width: 74% !important; max-height: 54% !important; }
}

/* Extra nízké displeje – ještě o něco menší reálná velikost */
@media (max-width: 720px) and (max-height: 700px){
  .auth-wrapper > .card{
    width: min(76vw, 270px) !important;
    min-height: 185px !important;
    padding: 0.5rem 0.65rem !important;
  }
  .auth-wrapper { gap: 14px !important; }
}
@media (max-width: 720px) and (max-height: 640px){
  .auth-wrapper > .card{
    width: min(74vw, 260px) !important;
    min-height: 170px !important;
    padding: 0.45rem 0.6rem !important;
  }
  .auth-wrapper{ gap: 10px !important; }
}

/* === Vertikální centrování na mobilech === */
@media (max-width: 720px) {
  body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100svh; /* bezpečné výškové jednotky */
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-wrapper {
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
  }
}

/* === Mobil: vždy vystředit obsah na výšku === */
@media (max-width: 720px){
  html, body{
    height: 100dvh;                 /* stabilní viewport na mobilech */
    min-height: 100dvh;
    margin: 0;
  }
  body{
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-x: hidden;
  }
  .auth-wrapper{
    width: 100%;
    max-width: 920px;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;   /* <- klíč k vertikálnímu středu */
    gap: 16px;                             /* tvá požadovaná mezera */
    min-height: 100dvh;                    /* wrapper sám zabere výšku obrazovky */
  }

  /* Logo – neplave, nevytváří baseline mezeru */
  .logo-wrap{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
  }
  .logo-wrap img{
    display: block;            /* odstraní baseline posun */
    max-width: 78%;
    max-height: 58%;
    margin: 0 auto;
  }

  /* Zrušíme jakýkoliv dřívější scale/transform, který rozhodí střed */
  .card{
    transform: none !important;
  }
}

/* ============= MOBILE LAYOUT (<= 720px) – clean profile ============= */

/* Logo vycentrovat uprostřed karty, bez zvětšování karty */
@media (max-width: 720px){
  .card .logo-wrap{
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    /* klíč: ať si nevezme umělou výšku a posadí se doprostřed */
    height: auto !important;
    min-height: 0 !important;
    margin-block: auto !important;   /* vytlačí se přesně do středu mezi obsah nahoře a akce dole */
    padding: 0 !important;
  }
  .card .logo-wrap img{
    display: block !important;
    margin: 0 auto !important;
    max-width: 78% !important;
    max-height: 58% !important;
  }
  .card__head {
    padding-top: 0.5rem !important;
  }
  .link-center {
    font-size: 0.85rem !important; /* podobná velikost jako placeholder v inputu */
    opacity: 0.9;
  }
  .modal {
    width: 85% !important;
    max-width: 300px !important;
    padding: 0.8rem 0.9rem 0.75rem !important;
    border-radius: 0.6rem !important;
  }

  .modal h2, 
  .modal .accent {
    font-size: 0.95rem !important; /* menší titulek */
  }

  .modal p {
    font-size: 0.8rem !important; /* menší text pod titulkem */
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }

  .modal input {
    font-size: 0.85rem !important;
    padding: 0.55rem 0.65rem !important;
    border-radius: 0.45rem !important;
  }

  .modal-actions .primary-wide {
    width: 70% !important;                /* stejná šířka jako Přihlásit se */
    height: 38px !important;
    font-size: 0.9rem !important;
    border-radius: 0.45rem !important;
    background: #8b5cf6 !important;
    transition: background-color .3s ease, box-shadow .3s ease, transform .2s ease;
  }

  .modal-actions .primary-wide:hover {
    background: #a78bfa !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(139,92,246,.3);
  }

  .modal-close {
    top: 0.4rem !important;
    right: 0.4rem !important;
    width: 22px !important;       /* menší kolečko */
    height: 22px !important;
    font-size: 13px !important;   /* menší křížek */
    border-radius: 999px !important;
    background: #8b5cf6 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform .2s ease, box-shadow .25s ease, background .2s ease, rotate .25s ease !important;
  }

  .modal-close:hover {
    background: #9b87f5 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 0 0 4px rgba(139,92,246,.12) !important;
    rotate: 90deg !important;     /* zachován efekt otočky */
  }
  .modal-actions .primary-wide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  padding: 0 !important;                /* zruší přebytečný vnitřní offset */
  height: 30px !important;              /* sjednoceno s login tlačítkem */
  font-size: 0.9rem !important;
  font-weight: 500 !important;
}
}


/* ===== Slide-in animace karet po načtení ===== */
/* ===== Slide-in animace karet po načtení ===== */
.card { will-change: transform, opacity; }

.card.enter-left,
.card.enter-right {
  opacity: 0;
  transform: translateX(0); /* výchozí – přepíšou animace */
}

:root{
  --card-slide-dur: 0.95s;          /* dříve 0.50s  → trvá déle */
  --card-slide-delay-left:  .14s;   /* dříve .05s  */
  --card-slide-delay-right: .22s;   /* dříve .12s  */
}

body.cards-ready .card.enter-left {
  animation: slideInLeft var(--card-slide-dur) cubic-bezier(.22,.75,.25,1) var(--card-slide-delay-left) forwards;
}
body.cards-ready .card.enter-right {
  animation: slideInRight var(--card-slide-dur) cubic-bezier(.22,.75,.25,1) var(--card-slide-delay-right) forwards;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ====== Mobilní varianta: karty pod sebou ====== */
/* Uprav šířku breakpointu podle toho, kde se ti layout reálně láme */
@media (max-width: 720px){
  /* přepíšeme animace pouze pro stacked layout */
  body.cards-ready .card.enter-left {
    animation: slideInTop var(--card-slide-dur, 2s) cubic-bezier(.22,.75,.25,1) var(--card-slide-delay-left, .14s) forwards;
  }
  body.cards-ready .card.enter-right {
    animation: slideInBottom var(--card-slide-dur, 2s) cubic-bezier(.22,.75,.25,1) var(--card-slide-delay-right, .22s) forwards;
  }
}

/* Keyframes pro mobilní směr shora/zdola */
@keyframes slideInTop {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInBottom {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}




