/* ============================================================
   感情の星座 — Send Page Styles
   ============================================================ */

/* --- Particle canvas --------------------------------------- */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  display: none;
}

/* --- Send main layout -------------------------------------- */
#send-main {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 20;
  padding: 130px 16px 56px;
  overflow-y: auto;
}

/* --- Form card --------------------------------------------- */
#send-form-card {
  width: min(640px, 92vw);
  background: rgba(12, 18, 34, 0.68);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 40px 40px 32px;
  border: 1px solid rgba(246, 217, 225, 0.1);
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.5);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#send-form-card.sending {
  opacity: 0;
  transform: scale(0.97) translateY(-12px);
  pointer-events: none;
}

/* --- Titles ----------------------------------------------- */
.send-title {
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.send-subtitle {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  line-height: 1.9;
  margin-bottom: 32px;
}

/* --- Section label ---------------------------------------- */
.section-label {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* --- Category chips --------------------------------------- */
.category-section {
  margin-bottom: 28px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: var(--font-base);
  font-size: 0.76rem;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  letter-spacing: 0.04em;
}

.category-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.category-chip.selected {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--chip-color, #f6d9e1);
  color: var(--chip-color, #f6d9e1);
  text-shadow: 0 0 12px color-mix(in srgb, var(--chip-color, #f6d9e1) 50%, transparent);
}

/* --- Title + nickname row --------------------------------- */
.title-nick-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.title-box {
  position: relative;
  flex: 1 1 0;
}

.nick-box {
  position: relative;
  flex: 0 0 200px;
}

@media (max-width: 599px) {
  .title-nick-row {
    flex-direction: column;
    gap: 10px;
  }
  .nick-box {
    flex: none;
  }
}

/* --- Title input ------------------------------------------ */
.title-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 80px 12px 20px;
  color: var(--text-primary);
  font-family: var(--font-base);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  outline: none;
  transition: background 0.45s ease;
  caret-color: var(--accent-pink);
}

.title-input:focus {
  background: rgba(255, 255, 255, 0.07);
}

.title-input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.nick-input {
  padding: 12px 20px;
}

.title-char-counter {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 0.66rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* --- Vent text box ---------------------------------------- */
.vent-box {
  position: relative;
  margin-bottom: 24px;
}

#vent-text {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: var(--text-primary);
  font-family: var(--font-base);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.85;
  resize: none;
  outline: none;
  transition: background 0.45s ease;
  caret-color: var(--accent-pink);
}

#vent-text:focus {
  background: rgba(255, 255, 255, 0.07);
}

#vent-text::placeholder {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

.char-max {
  opacity: 0.45;
}

/* --- Send button ------------------------------------------ */
.send-actions {
  display: flex;
  justify-content: flex-end;
}

#send-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(246, 217, 225, 0.22);
  background: rgba(246, 217, 225, 0.07);
  color: var(--accent-pink);
  font-family: var(--font-base);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

#send-btn:not(:disabled):hover {
  background: rgba(246, 217, 225, 0.13);
  border-color: rgba(246, 217, 225, 0.42);
  box-shadow: 0 0 20px rgba(246, 217, 225, 0.14);
}

#send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.send-btn-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

#send-btn:not(:disabled):hover .send-btn-icon {
  transform: translateY(-2px) scale(1.2);
}

/* ============================================================
   Success State
   ============================================================ */
#success-state {
  width: min(480px, 92vw);
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
}

#success-state.fade-in {
  animation: success-appear 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes success-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  opacity: 0.6;
  margin-bottom: 20px;
}

.success-main {
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.9;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.success-sub {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  line-height: 1.9;
  margin-bottom: 40px;
}

/* --- Key display ------------------------------------------ */
.key-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.key-label {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.key-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(246, 217, 225, 0.05);
  border: 1px solid rgba(246, 217, 225, 0.22);
  border-radius: var(--radius-md);
  padding: 18px 28px;
  box-shadow: 0 0 30px rgba(246, 217, 225, 0.06);
}

#signal-key-display {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--accent-pink);
  text-shadow: 0 0 22px rgba(246, 217, 225, 0.45);
  user-select: all;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-family: var(--font-base);
  font-size: 0.72rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.copy-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: rgba(246, 217, 225, 0.1);
  border-color: rgba(246, 217, 225, 0.3);
  color: var(--accent-pink);
}

.copy-btn.copied {
  background: rgba(246, 217, 225, 0.12);
  border-color: rgba(246, 217, 225, 0.4);
  color: var(--accent-pink);
}

.key-warning {
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  line-height: 2;
  opacity: 0.65;
  max-width: 320px;
}

/* --- Disclaimer / notice ----------------------------------- */
.send-disclaimer {
  width: min(640px, 92vw);
  margin: 20px auto 0;
  padding: 22px 28px;
  background: rgba(12, 18, 34, 0.44);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  font-weight: 300;
  transition: opacity 0.6s ease;
}

#send-form-card.sending ~ .send-disclaimer,
.send-disclaimer.hidden {
  opacity: 0;
  pointer-events: none;
}

.disclaimer-title {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.75;
  margin-bottom: 12px;
}

.disclaimer-list {
  list-style: decimal;
  padding-left: 1.4em;
  margin: 0;
}

.disclaimer-list li {
  margin-bottom: 6px;
}

.disclaimer-list li:last-child {
  margin-bottom: 0;
}

.disclaimer-list strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* --- Back link -------------------------------------------- */
.back-to-map {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
  opacity: 0.7;
}

.back-to-map:hover {
  color: var(--accent-pink);
  opacity: 1;
}

/* --- Mobile -------------------------------------------- */
@media (max-width: 599px) {
  #send-form-card {
    padding: 28px 24px 24px;
  }

  .send-title {
    font-size: 1.1rem;
  }

  #signal-key-display {
    font-size: 1.6rem;
    letter-spacing: 0.25em;
  }

  .key-box {
    flex-direction: column;
    gap: 14px;
  }

  .send-disclaimer {
    padding: 18px 20px;
    font-size: 0.68rem;
  }
}
