/* 
 * Jergofy - Login Page Design
 * Tmavý design s červenými akcenty - konzistentní s hlavním designem
 */

/* ----- ZÁKLADNÍ STYLY A EFEKTY ----- */
:root {
  --primary: #ff3c2a;
  --primary-hover: #ff5945;
  --primary-dark: #e82918;
  --accent: #ff6a00;
  --dark: #0d0d0d;
  --dark-2: #151515;
  --dark-3: #202020;
  --light: #ffffff;
  --light-2: rgba(255, 255, 255, 0.8);
  --light-3: rgba(255, 255, 255, 0.6);
  --red-glow: rgba(255, 60, 42, 0.3);
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --spacing-small: 15px;
  --spacing-medium: 30px;
  --spacing-large: 60px;
  --spacing-xlarge: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-y: auto;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--dark);
  color: var(--light);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100%;
  overflow-y: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* ----- LOGIN CONTAINER ----- */
.login-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--dark);
  position: relative;
}

/* ----- LEVÁ STRANA S ILUSTRACÍ ----- */
.login-illustration {
  flex: 1;
  background: var(--dark); /* Sjednocené pozadí */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 40px;
}

.login-illustration::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 60, 42, 0.1), transparent 70%);
  pointer-events: none;
}

.illustration-content {
  width: 100%;
  max-width: 580px;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.logo-area {
  margin-bottom: 60px;
  display: flex;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--light);
  text-decoration: none;
  position: relative;
  padding: 8px 0;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  transition: var(--transition-fast);
  border-radius: 3px;
}

.logo:hover {
  color: var(--light);
  text-decoration: none;
}

.logo:hover::after {
  width: 100%;
}

.illustration-graphic {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.circles-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.circle {
  position: absolute;
  border-radius: 50%;
}

.circle-1 {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(255, 60, 42, 0.15), transparent 70%);
}

.circle-2 {
  width: 220px;
  height: 220px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(255, 60, 42, 0.1), transparent 70%);
  opacity: 0.7;
}

.circle-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(255, 60, 42, 0.15), transparent 70%);
  opacity: 0.5;
}

/* Pouze formulářové prvky mají vynucenou plnou viditelnost */
.form-group, .form-options, .login-button, .register-link {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.path-container {
  position: relative;
  width: 300px;
  height: 300px;
  z-index: 2;
}

.path-svg {
  width: 100%;
  height: 100%;
}

.main-path {
  stroke-dasharray: 580;
  stroke-dashoffset: 580;
  animation: draw-path 4s forwards ease-in-out infinite alternate;
}

@keyframes draw-path {
  0% {
    stroke-dashoffset: 580;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.path-point {
  opacity: 0.8;
  filter: drop-shadow(0 0 5px rgba(255, 60, 42, 0.7));
  transform-origin: center;
}

/* Odstraněná animace pro plovoucí ikony */
.floating-icons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.floating-icon {
  position: absolute;
  color: var(--primary);
  filter: drop-shadow(0 0 10px rgba(255, 60, 42, 0.5));
}

.icon-1 {
  top: 25%;
  left: 25%;
  width: 38px;
  height: 38px;
}

.icon-2 {
  top: 30%;
  right: 30%;
  width: 42px;
  height: 42px;
}

.icon-3 {
  bottom: 30%;
  left: 30%;
  width: 40px;
  height: 40px;
}

.icon-4 {
  bottom: 25%;
  right: 25%;
  width: 36px;
  height: 36px;
}

.icon-1 {
  top: 25%;
  left: 25%;
  width: 38px;
  height: 38px;
}

.icon-2 {
  top: 30%;
  right: 30%;
  width: 42px;
  height: 42px;
}

.icon-3 {
  bottom: 30%;
  left: 30%;
  width: 40px;
  height: 40px;
}

.icon-4 {
  bottom: 25%;
  right: 25%;
  width: 36px;
  height: 36px;
}

.illustration-text {
  margin-top: 60px;
  text-align: center;
}

.illustration-text h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--light);
}

.illustration-text p {
  font-size: 18px;
  color: var(--light-2);
  max-width: 450px;
  margin: 0 auto;
}

/* ----- PRAVÁ STRANA S FORMULÁŘEM ----- */
.login-form-container {
  flex: 1;
  background-color: var(--dark); /* Sjednocené pozadí */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: auto;
}

.login-form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEklEQVQImWNgYGD4z0AswK4SAFXuAf8EPy+xAAAAAElFTkSuQmCC');
  background-size: 5px;
  opacity: 0.03;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.login-form-wrapper {
  width: 100%;
  max-width: 450px;
  padding: 40px;
  background-color: var(--dark-3);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 60, 42, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
  transition: var(--transition-medium);
  margin-bottom: 20px; /* Zajistí, že je dost místa dole */
  overflow: visible; /* Aby bylo tlačítko vidět i když je na hranici */
}

.login-form-wrapper:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 35px rgba(255, 60, 42, 0.15);
  border-color: rgba(255, 60, 42, 0.2);
}

