/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body { height: 100%; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 0%,
      #0c2844 0,
      #071a32 32%,
      #040c1c 65%,
      #020712 100%);
  color: #e6f4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ===== SCENA ===== */
.hero {
  position: relative;
  width: 100%;
  max-width: 960px;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

/* ===== OKRĄG Z CSS ===== */
.bg-circle {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 20%,
      rgba(12, 42, 73, 0.35) 0,
      rgba(7, 28, 53, 0.25) 35%,
      rgba(4, 18, 37, 0.16) 55%,
      rgba(2, 10, 24, 0.05) 70%,
      rgba(2, 7, 18, 0) 78%);
  border: 1px solid rgba(25, 60, 92, 0.35);
  box-shadow:
    0 0 0 rgba(0, 0, 0, 0),
    0 0 80px rgba(0, 0, 0, 0.65) inset;

  opacity: 0;
  animation: bgFadeIn 1.2s ease-out forwards;
}

@keyframes bgFadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(1.02); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== LOGO ===== */
.logo-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  z-index: 2;
}

.logo-u1, .logo-text {
  display: block;
  max-width: 260px;
  height: auto;
  user-select: none;
}

.logo-u1 {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  animation: logoIn 0.9s cubic-bezier(.21,.84,.45,1.02) forwards;
  animation-delay: 0.6s;
}

.logo-text {
  opacity: 0;
  transform: translateY(10px);
  animation: logoInText 0.9s cubic-bezier(.21,.84,.45,1.02) forwards;
  animation-delay: 1.2s;
}

@keyframes logoIn {
  from { opacity: 0; transform: translateY(14px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

@keyframes logoInText {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo-wrapper:hover .logo-u1,
.logo-wrapper:hover .logo-text {
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.55));
}

/* ===== PANEL LOGOWANIA ===== */
.login-panel-wrapper {
  position: relative;
  margin-top: 22px;
  z-index: 1;
}

.login-panel {
  position: relative;
  margin: 0 auto;
  max-width: 340px;
  padding: 18px 18px 20px;
  border-radius: 14px;
  background: rgba(5, 16, 32, 0.96);
  border: 1px solid rgba(42, 93, 145, 0.9);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);

  opacity: 0;
  transform: translateY(-22px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease, max-height 0.5s ease;
}

.hero.login-open .login-panel {
  opacity: 1;
  transform: translateY(0);
  max-height: 400px;
  pointer-events: auto;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  text-align: left;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(70, 120, 175, 0.9);
  background: #040b18;
  color: #e9f4ff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input::placeholder { color: #6488af; }

input:focus {
  border-color: #1bbdff;
  box-shadow: 0 0 0 1px rgba(27, 189, 255, 0.45);
  background: #050f21;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.btn-primary {
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #29e0ff, #008cff);
  color: #02101f;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.9);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
}

/* ===== RESPONSYWNOŚĆ ===== */
@media (max-width: 640px) {
  .hero { padding: 18px; }
  .bg-circle { width: 360px; height: 360px; }
  .logo-u1, .logo-text { max-width: 220px; }
  .login-panel { max-width: 100%; padding: 16px 14px 18px; }
}

@media (max-width: 420px) {
  .bg-circle { width: 300px; height: 300px; }
  .form-footer { align-items: stretch; }
  .btn-primary { width: 100%; }
}
