html, body {
  margin: 0;
  padding: 0;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #fff;
}

body.page-transitioning {
  overflow: hidden;
  pointer-events: none;
}

.bird-container {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
  flex-shrink: 0;
}
.bird-icon {
  width: 70px;
  height: 70px;
  filter: brightness(0) invert(1);
}
.eagle-bg { background-image: linear-gradient(-45deg, #8B0000, #FF4500, #DC143C, #FF6347); }
.parrot-bg { background-image: linear-gradient(-45deg, #FFD700, #FFA500, #FFFF00, #FFCC00); }
.pigeon-bg { background-image: linear-gradient(-45deg, #228B22, #7FFF00, #32CD32, #ADFF2F); }
.owl-bg { background-image: linear-gradient(-45deg, #1E90FF, #00BFFF, #87CEFA, #4682B4); }
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card-custom {
  margin-top: -100px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  z-index: 3;
  position: relative;
}

.question-card {
  display: none;
  background: #fff;
  padding: 2rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  margin: 0 auto;
  max-width: 700px;
  border-radius: 1rem;
}
.question-card.active {
  display: block;
}
.answer-btn {
  text-align: left;
  white-space: normal;
  border-radius: 0.5rem;
  padding: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.answer-btn.active {
  background-color: #d83f87 !important;
  color: white !important;
}

.quiz-container {
  position: relative;
  margin-top: -150px;
  padding: 2rem;
  border-radius: 1rem;
}

@media (max-width: 576px) {
  .quiz-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.btn-outline-light.custom-hover:hover {
  background-color: white;
  color: #2A1B3D !important;
  transition: all 0.2s ease-in-out;
}

.bird-colored {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem auto;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.gradient-orzel { background: linear-gradient(to bottom, #FF5252, #D32F2F); }
.gradient-papuga { background: linear-gradient(to bottom, #FFF176, #FFD54F); }
gradient-golab { background: linear-gradient(to bottom, #C5E1A5, #81C784); }
.gradient-sowa { background: linear-gradient(to bottom, #90CAF9, #42A5F5); }

.bird-colored img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: brightness(0) invert(1);
  z-index: 2;
}

.custom-hover { transition: background-color 0.2s ease-in-out; cursor: pointer; }
.btn-change { background-color: #44318D; }
.btn-change:hover { background-color: #5e47c2; }
.btn-clear { background-color: #D83F87; }
.btn-clear:hover { background-color: #e95c9d; }
.btn-logout { background-color: #2A1B3D; }
.btn-logout:hover { background-color: #3b2a57; }

footer {
  text-align: center;
  margin-top: auto;
  padding: 1rem 0;
  font-size: 0.9rem;
}

.hero-section-header {
  position: relative;
  height: 50vh;
  background: linear-gradient(135deg, #D83F87, #44318D);
  border-bottom-left-radius: 60px;
  border-bottom-right-radius: 60px;
  overflow: hidden;
  z-index: 0;
}

.hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

.quiz-progress-container {
  height: 10px;
  margin-bottom: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.quiz-progress-bar {
  background-color: rgba(255,255,255,0.3);
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
}
.quiz-progress-fill {
  background-color: white;
  height: 100%;
  width: 0%;
  border-radius: 20px;
  transition: width 0.4s ease-in-out;
}

.bird-container.bird-large {
  width: 120px;
  height: 120px;
}
.bird-container.bird-xl {
  width: 170px;
  height: 170px;
  z-index: 3;
  position: relative;
}

.bird-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  justify-items: center;
  margin-top: -100px;
  z-index: 3;
  position: relative;
}

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

.float-bird {
  animation: float 4s ease-in-out infinite;
}
.float-bird.delay-0 { animation-delay: 0s; }
.float-bird.delay-1 { animation-delay: 0.5s; }
.float-bird.delay-2 { animation-delay: 1s; }
.float-bird.delay-3 { animation-delay: 1.5s; }

@media (max-width: 768px) {
  .bird-container.bird-xl { width: 70px; height: 70px; }
}
@media (max-width: 991.98px) {
  .bird-container.bird-large { width: 70px; height: 70px; }
}
@media (max-width: 576px) {
  .hero-section-header {
    height: 300px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }
  .hero-content h1 { font-size: 1.75rem; }
  .hero-content p { font-size: 1rem; }
  .card-custom {
    margin-top: -100px;
    border-radius: 1rem;
  }
  .bird-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .quiz-container {
    flex: 1;
    display: flex;
    margin-top: -80px;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
    height: 100%;
  }
  .question-card {
    background: #fff;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    border-radius: 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
  }
}

.homepage-hero {
  height: 55vh;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, rgba(216, 63, 135, 0.7), rgba(68, 49, 141, 0.7));
  z-index: 1;
}

.homepage-hero .navbar {
  z-index: 2;
}

.homepage-hero .hero-content {
  z-index: 2;
  padding: 2rem;
  color: #fff;
}

@media (max-width: 768px) {
  .hero-video { object-fit: cover; }
  .hero-content h1 { font-size: 2rem; }
  .hero-content p { font-size: 1rem; }

  .offcanvas-body {
  background: #44318D !important;
  color: #fff;
  transition: background 0.3s;
  z-index: 13000 !important;
}

.offcanvas-header{
  background: #44318D !important;
  color: #fff;
  transition: background 0.3s;
  z-index: 13000 !important;
}
}


 /* === GLASSMORPHIC CARD === */
.card-custom {
  margin-top: -220px;
  max-width: 100%;
  padding: 3rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  animation: fadeInUp 0.8s ease-out;
  color: #fff;
  text-align: center;
}

/* === Fade in from bottom === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Ulepszenia tekstowe === */
.card-custom p {
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
  color: #f0f0f0;

}

.card-custom strong {
  color: #ffffff;
}

/* === Formularz === */
.card-custom input.form-control {
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}

.card-custom input.form-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px #d83f87;
}

.home-password-field {
  border: 1px solid #5d5d5d !important;
}

/* === Przycisk === */
.card-custom button.btn-primary {
  background-color: #44318D;
  border: none;
  padding: 0.5rem 2rem;
  font-weight: 600;
  border-radius: 0.5rem;
}

.card-custom button.btn-primary:hover {
  background-color: #5e47c2;
}

/* === Responsive tweak === */
@media (max-width: 768px) {
  .card-custom {
    padding: 2rem 1.5rem;
  }

  .card-custom p {
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .card-custom {
    margin-top: -190px;
  }
}

.home-password-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

/* === PAGE TRANSITIONS === */
.page-transition {
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 14000;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  background: radial-gradient(circle at 20% 20%, rgba(216, 63, 135, 0.35), rgba(68, 49, 141, 0.6)),
              radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08), rgba(68, 49, 141, 0.45));
  background-size: 150% 150%;
  animation: loaderGradient 6s ease-in-out infinite;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.page-transition:not(.is-active) {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.page-transition__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2.25rem 2.5rem;
  border-radius: 1.5rem;
  background: rgba(15, 10, 28, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #fff;
  min-width: 260px;
}

.page-transition__logo {
  width: 100px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.page-transition__logo img {
  max-width: 100%;
  height: auto;
}

.page-transition__spinner {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  animation: pageSpin 1.05s linear infinite;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.page-transition__spinner::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(216, 63, 135, 0.8), rgba(68, 49, 141, 0.9));
  filter: blur(6px);
  opacity: 0.55;
}

.page-transition__text {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 1rem;
  color: #f5f1ff;
}

@keyframes pageSpin {
  to { transform: rotate(360deg); }
}

@keyframes loaderGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.result-wrapper {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
}

.result-section {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.bird-video {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Navbar nie sticky tylko na stronie z wynikami */
body.page-result .navbar {
  display: none;
}

/* Transparentny navbar domyślnie */
.navbar {
  background-color: transparent !important;
  box-shadow: none !important;
  transition: background-color 0.3s;
  z-index: 12000 !important;
}

/* Fioletowy navbar po scrollu (desktop i mobile) */
.navbar.scrolled {
  background-color: #44318D !important;
  box-shadow: 0 2px 16px rgba(68,49,141,0.12);
}

.language-dropdown .dropdown-toggle::after {
  margin-left: 0.5rem;
}

.offcanvas .language-dropdown .dropdown-toggle {
  justify-content: space-between;
}

.offcanvas .language-dropdown .dropdown-menu {
  width: 100%;
}

.language-dropdown .dropdown-menu {
  background-color: #44318D;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  padding: 0.5rem;
  min-width: 8rem;
}

.language-dropdown .dropdown-item {
  color: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.language-dropdown .dropdown-item:hover,
.language-dropdown .dropdown-item:focus {
  background-color: #fff;
  color: #2A1B3D;
}

/* Offcanvas menu: fioletowe tło i najwyższy z-index */
.offcanvas.bg-blur-purple {
  background: #44318D !important;
  color: #fff;
  z-index: 13000 !important;
}

/* Przyciski inline i wyśrodkowane pionowo na desktopie */
@media (min-width: 992px) {
  .navbar-nav {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 100%;
    gap: 1rem;
  }
  .navbar-nav .nav-item {
    margin-bottom: 0 !important;
  }
  .navbar-nav .btn {
    width: auto !important;
    margin-bottom: 0 !important;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    height: 48px;
  }
}

/* Zawsze navbar i offcanvas na wierzchu */
.navbar,
.offcanvas {
  z-index: 13000 !important;
}

/* Language choice cards */
.language-grid .language-button {
  border-width: 2px;
  border-radius: 16px;
  border-color: #e4dbff;
  background: #f8f9ff;
  color: #2a1b3d;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.language-grid .language-button:hover,
.language-grid .language-button:focus {
  border-color: transparent;
  background: linear-gradient(135deg, #d83f87 0%, #9d4edd 100%);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(42, 27, 61, 0.12);
}

.language-grid .language-button .small {
  color: #7a7893 !important;
}

.language-grid .language-button:hover .small,
.language-grid .language-button:focus .small {
  color: rgba(255, 255, 255, 0.88) !important;
}

.language-grid .language-flag {
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.04em;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #d83f87 0%, #44318d 100%);
  box-shadow: 0 10px 20px rgba(68, 49, 141, 0.2);
}

.language-grid .language-arrow {
  font-size: 1.25rem;
  color: #5a3aaa;
  font-weight: 600;
}

.language-grid .language-button:hover .language-arrow,
.language-grid .language-button:focus .language-arrow {
  color: #fff;
}

.language-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #d83f87 0%, #44318d 100%);
  display: flex;
  align-items: center;
  padding: 3rem 1rem;
}

.language-card {
  border: none;
  border-radius: 24px;
  padding: 3rem 3rem 2.5rem 3rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.language-card__header {
  max-width: 540px;
  margin: 0 auto;
}

.language-icon {
  width: 70px;
  height: 70px;
  color: #d83f87;
  font-size: 1.75rem;
}

@media (max-width: 576px) {
  .language-card {
    padding: 2.25rem 1.75rem 2rem 1.75rem;
  }
}