.login-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-header h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--light);
  position: relative;
  display: inline-block;
}

.form-header h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 2px;
}

.form-header p {
  color: var(--light-3);
  font-size: 16px;
  margin-top: 20px;
}

/* Flash Messages */
.flash-messages {
  margin-bottom: 25px;
}

.flash-message {
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  animation: flash-appear 0.5s ease;
}

@keyframes flash-appear {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash-error {
  background-color: rgba(255, 60, 42, 0.15);
  border: 1px solid rgba(255, 60, 42, 0.3);
}

.flash-success {
  background-color: rgba(60, 255, 123, 0.15);
  border: 1px solid rgba(60, 255, 123, 0.3);
}

.flash-icon {
  margin-right: 15px;
  flex-shrink: 0;
}

.flash-error .flash-icon {
  color: var(--primary);
}

.flash-success .flash-icon {
  color: #3cff7b;
}

.flash-icon svg {
  width: 24px;
  height: 24px;
}

.flash-content {
  font-size: 14px;
  color: var(--light-2);
}

/* Login Form */
.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--light-2);
  letter-spacing: 0.5px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--light);
  font-size: 16px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 60, 42, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
}

.input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  transition: var(--transition-fast);
  width: 20px;
  height: 20px;
}

.input-wrap:focus-within .input-icon {
  color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 8px;
}

.toggle-password:hover {
  color: var(--light);
}

.toggle-password:focus {
  outline: none;
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  accent-color: var(--primary);
}

.remember-me span {
  font-size: 14px;
  color: var(--light-2);
}

.forgot-password {
  font-size: 14px;
  color: var(--light-3);
  transition: var(--transition-fast);
}

.forgot-password:hover {
  color: var(--primary);
  text-decoration: none;
}

.login-button {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  color: var(--light);
  font-size: 18px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(255, 60, 42, 0.25);
  letter-spacing: 0.5px;
  margin-top: 25px;
  opacity: 1 !important; /* Zajištění, že tlačítko bude vždy viditelné */
  z-index: 100; /* Zvýšit z-index pro jistotu */
  visibility: visible !important; /* Zajištění, že tlačítko bude vždy viditelné */
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: var(--transition-medium);
}

.login-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(255, 60, 42, 0.4);
}

.login-button:hover::before {
  transform: translateX(100%);
}

.login-button:active {
  transform: translateY(-2px);
}

.login-button:focus {
  outline: none;
}

.login-arrow {
  display: inline-block;
  font-size: 22px;
  line-height: 1;
  transform: translateY(1px);
  margin-left: 5px;
  transition: var(--transition-fast);
}

.login-button:hover .login-arrow {
  transform: translateX(5px) translateY(1px);
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: var(--transition-medium);
}

.login-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(255, 60, 42, 0.4);
}

.login-button:hover::before {
  transform: translateX(100%);
}

.login-button:active {
  transform: translateY(-2px);
}

.login-button:focus {
  outline: none;
}

.login-button svg {
  width: 20px;
  height: 20px;
  margin-left: 10px;
  transition: var(--transition-fast);
}

.login-button:hover svg {
  transform: translateX(5px);
}

.register-link {
  text-align: center;
  margin-top: 30px;
}

.register-link p {
  font-size: 15px;
  color: var(--light-3);
}

.register-link a {
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition-fast);
}

