* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(to bottom, #fff1f2, #ffe4e6);
  color: #334155;
  text-align: center;
  overflow-x: hidden;
}

/* ===== OGÓLNE ===== */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 8vw, 72px);
  color: #e11d48;
}

h2 {
  margin: 0 0 24px;
  font-size: clamp(30px, 5vw, 42px);
  color: #be123c;
}

h3 {
  margin: 0 0 16px;
  color: #be123c;
}

.subtitle {
  margin-bottom: 16px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #db2777;
  font-size: 13px;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-text {
  max-width: 720px;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1.6;
}

/* ===== LICZNIK ===== */

.counter {
  margin: 36px auto 0;
  padding: 24px;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  animation: pulse 2.8s ease-in-out infinite;
}

.counter p {
  margin: 6px 0;
}

.counter h2 {
  margin: 8px 0;
  font-size: 54px;
  color: #e11d48;
}

/* ===== GRID / KARTY ===== */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.card p {
  line-height: 1.7;
  margin-bottom: 0;
}

/* ===== GALERIA ===== */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* ===== POWODY ===== */

.reasons {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.reasons li {
  background: white;
  padding: 18px 22px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* ===== SEKRETNY PRZYCISK ===== */

.final button {
  border: none;
  padding: 14px 24px;
  font-size: 18px;
  border-radius: 14px;
  cursor: pointer;
  background: #e11d48;
  color: white;
}

.final button:hover {
  opacity: 0.92;
}

#secret {
  margin-top: 18px;
  font-size: 22px;
  color: #be123c;
  font-weight: bold;
}

.hidden {
  display: none;
}

/* ===== SERDUSZKA ===== */

.hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hearts span {
  position: absolute;
  bottom: -40px;
  display: block;
  animation-name: float;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  opacity: 0;
}

@keyframes float {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-110vh);
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

/* ===== KARTKA ===== */

.notebook-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.notebook-subtitle {
  margin-top: -8px;
  margin-bottom: 28px;
  color: #7c5a43;
  font-size: 18px;
}

.note-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.note-closed {
  border: none;
  background: #8b5e3c;
  color: white;
  padding: 14px 26px;
  font-size: 18px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.note-closed:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.note-card {
  width: 100%;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px) rotateX(-12deg);
  transform-origin: top center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.note-card.show {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

.note-card.hidden {
  display: none;
}

.note-paper {
  position: relative;
  width: min(100%, 760px);
  min-height: 520px;
  padding: 70px 40px 60px 70px;
  background-color: #fffdf8;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.note-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(130, 170, 210, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(130, 170, 210, 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

.note-paper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48px;
  width: 2px;
  background: rgba(220, 70, 70, 0.35);
  z-index: 1;
}

.note-paper p,
.note-heart {
  position: relative;
  z-index: 2;
}

.note-paper p {
  margin: 0;
  color: #8a6a54;
  font-size: clamp(28px, 4.2vw, 54px);
  line-height: 1.45;
  letter-spacing: 2px;
  font-family: "Courier New", Courier, monospace;
  text-align: center;
}

.note-heart {
  margin-top: 28px;
  font-size: 54px;
  text-align: center;
}

/* ===== FILMY ===== */

.movies-section {
  padding: 24px 0 80px;
}

.movies-subtitle {
  margin-top: -8px;
  margin-bottom: 30px;
  color: #7c5a43;
  font-size: 18px;
}

.movies-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.movies-stats {
  background: white;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  color: #7c5a43;
  font-weight: bold;
}

.add-movie-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.add-movie-form input {
  min-width: 260px;
  padding: 14px 16px;
  border: 1px solid #e8cfcf;
  border-radius: 14px;
  outline: none;
  font-size: 16px;
  background: white;
}

.add-movie-form input:focus {
  border-color: #e11d48;
}

.add-movie-form button {
  border: none;
  padding: 14px 20px;
  border-radius: 14px;
  background: #e11d48;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.add-movie-form button:hover {
  opacity: 0.92;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.movies-card {
  background: white;
  padding: 28px;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.movies-card h3 {
  margin-bottom: 16px;
  color: #e11d48;
}

.movies-card.watched {
  border-left: 5px solid #22c55e;
}

.movies-card.todo {
  border-left: 5px solid #f59e0b;
}

.movie-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.movie-item {
  margin-bottom: 12px;
}

.movie-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: #fff8fa;
  border-radius: 12px;
  padding: 10px 12px;
}

.movie-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  line-height: 1.5;
  flex: 1;
}

.movie-label input[type="checkbox"] {
  margin-top: 4px;
  transform: scale(1.15);
  accent-color: #e11d48;
  cursor: pointer;
}

.movie-text {
  flex: 1;
}

.movie-done .movie-text {
  text-decoration: line-through;
  opacity: 0.7;
}

.delete-movie-btn {
  border: none;
  background: transparent;
  color: #b91c1c;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}

.delete-movie-btn:hover {
  transform: scale(1.08);
}

.movies-note {
  margin-top: 12px;
  color: #7c5a43;
  font-style: italic;
}

/* ===== KSIĄŻKI ===== */

.books-section {
  padding: 24px 0 100px;
}

.books-subtitle {
  margin-top: -8px;
  margin-bottom: 30px;
  color: #7c5a43;
  font-size: 18px;
}

.books-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.books-stats {
  background: white;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  color: #7c5a43;
  font-weight: bold;
}

.add-book-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.add-book-form input,
.add-book-form select {
  padding: 14px 16px;
  border: 1px solid #e8cfcf;
  border-radius: 14px;
  outline: none;
  font-size: 16px;
  background: white;
}

.add-book-form input {
  min-width: 240px;
}

.add-book-form input:focus,
.add-book-form select:focus {
  border-color: #e11d48;
}

.add-book-form button {
  border: none;
  padding: 14px 20px;
  border-radius: 14px;
  background: #e11d48;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.add-book-form button:hover {
  opacity: 0.92;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.books-card {
  background: white;
  padding: 28px;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.books-card h3 {
  margin-bottom: 16px;
  color: #e11d48;
}

.books-card.read {
  border-left: 5px solid #22c55e;
}

.books-card.reading {
  border-left: 5px solid #3b82f6;
}

.books-card.to-read {
  border-left: 5px solid #f59e0b;
}

.book-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.book-item {
  margin-bottom: 12px;
}

.book-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: #fff8fa;
  border-radius: 12px;
  padding: 10px 12px;
}

.book-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.book-title {
  line-height: 1.5;
}

.book-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.book-actions button {
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  background: #fce7ef;
  color: #be123c;
}

.book-actions button:hover {
  opacity: 0.92;
}

.delete-book-btn {
  background: transparent !important;
  color: #b91c1c !important;
  font-size: 20px !important;
  line-height: 1 !important;
  padding: 2px 4px !important;
}

.books-note {
  margin-top: 12px;
  color: #7c5a43;
  font-style: italic;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .grid,
  .gallery,
  .books-grid {
    grid-template-columns: 1fr;
  }

  .hero-text {
    font-size: 18px;
  }

  .counter h2 {
    font-size: 44px;
  }
}

@media (max-width: 700px) {
  .note-paper {
    min-height: auto;
    padding: 48px 20px 40px 42px;
  }

  .note-paper::after {
    left: 26px;
  }

  .note-paper p {
    letter-spacing: 1px;
    line-height: 1.5;
  }

  .note-heart {
    font-size: 42px;
  }

  .movies-grid {
    grid-template-columns: 1fr;
  }

  .movies-controls,
  .books-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .add-movie-form input,
  .add-book-form input,
  .add-book-form select {
    min-width: 100%;
  }
}