* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, sans-serif; }
body { background: #121212; color: #fff; min-height: 100vh; overflow-x: hidden; position: relative; }

#bg-slideshow {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background-size: cover; background-position: center;
  filter: brightness(0.35); z-index: -1; transition: background-image 1.2s ease-in-out;
}

.container { max-width: 920px; margin: 0 auto; padding: 15px; transition: transform 2s ease; }
.header { text-align: center; margin-bottom: 15px; }
#clock { font-size: 3.8rem; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
#today-date { font-size: 1.2rem; color: #ccc; margin-bottom: 6px; }

/* Pogoda */
.weather-box {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.45); padding: 6px 14px; border-radius: 20px;
  font-size: 1rem; border: 1px solid rgba(255,255,255,0.15);
}
#weather-temp { font-weight: bold; }
#weather-desc { color: #bbb; }

/* Wiadomość Domowa (Sticky Note) */
.note-card {
  background: #fef08a; color: #1c1917; border-radius: 12px; padding: 14px 18px;
  margin-bottom: 18px; box-shadow: 0 4px 18px rgba(234, 179, 8, 0.4);
  border-left: 6px solid #ca8a04; animation: pulse 3s infinite ease-in-out;
}
.note-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.note-pin { font-size: 0.95rem; }
.note-content { font-size: 1.25rem; font-weight: 600; line-height: 1.4; word-break: break-word; }
.note-close {
  background: #dc2626; color: #fff; border: none; padding: 4px 8px;
  border-radius: 4px; cursor: pointer; font-size: 0.8rem; font-weight: bold;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.008); }
}

/* Układ */
.card {
  background: rgba(30, 30, 30, 0.78); backdrop-filter: blur(10px);
  border-radius: 12px; padding: 16px; margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.card h3 { margin-bottom: 12px; font-size: 1.1rem; color: #93c5fd; }
.two-columns { display: flex; gap: 16px; flex-wrap: wrap; }
.flex-col { display: flex; flex-direction: column; gap: 16px; }
.flex-1 { flex: 1 1 380px; }

form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
input, select, button {
  padding: 10px; border-radius: 6px; border: 1px solid #444;
  background: #222; color: #fff; font-size: 0.95rem; flex: 1 1 45%;
}
button { background: #2563eb; border: none; font-weight: bold; cursor: pointer; flex: 1 1 100%; }

.btn-group { display: flex; gap: 8px; width: 100%; }
#submit-btn { flex: 1; }
#cancel-edit-btn { flex: 0 0 110px; background: #4b5563; }

#shopping-form input { flex: 1; }
#shopping-form button { flex: 0 0 75px; background: #059669; }

/* Listy */
ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
li {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, 0.05); padding: 10px 12px; border-radius: 8px;
}
li.completed span { text-decoration: line-through; opacity: 0.45; }
.item-actions { display: flex; gap: 6px; align-items: center; }
.edit-btn { background: #3b82f6; border: none; padding: 5px 9px; border-radius: 4px; cursor: pointer; color: #fff; }
.del-btn { background: #ef4444; border: none; padding: 5px 9px; border-radius: 4px; cursor: pointer; color: #fff; }

/* Kafelki Odliczania */
.countdown-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.countdown-item {
  background: rgba(255,255,255,0.08); border-left: 4px solid #f59e0b;
  padding: 10px 14px; border-radius: 6px; flex: 1 1 200px;
}
.countdown-days { font-size: 1.4rem; font-weight: bold; color: #fbbf24; }
.countdown-label { font-size: 0.85rem; color: #ddd; }

/* Baner urodzinowy */
#birthday-banner {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  padding: 14px; border-radius: 12px; display: flex; align-items: center;
  gap: 15px; margin: 15px auto; max-width: 920px; box-shadow: 0 4px 15px rgba(236,72,153,0.4);
}
#birthday-banner.hidden, .hidden { display: none; }
#birthday-img { width: 65px; height: 65px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }

/* Tryb Nocny (23:00 - 06:30) */
body.night-mode { background: #000; color: #b91c1c; }
body.night-mode #bg-slideshow { display: none; }
body.night-mode .card { background: #0a0a0a; border-color: #262626; }
body.night-mode #clock { color: #dc2626; text-shadow: none; font-size: 4.5rem; }
body.night-mode #today-date, body.night-mode .weather-box { color: #7f1d1d; }
body.night-mode .note-card { background: #451a03; color: #fde047; border-color: #78350f; }