*, *::before, *::after { box-sizing: border-box; }

body {
background: linear-gradient(135deg, #f8f6f2 0%, #fbeee6 100%);
font-family: 'Segoe UI', 'Arial', sans-serif;
color: #4b3c2e;
margin: 0;
padding: 0;
min-height: 100vh;
}

.container {
max-width: 700px;
margin: 40px auto 0 auto;
background: #fffdf9;
border-radius: 22px;
box-shadow: 0 8px 36px 0 rgba(200, 180, 150, 0.13);
padding: 36px 28px 28px 28px;
position: relative;
z-index: 1;
}

h1 {
text-align: center;
color: #b89b74;
font-family: 'Pacifico', cursive, sans-serif;
font-size: 2.5em;
margin-bottom: 20px;
letter-spacing: 2px;
}
.subtitle {
text-align: center;
color: #b89b74;
font-size: 1.1em;
margin-bottom: 24px;
font-weight: 500;
letter-spacing: 0.5px;
}

form {
background: #f9f6f2;
border-radius: 14px;
padding: 26px 18px 18px 18px;
box-shadow: 0 2px 12px 0 rgba(200, 180, 150, 0.07);
margin-bottom: 36px;
display: flex;
flex-direction: column;
gap: 0;
}

label {
font-weight: 600;
color: #b89b74;
font-size: 1.05em;
margin-bottom: 2px;
}

input[type="text"], input[type="password"], textarea, input[type="file"] {
width: 100%;
padding: 12px 14px;
margin-top: 6px;
margin-bottom: 20px;
border: 1px solid #e8dcc2;
border-radius: 9px;
background: #fff;
font-size: 1em;
transition: border 0.2s;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
border: 1.5px solid #b89b74;
outline: none;
background: #f7f2ea;
}

button[type="submit"], .add-entry-btn {
background: linear-gradient(90deg, #b89b74 60%, #e6d3b7 100%);
color: #fff;
border: none;
border-radius: 9px;
padding: 13px 34px;
font-size: 1.11em;
font-family: 'Segoe UI', sans-serif;
font-weight: 600;
cursor: pointer;
box-shadow: 0 2px 8px 0 rgba(200, 180, 150, 0.10);
transition: background 0.2s, transform 0.1s;
margin: 0 6px 8px 0;
display: inline-block;
min-width: 120px;
min-height: 44px;
text-align: center;
vertical-align: middle;
}

button[type="submit"]:hover, .add-entry-btn:hover {
background: linear-gradient(90deg, #b89b74 80%, #e6d3b7 100%);
transform: translateY(-2px) scale(1.04);
}

.center-btn {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
margin-top: 24px;
margin-bottom: 8px;
}

.login-btn-top {
position: fixed;
top: 16px;
right: 22px;
z-index: 2000;
background: #b89b74;
color: #fff;
border: none;
border-radius: 50%;
width: 38px;
height: 38px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 8px 0 rgba(200, 180, 150, 0.10);
text-decoration: none;
cursor: pointer;
opacity: 0.85;
transition: background 0.2s, opacity 0.2s, transform 0.1s;
padding: 0;
}
.login-btn-top:hover {
background: #e6d3b7;
opacity: 1;
transform: scale(1.08);
}
.login-icon {
font-size: 1.35em;
line-height: 1;
display: block;
width: 100%;
text-align: center;
pointer-events: none;
}

.error-message {
background: #fff2e0;
color: #b12b2b;
border: 1px solid #e0b1b1;
border-radius: 8px;
padding: 12px 16px;
margin-bottom: 18px;
font-weight: 600;
text-align: center;
box-shadow: 0 2px 8px 0 rgba(200, 50, 50, 0.06);
}
.error-reason {
color: #b89b74;
font-size: 0.98em;
margin-top: 6px;
font-weight: 400;
}

.slider {
  position: relative;
  width: 100%;
  height: 340px;
  margin: 0 auto 32px auto;
  overflow: hidden;
  background: #f3e6d1;
  border-radius: 16px;
  box-shadow: 0 2px 12px 0 rgba(175, 150, 110, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.5s ease;
    opacity: 1;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
	    padding-top: 24px;
	box-sizing: border-box;
}
.slide.active {
    z-index: 2;
    transform: translateX(0);
}

.slide.to-left {
    transform: translateX(-100%);
    z-index: 1;
}

.slide.to-right {
    transform: translateX(100%);
    z-index: 1;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #b89b74;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.5em;
  cursor: pointer;
  z-index: 2;
  opacity: 0.7;
  transition: background 0.2s, opacity 0.2s;
}

.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }
.slider-btn:hover { background: #e6d3b7; opacity: 1; }

.slide img {
max-height: 180px;
max-width: 90%;
border-radius: 12px;
object-fit: cover;
margin-bottom: 18px;
box-shadow: 0 2px 8px 0 rgba(175, 150, 110, 0.10);
border: 1px solid #e8dcc2;
cursor: zoom-in;
background: #fff;
}

.no-photo, .modal-no-photo {
width: 120px;
height: 120px;
margin: 0 auto 18px auto;
background: #f3e6d1;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 8px 0 rgba(175, 150, 110, 0.10);
border: 2px dashed #e8dcc2;
}
.no-photo-icon {
font-size: 3.5em;
color: #b08a60;
opacity: 0.7;
}

.slide-caption {
font-size: 1.07em;
color: #5d4632;
background: rgba(255,250,243,0.97);
border-radius: 12px;
padding: 12px 10px;
box-shadow: 0 2px 8px 0 rgba(175, 150, 110, 0.05);
margin: 0 auto;
max-width: 95%;
word-break: break-word;
    text-align: center;
}
.slide-caption .date {
color: #cbbfae;
font-size: 0.95em;
margin-bottom: 9px;
margin-top: 2px;
display: block;
}

.slider-btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: #b89b74;
color: #fff;
border: none;
border-radius: 50%;
width: 38px;
height: 38px;
font-size: 1.5em;
cursor: pointer;
z-index: 2;
opacity: 0.7;
transition: background 0.2s, opacity 0.2s;
}
.slider-btn:hover { background: #e6d3b7; opacity: 1; }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }

/* Modal powiększenia */
.fullscreen-modal {
display: none;
position: fixed;
z-index: 9999;
left: 0; top: 0; width: 100vw; height: 100vh;
background: rgba(248, 237, 227, 0.97) !important;
align-items: center;
justify-content: center;
flex-direction: column;
}
.fullscreen-modal.active { display: flex; }
.fullscreen-modal img {
max-width: 95vw;
max-height: 80vh;
border-radius: 14px;
box-shadow: 0 4px 32px 0 rgba(175, 150, 110, 0.24);
background: #fff;
}
.fullscreen-modal .close-btn {
position: absolute;
top: 28px;
right: 36px;
font-size: 2.2em;
color: #b08a60;
background: none;
border: none;
cursor: pointer;
z-index: 10001;
font-family: 'Arial', sans-serif;
opacity: 0.85;
transition: opacity 0.2s;
}
.fullscreen-modal .close-btn:hover { opacity: 1; }
.fullscreen-modal .modal-caption {
color: #5d4632;
font-size: 1.1em;
margin-top: 22px;
text-align: center;
max-width: 95vw;
word-break: break-word;
}
.fullscreen-modal .modal-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(184,155,116,0.85);
color: #fff;
border: none;
border-radius: 50%;
width: 48px;
height: 48px;
font-size: 2em;
cursor: pointer;
z-index: 10001;
opacity: 0.8;
transition: background 0.2s, opacity 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.fullscreen-modal .modal-arrow.left { left: 24px; }
.fullscreen-modal .modal-arrow.right { right: 24px; }
.fullscreen-modal .modal-arrow:hover { background: #e6d3b7; opacity: 1; }

.footer {
width: 100%;
background: #f3e6d1;
color: #b08a60;
text-align: center;
font-size: 1em;
padding: 18px 0 14px 0;
position: fixed;
left: 0;
bottom: 0;
z-index: 100;
letter-spacing: 1px;
border-top: 1px solid #e8dcc2;
}
@media (max-width: 700px) {
  body, input, textarea, button {
    font-size: 1.05em;
  }

  .container {
    margin: 20px 10px 0 10px;
    padding: 24px 16px 20px 16px;
    border-radius: 16px;
  }

  h1 {
    font-size: 1.9em;
    margin-bottom: 16px;
  }

  .subtitle {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .slider {
    height: auto;
    min-height: 310px;
    padding: 16px 0;
    border-radius: 14px;
  }

.slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 24px;      /* odstęp od góry */
  padding-bottom: 24px;   /* dodany odstęp od dołu, taki sam jak od góry */
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}

  .slide img {
    max-height: 160px;
    max-width: 100%;
    margin-bottom: 14px;
  }

  .slide-caption {
    font-size: 1em;
    padding: 10px;
    text-align: center;
  }

  .slide-caption .date {
    font-size: 0.9em;
  }

  .slider-btn {
    width: 32px;
    height: 32px;
    font-size: 1.3em;
  }

  .fullscreen-modal img {
    max-width: 90vw;
    max-height: 70vh;
  }

  .fullscreen-modal .modal-caption {
    font-size: 1em;
    padding: 0 10px;
  }

  .fullscreen-modal .modal-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.6em;
  }

  .fullscreen-modal .close-btn {
    top: 18px;
    right: 20px;
    font-size: 1.8em;
  }

  .center-btn {
    flex-direction: column;
    gap: 10px;
  }

  button[type="submit"], .add-entry-btn {
    width: 100%;
    padding: 13px 0;
    font-size: 1.1em;
  }

  .login-btn-top {
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
  }

  .login-icon {
    font-size: 1.2em;
  }

  .footer {
    font-size: 0.95em;
    padding: 14px 0;
  }
}
