/* ── AskAncients Vent Page CSS ──
   Complete dark theme for The Vent page.
   Overrides shared.css base styles entirely.
*/

/* ── Dark theme overrides ── */
/* body gradient is the fallback if vent-bg.png fails to load;
   .page-vent in shared.css applies the actual background image */
body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  align-items: flex-start;
  color: #e0e0e0;
}

/* Container: shared.css .page-vent .container overrides to
   rgba(30,25,20,0.3). This is the non-parchment fallback. */
.container {
  background: #1e1e30;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  margin-top: 10px;
}

/* ── Header ─��� */
.header {
  background: linear-gradient(135deg, #2a2a4a 0%, #1e1e30 100%);
  padding: 30px 30px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-top {
  margin-bottom: 8px;
}

.header h1 {
  font-size: 28px;
  margin-bottom: 0;
}

.header p {
  font-size: 15px;
  opacity: 0.7;
  max-width: 500px;
  line-height: 1.5;
}

/* Vent has a darker header so the shared .back-link styling is softened
   to read well on the dark background. Structure (position, padding,
   border-radius, transition) is inherited from shared.css. */
.back-link {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

/* ── Content ── */
.content {
  padding: 30px;
}

/* ── Intro ── */
.intro {
  margin-bottom: 28px;
  text-align: center;
}

.intro p {
  font-size: 14px;
  line-height: 1.7;
  color: #999;
  max-width: 560px;
  margin: 0 auto 12px;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 20px;
  font-size: 12px;
  color: #8899cc;
  margin-top: 4px;
}

.privacy-badge svg {
  flex-shrink: 0;
}

/* ���─ Mode selection ── */
.mode-selection {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.mode-btn {
  flex: 1;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: inherit;
  color: #ccc;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.mode-btn.active {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.3);
}

.mode-btn-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #e0e0e0;
}

.mode-btn-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}

/* ── Writing area ── */
.vent-area {
  position: relative;
  margin-bottom: 20px;
}

.vent-textarea {
  width: 100%;
  min-height: 280px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  color: #e0e0e0;
  resize: vertical;
  line-height: 1.8;
  transition: border-color 0.3s;
}

/* Parchment dark textarea — slightly more transparent for bg to show */
.page-vent .vent-textarea {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.06);
}

.vent-textarea:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.3);
}

.vent-textarea::placeholder {
  color: #555;
}

/* ��─ Guided prompts ── */
.guided-prompts {
  display: none;
  margin-bottom: 16px;
}

.guided-prompts.active {
  display: block;
}

.guided-prompt {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 6px 8px 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  opacity: 0;
  transform: translateY(8px);
}

.guided-prompt.visible {
  opacity: 1;
  transform: translateY(0);
}

.guided-prompt:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.2);
  color: #aab;
}

/* ── Burn button ── */
.burn-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.char-hint {
  font-size: 12px;
  color: #555;
}

.burn-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  letter-spacing: 0.3px;
}

.burn-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(231, 76, 60, 0.35);
}

.burn-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.burn-btn.burn-confirm {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  box-shadow: 0 4px 16px rgba(243, 156, 18, 0.3);
  animation: confirm-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes confirm-pulse {
  from { box-shadow: 0 4px 16px rgba(243, 156, 18, 0.3); }
  to   { box-shadow: 0 4px 24px rgba(243, 156, 18, 0.5); }
}

/* ── Burn animation overlay ── */
.burn-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  pointer-events: none;
}

.burn-overlay.active {
  display: block;
}

.ember {
  position: absolute;
  font-size: 14px;
  color: #e0e0e0;
  pointer-events: none;
  animation: ember-rise 2s ease-out forwards;
}

@keyframes ember-rise {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
    color: #e0e0e0;
  }
  30% {
    opacity: 0.9;
    color: #ff6b35;
  }
  60% {
    opacity: 0.6;
    color: #e74c3c;
    transform: translateY(-120px) rotate(15deg) scale(0.8);
  }
  100% {
    opacity: 0;
    color: #555;
    transform: translateY(-300px) rotate(30deg) scale(0.3);
  }
}

/* ── Post-burn state ── */
.post-burn {
  display: none;
  text-align: center;
  padding: 50px 20px;
}

.post-burn.active {
  display: block;
}

.post-burn-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fade-up 0.8s ease-out 0.3s forwards;
}

.post-burn h2 {
  font-size: 22px;
  color: #e0e0e0;
  margin-bottom: 10px;
  font-weight: 600;
  opacity: 0;
  animation: fade-up 0.8s ease-out 0.5s forwards;
}

.post-burn p {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 28px;
  opacity: 0;
  animation: fade-up 0.8s ease-out 0.7s forwards;
}

.post-burn-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.8s ease-out 0.9s forwards;
}

.post-burn-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
  border: none;
}

.post-burn-btn.primary {
  background: linear-gradient(135deg, #b8860b 0%, #8b6914 100%);
  color: white;
}

.post-burn-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.post-burn-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-burn-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─��� Textarea fade-out ─��� */
.vent-content.fading {
  animation: text-fade 1.2s ease-out forwards;
}

@keyframes text-fade {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
    filter: blur(2px);
  }
  100% {
    opacity: 0;
    filter: blur(8px);
  }
}

/* ── Last vented nudge ── */
.last-vented-nudge {
  display: none;
  text-align: center;
  margin-bottom: 20px;
  font-size: 12px;
  color: #666;
  font-style: italic;
}

.last-vented-nudge.visible {
  display: block;
}

/* ── Milestone message ── */
.milestone-message {
  display: none;
  font-size: 13px;
  color: #8899cc;
  margin-top: 12px;
  padding: 10px 16px;
  background: rgba(102, 126, 234, 0.06);
  border-radius: 8px;
  opacity: 0;
  animation: fade-up 0.8s ease-out 1.1s forwards;
}

.milestone-message.active {
  display: block;
}

/* ── Footer ── */
.footer {
  padding: 16px 30px;
  text-align: center;
  font-size: 12px;
  color: #555;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: none;
}

/* Parchment dark footer */
.page-vent .footer {
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.04);
}

/* Dark-theme feedback widget overrides */
.page-vent .feedback-link { color: #666; }
.page-vent .feedback-link:hover { color: #999; }
.page-vent .feedback-cat-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #888;
}
.page-vent .feedback-cat-btn:hover { background: rgba(255, 255, 255, 0.08); }
.page-vent .feedback-cat-btn.active {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
  color: #aab;
}
.page-vent .feedback-textarea {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
}
.page-vent .feedback-textarea:focus {
  border-color: rgba(102, 126, 234, 0.3);
}
.page-vent .feedback-textarea::placeholder { color: #555; }
.page-vent .feedback-cancel-btn { color: #666; }
.page-vent .feedback-cancel-btn:hover { color: #999; }
.page-vent .feedback-success {
  background: rgba(72, 168, 124, 0.1);
  color: #48a87c;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .header h1 {
    font-size: 22px;
  }

  .header-top {
    flex-direction: column;
    gap: 10px;
  }

  /* .back-link mobile rules in shared.css */

  .content {
    padding: 20px 15px;
  }

  .mode-selection {
    flex-direction: column;
  }

  .vent-textarea {
    min-height: 220px;
    font-size: 15px;
  }

  .burn-section {
    flex-direction: column;
    align-items: stretch;
  }

  .burn-btn {
    justify-content: center;
  }

  .char-hint {
    text-align: center;
  }
}
