:root {
  --bg: #0b0b13;
  --card: rgba(24, 24, 38, 0.56);
  --border: rgba(255, 255, 255, 0.16);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --accent: #a78bfa;
  --accent-2: #22d3ee;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 10%, #1f1147 0%, transparent 45%),
              radial-gradient(circle at 85% 20%, #10304b 0%, transparent 45%),
              var(--bg);
  min-height: 100vh;
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.3;
}

.bg-blur {
  position: fixed;
  width: 36rem;
  height: 36rem;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.3;
  pointer-events: none;
}

.bg-blur--one {
  background: #8b5cf6;
  top: -8rem;
  left: -10rem;
}

.bg-blur--two {
  background: #06b6d4;
  right: -9rem;
  bottom: -10rem;
}

.poetry-page {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.poetry-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero-eyebrow {
  margin: 0;
  color: #c4b5fd;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.8rem;
}

.hero-title {
  margin: 0.5rem 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 600;
  min-height: 3.2rem;
}

.typing-cursor {
  display: inline-block;
  width: 1px;
  height: 1.2em;
  background: rgba(255, 255, 255, 0.8);
  margin-left: 0.25rem;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-sub {
  margin: 0.8rem auto 0;
  color: var(--muted);
  max-width: 35rem;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: #7dd3fc;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.poetry-list {
  display: grid;
  gap: 1rem;
}

.poetry-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.28s ease, box-shadow 0.28s ease, opacity 0.45s ease;
}

.poetry-card.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.poetry-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

.poetry-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.poetry-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.poetry-date {
  color: var(--muted);
  font-size: 0.85rem;
}

.poetry-content {
  margin: 0.9rem 0 0;
  white-space: pre-wrap;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.05rem, 2.3vw, 1.3rem);
  line-height: 1.8;
  color: #f8f6ff;
}

.quote-icon {
  color: #ddd6fe;
  opacity: 0.8;
  font-size: 1.1rem;
}

.poetry-card-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.poetry-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.poetry-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.poetry-btn:active {
  transform: scale(0.97);
}

.poetry-btn--share {
  border-color: rgba(34, 211, 238, 0.45);
}

.poetry-actions-row {
  text-align: center;
  margin-top: 1.25rem;
}

.load-more-btn {
  border: 1px solid rgba(167, 139, 250, 0.55);
  background: rgba(167, 139, 250, 0.14);
  color: #ede9fe;
  border-radius: 9999px;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
}

.load-more-btn[hidden] {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.65rem 0.95rem;
  border-radius: 0.7rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.show {
  opacity: 1;
}

.fade-in {
  animation: fadeInUp 0.6s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .poetry-page {
    padding: 1.2rem 0.8rem 3rem;
  }

  .poetry-card {
    padding: 1rem;
  }

  .poetry-btn {
    min-height: 42px;
    padding: 0.55rem 0.85rem;
  }
}