.register-link a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* Responzivní design */
@media (max-width: 1200px) {
  .login-container {
    height: auto;
    min-height: 100%;
  }
  
  .login-form-wrapper {
    padding: 30px;
  }
  
  .illustration-text h2 {
    font-size: 28px;
  }
  
  .illustration-text p {
    font-size: 16px;
  }
  
  .path-container {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 992px) {
  .login-container {
    flex-direction: column-reverse; /* Změnit pořadí - formulář nahoře, ilustrace dole */
    overflow-y: auto;
    min-height: 100vh;
    height: auto;
  }
  
  .login-illustration {
    flex: none; /* Nefixovat flex, aby měl pouze potřebnou výšku */
    padding: 20px 15px;
    min-height: 30vh; /* Zmenšit výšku ilustrace */
    max-height: 30vh; /* Omezit maximální výšku */
    order: 2; /* Zajistí, že ilustrace bude vždy dole */
  }
  
  .login-form-container {
    flex: none; /* Nefixovat flex, aby měl pouze potřebnou výšku */
    padding: 30px 20px;
    order: 1; /* Zajistí, že formulář bude vždy nahoře */
  }
  
  .logo-area {
    display: none; /* Skrýt logo v ilustrační části */
  }
  
  .illustration-content {
    max-width: 100%;
  }
  
  /* Přidat logo nad formulář */
  .login-form-wrapper::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }
  
  /* Přidat značku JERGOFY nad formulář */
  .form-header::before {
    content: 'JERGOFY';
    display: block;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--light);
    margin-bottom: 20px;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .login-illustration {
    padding: 20px 15px;
    min-height: 28vh; /* Ještě menší výška ilustrace na mobilu */
    max-height: 28vh;
  }
  
  .login-form-container {
    padding: 20px 15px 20px;
  }
  
  .login-form-wrapper {
    padding: 25px 20px;
    margin-top: 10px; /* Posunout formulář víc nahoru */
    margin-bottom: 20px;
  }
  
  .form-header h1 {
    font-size: 26px;
  }
  
  .form-header p {
    font-size: 15px;
  }
  
  .path-container {
    width: 140px; /* Menší ilustrace */
    height: 140px;
  }
  
  .form-options {
    flex-direction: row; /* Na menších mobilech ponechat v řádku */
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  
  .input-wrap input {
    padding: 12px 12px 12px 40px;
    font-size: 16px;
  }
  
  .login-button {
    padding: 14px;
    font-size: 16px;
  }
  
  .floating-icon {
    transform: scale(0.7); /* Menší ikony */
  }
  
  /* Zmenšit kruhové animace */
  .circle-1 {
    width: 180px;
    height: 180px;
  }
  
  .circle-2 {
    width: 130px;
    height: 130px;
  }
  
  .circle-3 {
    width: 80px;
    height: 80px;
  }
  
  /* Zabránit přibližování na mobilních zařízeních */
  input[type="email"],
  input[type="password"],
  input[type="text"] {
    font-size: 16px !important; /* Zabraňuje iOS přibližování */
  }
}

@media (max-width: 480px) {
  html, body {
    overflow-y: auto !important; /* Vynutit scrollování */
  }
  
  .login-container {
    min-height: 100vh;
    overflow-y: auto !important;
  }
  
  .login-illustration {
    min-height: 25vh; /* Velmi malá výška pro malé displeje */
    max-height: 25vh;
    padding: 15px 10px;
  }
  
  .login-form-container {
    padding: 10px 10px 20px;
  }
  
  .path-container {
    width: 120px; /* Ještě menší ilustrace pro malé displeje */
    height: 120px;
  }
  
  .login-form-wrapper {
    padding: 20px 15px;
    margin-top: 10px;
    max-height: none !important; /* Zrušit případné omezení výšky */
    overflow: visible !important; /* Zajistit, že obsah nebude oříznut */
  }
  
  .form-header::before {
    font-size: 24px; /* Menší logo */
    margin-bottom: 15px;
  }
  
  .form-header h1 {
    font-size: 22px;
  }
  
  .form-header p {
    font-size: 14px;
    margin-top: 12px;
  }
  
  /* Další zmenšení animačních prvků */
  .circle-1 {
    width: 150px;
    height: 150px;
  }
  
  .circle-2 {
    width: 100px;
    height: 100px;
  }
  
  .circle-3 {
    width: 70px;
    height: 70px;
  }
  
  .floating-icon {
    transform: scale(0.6);
  }
  
  /* Zmenšit všechny mezery */
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-options {
    margin-bottom: 15px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .remember-me span,
  .forgot-password {
    font-size: 12px;
  }
  
  .register-link p {
    font-size: 13px;
  }
  
  /* Zajištění viditelnosti tlačítka */
  .login-button {
    margin: 20px 0 15px;
    font-size: 16px !important;
    padding: 14px !important;
    position: relative !important;
    z-index: 1000 !important;
    display: block !important;
  }
}