body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%; /* Fixes the black void */
  background-color: #000;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: white;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 100;
  box-sizing: border-box;
}

header h1 {
  font-size: 1.1rem;
  margin: 0;
}

.back {
  padding: 6px 12px;
  border: 1px solid white;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  font-size: 14px;
}

/* CONTAINER: Uses flex to center the card perfectly */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* Forces container to be at least screen height */
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

/* CARD */
.card {
  background: rgba(255,255,255,0.07);
  padding: 40px 25px;
  border-radius: 20px;
  width: 100%;
  max-width: 360px; /* Slimmer look for mobile */
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.stars {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.stars span {
  font-size: 32px;
  color: #444;
  cursor: pointer;
  transition: 0.3s;
}

.stars span.active {
  color: #ffcc00;
  text-shadow: 0 0 15px #ffcc00;
}

textarea {
  width: 100%;
  height: 120px;
  margin-top: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 12px;
  background: rgba(0,0,0,0.3);
  color: white;
  font-size: 16px; /* Prevents iOS zoom */
  resize: none;
  box-sizing: border-box;
}

button {
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: white;
  color: black;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
}

/* PARALLAX BG FIX: Ensures it covers the entire viewport */
.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.layer1 { background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08), transparent 50%); }
.layer2 { background: radial-gradient(circle at 80% 70%, rgba(100,150,255,0.05), transparent 50%); }

/* Result text color */
#result {
  margin-top: 15px;
  color: #00ffaa;
  font-size: 14px;
}