:root {
  --bg: #0f151c;
  --card: #18222e;
  --card-2: #1f2c3c;
  --accent: #ff4f8b;
  --accent-2: #ffb3c7;
  --accent-3: #ffd166;
  --text: #f7f8fb;
  --muted: #9fb1c5;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #251b2f 0%, #16141c 55%, #0b0f14 100%);
  min-height: 100vh;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 32px;
}

.hero {
  margin-bottom: 24px;
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(244, 201, 93, 0.12);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 16px 0 8px;
  font-size: 40px;
  font-weight: 700;
}

p {
  margin: 0;
  color: var(--muted);
}

.panel {
  background: linear-gradient(145deg, rgba(34, 24, 46, 0.9), rgba(24, 34, 46, 0.65));
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px var(--shadow);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.primary,
.ghost {
  border: none;
  padding: 12px 18px;
  font-size: 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #ff7ab0);
  color: #2a0d1a;
  box-shadow: 0 10px 24px rgba(255, 79, 139, 0.35);
}

.primary:hover {
  transform: translateY(-1px);
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.star {
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
  gap: 8px;
}

.gh-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ghost:disabled,
.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.status {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 79, 139, 0.25), rgba(255, 79, 139, 0));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

select,
input[type="file"],
input[type="range"] {
  width: 100%;
  margin-bottom: 10px;
}

select,
input[type="file"] {
  background: var(--card-2);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08));
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%, calc(100% - 36px) 50%;
  background-size: 6px 6px, 6px 6px, 1px 50%;
  background-repeat: no-repeat;
  padding-right: 40px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.menu {
  font-weight: 600;
  letter-spacing: 0.02em;
}

select:focus {
  outline: none;
  border-color: rgba(255, 79, 139, 0.6);
  box-shadow: 0 0 0 2px rgba(255, 79, 139, 0.2);
}

select.from-me {
  color: var(--accent);
  border-color: rgba(255, 79, 139, 0.7);
  box-shadow: 0 10px 20px rgba(255, 79, 139, 0.2);
}

input[type="range"] {
  accent-color: var(--accent-2);
}

.value {
  margin-top: -6px;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 14px;
}

.divider {
  text-align: center;
  color: var(--muted);
  margin: 6px 0 12px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.meter {
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.meter-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffd166, #ff7ab0, #ff4f8b);
  transition: width 0.1s ease;
}

.stat {
  margin-top: 8px;
  color: var(--muted);
}

.footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.75);
  display: grid;
  place-items: center;
  z-index: 9998;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(520px, 92vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.modal-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.modal-card p {
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.heart {
  position: fixed;
  font-size: 18px;
  color: var(--accent);
  pointer-events: none;
  opacity: 0.95;
  transform: translate(-50%, -50%) scale(1);
  animation: heart-float 1s ease-out forwards;
  text-shadow: 0 4px 12px rgba(255, 79, 139, 0.45);
  z-index: 9999;
}

@keyframes heart-float {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.95;
  }
  100% {
    transform: translate(-50%, -130%) scale(1.35);
    opacity: 0;
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: 30px;
  }

  .status {
    margin-left: 0;
    width: 100%;
  }
}
