:root {
  --bg: linear-gradient(135deg, #fda085, #f6d365);
  --text: #fff;
  --btn-bg: rgba(255,255,255,0.2);
  --btn-hover: rgba(255,255,255,0.35);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: hidden !important; 

}


.hearts::before, .hearts::after {
  content: "💖";
  position: absolute;
  animation: float 8s infinite;
  font-size: 24px;
  opacity: 0.6;
}
.hearts::after {
  content: "💗";
  left: 40%;
  animation-duration: 10s;
}
@keyframes float {
  from { transform: translateY(100vh) scale(0.6); opacity: 0.8; }
  to { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

.view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-box, .admin-panel {
  background: rgba(255,255,255,0.15);
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  backdrop-filter: blur(4px);
}

.login-box input, .admin-panel input {
  display: block;
  margin: 8px auto;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.btn {
  border: none;
  background: var(--btn-bg);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .3s;
}
.btn:hover { background: var(--btn-hover); }
.btn.green { background: rgba(76,175,80,0.7); }
.btn.red { background: rgba(244,67,54,0.7); }

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 90;
}


.center-content {
  display: flex; 
  align-items: center; 
  justify-content: center; 
  height: 100vh; 
  flex-direction: column;
}

.center-content h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 38px;
}

.overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(4px);
  color: #fff;
  box-shadow: 6px 0 16px rgba(0, 0, 0, 0.45);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}
.overlay.active {
  opacity: 1;
  visibility: visible;
}
.shop-panel {
   position: fixed;
  top: 0;
  right: -450px; /* Zaczyna poza ekranem, po prawej */
  width: 400px;
  max-width: 90%;
  height: 100%;
  /* Ujednolicone tło z panelem streaka */
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(4px);
  color: #fff;
  box-shadow: 6px 0 16px rgba(0, 0, 0, 0.45);
  overflow-y: hidden;
  /* Ujednolicony czas animacji z panelem streaka */
  transition: right 0.4s ease-in-out; 
  padding: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.shop-panel.open {
  right: 0; /* Pokazuje się, przesuwając do krawędzi ekranu */
}

.modal {
  display: flex;
  flex-direction: column;
  height: 100vh; 
  max-height: 100vh;
  padding: 0; 
  will-change: transform;
  -webkit-overflow-scrolling: touch;
  backface-visibility: hidden;
  transform: translateZ(0); 
}


.overlay.active .modal {
  transform: translateX(0);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}
body.modal-open {
  overflow: hidden;
}
.shop-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.reward-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reward-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.reward-icon {
  font-size: 1.8rem;
}

.reward-name {
  font-size: 1rem;
  text-align: center;
  font-weight: 500;
}

.reward-cost {
  font-size: 0.9rem;
  color: #444;
}


.shop-msg {
  margin-top: 15px;
  font-size: 16px;
  color: #333;
  text-align: center;
  min-height: 20px;
}
#login-btn {
  width: 80%; 
  padding: 12px 25px; 
  margin-top: 20px; 

  background: linear-gradient(135deg, #FFC107, #FFA000); 
  color: white; 
  border: none; 
  border-radius: 10px; 

  font-family: 'Poppins', sans-serif; 
  font-size: 1.1em; 
  font-weight: 600; 
  text-transform: uppercase; 
  letter-spacing: 1px; 

  cursor: pointer; 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
  transition: all 0.3s ease; 
}

#login-btn:hover {
  background: linear-gradient(135deg, #FFA000, #FFC107); 
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); 
  transform: translateY(-2px); 
}

#login-btn:active {
  background: linear-gradient(135deg, #FF9100, #FFB300); 
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); 
  transform: translateY(0);
}


.modal h3 {
  margin-top: 0;
  text-align: center;
  padding-top: env(safe-area-inset-top);
}

#close-shop {
  margin-top: 20px; 
  padding: 14px 20px;
  font-size: 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
  font-weight: bold;
}

#close-shop:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}
.shop-header {
  flex: 0 0 auto;
  padding: 20px;
  text-align: center;
}

.shop-items-container {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
}

.shop-footer {
  flex: 0 0 auto;
  padding: 20px;
  text-align: center;
}
#points{
  position: relative;
  font-weight: bold;
  font-size: 20px;
}
#confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  z-index: 2000;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#confirm-overlay.active {
  opacity: 1;
  visibility: visible;
}

#confirm-overlay .modal.confirm {
  width: 450px;
  height: 100vh;
  background: rgba(255,255,255,0.20);
  display: flex;
  flex-direction: column;
  justify-content: center;  
  align-items: center;
  padding: 20px;
  box-shadow: -6px 0 16px rgba(0,0,0,0.45);
  
  border-radius: 0; 
}


#confirm-overlay .actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

#confirm-overlay .actions .btn {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border-radius: 10px;
}
#confirm-overlay .modal.confirm h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  text-align: center;
  color: #222;
}

#confirm-overlay .modal.confirm p {
  margin: 5px 0 15px 0;
  font-size: 15px;
  text-align: center;
  color: #333;
}

.streak-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0; 
}

#streakInfo {
  font-weight: bold;
}
.side-panel.left {
  position: fixed;
  top: 0;
  left: -450px; /* Domyślnie ukryty, poza ekranem */
  width: 400px;
  max-width: 90%;
  height: 100%;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(4px);
  color: #fff;
  box-shadow: 6px 0 16px rgba(0, 0, 0, 0.45);
  overflow-y: hidden;
  transition: left 0.4s ease-in-out; /* Dłuższy czas dla płynności */
  padding: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}


.side-panel.left.open {
  left: 0;
}

.side-panel.left .shop-header h3 {
  color: #fff;
}
.side-panel.left .shop-footer .close-btn {
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  color: #fff;
}
.streak-rewards-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.streak-rewards-list .streak-reward-item {
  display: flex; /* Włączamy Flexbox */
  justify-content: space-between; /* Rozsuwa elementy na boki (tekst na lewo, przycisk na prawo) */
  align-items: center; /* Wyśrodkowuje elementy w pionie */
  padding: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
}

.close-streak-btn {
  margin-top: 20px;
  padding: 14px 20px;
  font-size: 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
  font-weight: bold;
}

.close-streak-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}


.reward-status {
  padding: 10px 16px;
  font-size: 0.9rem;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s, background 0.3s;
}

/* Styl dla przycisku aktywnego (Odbierz) */
.reward-status.status-unlocked {
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
}

.reward-status.status-unlocked:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}

/* Styl dla przycisku zablokowanego (Zablokowane, Odebrano) */
.reward-status.status-locked,
.reward-status.status-claimed {
  background: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}
.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 50;
}
.streak-group, .points-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 768px) {
  .app-header {
    flex-direction: row; 
    flex-wrap: wrap; 
    justify-content: space-between; 
    align-items: flex-start; 
  }

  .header-left, .header-right {
    flex-direction: column; 
    align-items: flex-start; 
    gap: 5px;
  }
  .header-right {
    align-items: flex-end; 
  }
  
  .streak-group, .points-group {
    flex-direction: column; 
    align-items: flex-start;
  }
  .points-group {
    align-items: flex-end; 
  }

  .points-group #points {
    order: 2; 
  }

  .points-group #open-shop {
    order: 1; 
  }
}