* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 100px;
    display: flex;
    align-items: center;
    z-index: 99;
    backdrop-filter: blur(20px);
}

.logo {
    font-size: 30px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    margin-right: auto;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin-left: 40px;
}

.user-auth {
    margin-left: 40px;
}

.user-auth .login-btn-modal {
    height: 40px;
    padding: 0 35px;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 40px;
    font-size: 16px;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: .5s;
}

.user-auth .login-btn-modal:hover {
    background: #fff;
    color: #222;
}

section {
    min-height: 100vh;
    background: url('background.jpg') no-repeat;
    background-size: cover;
    background-position: center;
    padding: 0 100px;
}

section h1 {
    position: absolute;
    bottom: 40px;
    font-size: 25px;
    color: #fff;
    font-weight: 600;
}

/* ekran powitalny */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.welcome-box {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
}

.welcome-box button {
    margin-top: 20px;
}
/* koniec ekranu powitalnego */


.auth-modal {
    position: fixed;
    width: 420px;
    height: 440px;
    background: rgba(0, 0, 0, .3);
    border: 2px solid rgba(255, 255, 255, .3);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .3);
    backdrop-filter: blur(20px);
    color: #fff;
    inset: 0;
    margin: auto;
    display: flex;
    align-items: center;
    overflow: hidden;
    transform: scale(1);
    transition: height .2s ease, transform .5s ease;
}

.auth-modal.show {
    transform: scale(1);
}

.auth-modal.slide {
    height: 520px;
}

.auth-modal .form-box {
    width: 100%;
    padding: 40px;
}

.auth-modal .form-box.login,
.auth-modal.slide .form-box.register {
    transform: translateX(0);
    transition: transform .18s ease;
}

.auth-modal.slide .form-box.login {
    transform: translateX(-400px);
    transition: none;
}

.auth-modal .form-box.register {
    position: absolute;
    transform: translateX(400px);
}

.form-box h2 {
    font-size: 35px;
    text-align: center;
}

.input-box {
    position: relative;
    width: 100%;
    height: 50px;
    margin: 30px 0;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .3);
    outline: none;
    border-radius: 40px;
    font-size: 16px;
    color: #fff;
    padding: 20px 45px 20px 20px;
}

.input-box input::placeholder {
    color: #fff;
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.btn {
    width: 100%;
    height: 45px;
    background: #fff;
    border-radius: 40px;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    font-size: 16px;
    color: #222;
    font-weight: 500;
    cursor: pointer;
}

.form-box p {
    font-size: 14.5px;
    text-align: center;
    margin: 25px 0 10px;
}

.form-box p a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.form-box p a:hover {
    text-decoration: underline;
}

.auth-modal .close-btn-modal {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background: #fff;
    border: none;
    border-bottom-left-radius: 20px;
    font-size: 35px;
    color: #222;
    cursor: pointer;
    z-index: 1;
}

.profile-box .avatar-circle {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    line-height: 40px;
    text-align: center;
    font-size: 25px;
    color: #222;
    font-weight: 600;
    cursor: pointer;
}

.profile-box .dropdown {
    position: absolute;
    top: 85px;
    right: 100px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: .5s;
}

.profile-box.show .dropdown {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.profile-box .dropdown a {
    padding: 6px 12px;
    border-radius: 4px;
    color: #222;
    text-decoration: none;
    font-weight: 500;
    margin: 2px 0;
    transition: .2s;
}

.profile-box .dropdown a:hover {
    background: #eee;
}

.alert-box {
    position: fixed;
    inset: 0;
    top: 35px;
    margin: 0 auto;
    width: 350px;
    height: 70px;
    background: #fff;
    border-radius: 6px;
    padding: 0 15px;
    z-index: 100;
    overflow: hidden;
    transform: translateY(calc(-100% - 35px));
    transition: .5s ease;
}

.alert-box.show {
    transform: translateY(0);
}

.alert {
    display: flex;
    align-items: center;
    height: 100%;
    color: #222;
    font-weight: 500;
}

.alert::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #0abf30;
    animation: progress 6s linear forwards;
}

.alert.error::after {
    background: #f00;
}

@keyframes progress {
    100% {
        width: 0;
    }
}

.alert i {
    font-size: 35px;
    color: #0abf30;
    margin-right: 8px;
}

.alert.error i {
    color: #f00;
}

.remember-box {
    margin: -10px 0 20px;
    padding-left: 4px;
}

.remember-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.remember-check {
    width: 16px;
    height: 16px;
    accent-color: #93c5fd;
    cursor: pointer;
}

.remember-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    user-select: none;
}

