body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f7f7f7;
  text-align: center;
}

/* Hide app until login succeeds */
#app.hidden {
  display: none;
}

/* Full-page login modal */
#loginModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#loginModal.hidden {
  display: none;
}

#loginModal .modal-content {
  background: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  text-align: center;
  width: 320px;
  max-width: 90%;
}

#loginModal input {
  width: 90%;
  padding: 8px;
  margin: 10px 0;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#loginModal button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #007bff;
  color: #fff;
  cursor: pointer;
  margin-top: 8px;
}

#loginModal button:hover {
  background: #0056b3;
}

/* App styling */
#app {
  max-width: 900px;
  margin: 12px auto;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* Header */
header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #333;
  color: white;
}

#controls {
  margin-top: 8px;
}

#controls button {
  margin: 4px 4px 0 0;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: #007bff;
  color: white;
  cursor: pointer;
}

#controls button:hover {
  background: #0056b3;
}

/* Carousel */
#carousel {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px auto;
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: #eee;
}

#carousel img {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

/* Heart button */
#heartBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2em;
  background: rgba(255,255,255,0.8);
  border: none;
  cursor: pointer;
  border-radius: 50%;
  padding: 4px 8px;
  transition: transform 0.2s;
}

#heartBtn:hover {
  transform: scale(1.1);
}

/* Info text */
#info {
  margin-top: 8px;
  color: #666;
  word-break: break-word;
}

/* Footer */
footer {
  margin-top: 10px;
  font-size: 12px;
  color: #888;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  #carousel img {
    max-height: 50vh;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  #controls {
    width: 100%;
  }

  #controls button, #controls label {
    width: 48%;
    margin-bottom: 6px;
  }
}
