body {
  background-color: #111;
  color: #fff;
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
}

.container {
  padding: 2rem;
}

h1 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

#candleForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#messageInput {
  width: 250px;
  height: 60px;
  padding: 0.5rem;
  border-radius: 5px;
  border: none;
  resize: none;
  font-size: 0.95rem;
}

#candleForm button {
  padding: 0.7rem 1.2rem;
  background-color: #ff9800;
  color: #111;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

#candleWall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.candle {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  height: 120px;
  text-align: center;
  justify-content: flex-start;
  border-radius: 8px;
  padding: 2px;
  background: #111;
}

.candle-message {
  font-size: 0.8rem;
  margin-top: 0.3rem;
  line-height: 1.1em;
  max-height: 3.3em; /* max 3 lines */
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  white-space: normal;
  word-break: break-word;
  cursor: pointer;
}

.candle img {
  filter: drop-shadow(0 0 10px #ffcc33);
}

/* Modal styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #222;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  max-width: 320px;
  width: 90%;
  color: #fff;
  text-align: left;
  word-break: break-word;
  box-shadow: 0 0 15px #ffcc33;
  position: relative;
}

#modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
}