/* ============================================
   MODAL INVITATION — dodaj do style.css
   przed sekcją RESPONSIVE
   ============================================ */

/* --- Invitation: układ ogólny --- */
.auth-modal.inv .form-box.invitation {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 30px 32px 20px;
}

.auth-modal .form-box.invitation {
    display: none;
}

.auth-modal.show.inv .form-box.login,
.auth-modal.show.inv .form-box.register {
    display: none !important;
}

.auth-modal.inv .close-btn-modal {
    display: none;
}

/* --- Invitation: nagłówek --- */
.form-box.invitation h2 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 18px;
    flex-shrink: 0;
}

/* --- Invitation: scrollowalny obszar treści --- */
.inv-scroll {
    flex: 1 1 0;
    overflow-y: auto;
    min-height: 0;
    padding-right: 12px;
}

/* Scrollbar — subtelny, dopasowany do ciemnego tła */
.inv-scroll::-webkit-scrollbar {
    width: 5px;
}
.inv-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.inv-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border-radius: 10px;
}

/* --- Invitation: treść --- */
.inv-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.inv-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.inv-icon {
    flex-shrink: 0;
    color: #93c5fd;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 1px;
}

.inv-item p {
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
    margin: 0;
    text-align: justify;
}

.inv-item em {
    color: rgba(255, 255, 255, .55);
    font-style: italic;
}

/* --- Invitation: stopka (checkbox + przycisk) --- */
.inv-footer {
    flex-shrink: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inv-remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    align-self: center;
}

.inv-remember-check {
    width: 15px;
    height: 15px;
    accent-color: #93c5fd;
    cursor: pointer;
}

.inv-remember-text {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    user-select: none;
}

.inv-btn-next {
    background: #3b82f6 !important;
    color: #fff !important;
    font-weight: 600;
    letter-spacing: .3px;
    transition: background .2s;
}

.inv-btn-next:hover {
    background: #2563eb !important;
}

/* --- Wysokość modala dla invitation --- */
.auth-modal.inv {
    height: 540px !important;
}

/* ============================================
   RESPONSIVE – dodaj na końcu style.css
   ============================================ */

/* ---------- Telefony ---------- */
@media (max-width: 480px) {

  /* Header – mniejszy na telefonie */
  header {
    padding: 6px 16px;
  }

  .logo {
    font-size: 20px;
  }

  nav a {
    margin-left: 14px;
    font-size: 13px;
  }

  .user-auth {
    margin-left: 16px;
  }

  .user-auth .login-btn-modal {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
  }

  /* Sekcja tła */
  section {
    padding: 0 16px;
  }

  section h1 {
    font-size: 20px;
    bottom: 20px;
  }

  /* ===== MODAL – pełna szerokość + poniżej headera ===== */
  .auth-modal {
    inset: unset !important;
    position: fixed;
    top: 44px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    width: calc(100% - 24px) !important;
    max-width: 420px;
    height: auto !important;
    min-height: 440px;
    max-height: calc(100dvh - 54px);
    border-radius: 16px;
  }

  .auth-modal.slide {
    height: auto !important;
    min-height: 480px;
  }

  /* Formularze logowania/rejestracji */
  .auth-modal .form-box {
    padding: 28px 20px;
  }

  .form-box h2 {
    font-size: 28px;
  }

  .input-box {
    margin: 20px 0;
    height: 46px;
  }

  .input-box input {
    font-size: 15px;
    padding: 16px 40px 16px 16px;
  }

  .btn {
    height: 44px;
    font-size: 15px;
  }

  .form-box p {
    font-size: 13px;
  }

  /* Przycisk zamknięcia – większy touch target */
  .auth-modal .close-btn-modal {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  /* ===== INVITATION – mobile ===== */
  .auth-modal.inv {
    height: calc(100dvh - 54px) !important;
  }

  .auth-modal.inv .form-box.invitation {
    padding: 24px 20px 16px;
  }

  .form-box.invitation h2 {
    font-size: 24px;
    margin-bottom: 14px;
  }

  .inv-item p {
    font-size: 13px;
  }

  /* Avatar i dropdown */
  .profile-box .dropdown {
    right: 16px;
    top: 65px;
  }

  /* Alert */
  .alert-box {
    width: calc(100% - 32px);
    max-width: 350px;
  }
}

/* ---------- Tablety ---------- */
@media (max-width: 768px) and (min-width: 481px) {
  header {
    padding: 14px 40px;
  }

  .logo {
    font-size: 26px;
  }

  section {
    padding: 0 40px;
  }

  .profile-box .dropdown {
    right: 40px;
  }
}
