:root {
  --bg-1: #fcfbff;
  --bg-2: #f3eefb;
  --card: rgba(255, 255, 255, 0.92);
  --card-strong: rgba(255, 255, 255, 0.97);
  --text: #2d2440;
  --muted: #6f6683;
  --accent: #8e5cff;
  --accent-2: #4fd1c5;
  --accent-3: #f0b7ff;
  --border: rgba(142, 92, 255, 0.14);
  --shadow: 0 12px 30px rgba(76, 46, 112, 0.12);
  --shadow-soft: 0 8px 22px rgba(76, 46, 112, 0.08);
  --radius: 20px;
  --max: 980px;
  --max-narrow: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.vibe-body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
}

/* Soft vibration background glow */
body.vibe-body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(142, 92, 255, 0.30), transparent 38%),
    radial-gradient(circle at 80% 25%, rgba(79, 209, 197, 0.24), transparent 40%),
    radial-gradient(circle at 55% 78%, rgba(240, 183, 255, 0.24), transparent 36%);
  filter: blur(70px);
  animation: vibeFloat 22s ease-in-out infinite alternate;
}

body.vibe-body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 65% 40%, rgba(142, 92, 255, 0.16), transparent 42%),
    radial-gradient(circle at 28% 75%, rgba(79, 209, 197, 0.14), transparent 40%);
  filter: blur(50px);
  animation: vibePulse 14s ease-in-out infinite alternate;
}

@keyframes vibeFloat {
  0% { transform: translate3d(-30px, 0px, 0) scale(1); }
  50% { transform: translate3d(35px, -25px, 0) scale(1.08); }
  100% { transform: translate3d(0px, 30px, 0) scale(1.02); }
}

@keyframes vibePulse {
  0% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
  100% { opacity: 0.55; transform: scale(1.04); }
}

img {
  max-width: 100%;
  display: block;
}

.site-wrap {
  width: min(var(--max), calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.site-wrap-narrow {
  width: min(var(--max-narrow), calc(100% - 24px));
}

.hero-banner {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(70, 43, 104, 0.18);
  margin: 6px 0 24px;
  background: #e8e2f5;
}

.hero-banner-img {
  width: 100%;
  height: auto;
}

.intro-card,
.toolbar-card,
.status-card,
.form-hero-card,
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro-card,
.form-hero-card {
  text-align: center;
  padding: 24px 20px;
  margin-bottom: 22px;
}

.toolbar-card {
  padding: 16px;
  margin-bottom: 22px;
}

.status-card {
  padding: 18px;
  margin-bottom: 18px;
  text-align: center;
  color: var(--muted);
}

.page-title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.search-box,
.post-form input[type="text"],
.post-form input[type="url"],
.post-form textarea {
  width: 100%;
  border: 1px solid rgba(142, 92, 255, 0.18);
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-box:focus,
.post-form input[type="text"]:focus,
.post-form input[type="url"]:focus,
.post-form textarea:focus {
  border-color: rgba(142, 92, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(142, 92, 255, 0.08);
}

.posts-grid {
  display: grid;
  gap: 22px;
}

.post-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(252,250,255,0.95) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.post-card::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

.post-card-inner {
  padding: 22px 20px 24px;
}

.post-image-wrap {
  margin: 0 0 18px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #ece8f7;
}

.post-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.post-title {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.18;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(142, 92, 255, 0.12), rgba(79, 209, 197, 0.14));
  color: #5c3fa8;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.post-date {
  font-weight: 500;
}

.post-content {
  white-space: pre-wrap;
  line-height: 1.85;
  font-size: 1.04rem;
  color: var(--text);
}

.footer-note {
  text-align: center;
  color: var(--muted);
  margin-top: 26px;
  font-size: 0.95rem;
}

.form-card {
  padding: 22px 20px;
}

.post-form {
  display: grid;
  gap: 18px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  font-weight: 700;
  color: var(--text);
}

.post-form textarea {
  min-height: 230px;
  resize: vertical;
  line-height: 1.7;
}

.field-help {
  color: var(--muted);
  line-height: 1.5;
}

.checkbox-group {
  margin-top: -4px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}

.form-actions {
  padding-top: 4px;
}

.primary-btn {
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: white;
  background: linear-gradient(90deg, #8e5cff, #4fd1c5);
  box-shadow: 0 12px 24px rgba(102, 74, 174, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(102, 74, 174, 0.26);
}

.primary-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-message {
  display: none;
  border-radius: 16px;
  padding: 14px 15px;
  line-height: 1.6;
  font-weight: 600;
}

.form-message.success {
  display: block;
  background: rgba(79, 209, 197, 0.12);
  color: #176d65;
  border: 1px solid rgba(79, 209, 197, 0.25);
}

.form-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.09);
  color: #9f2d2d;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.image-preview-wrap {
  margin-top: -4px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
}

.preview-label {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--muted);
}

.image-preview {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  background: #ece8f7;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 20px;
}

.featured-wrap {
  margin-bottom: 24px;
}

.featured-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(240, 183, 255, 0.22), transparent 28%),
    radial-gradient(circle at bottom left, rgba(79, 209, 197, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(251,248,255,0.97) 100%);
  border: 1px solid rgba(142, 92, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 18px 42px rgba(76, 46, 112, 0.16);
}

.featured-card::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

.featured-card-inner {
  padding: 24px 22px 28px;
}

.featured-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #5f3fb0;
  background: linear-gradient(90deg, rgba(142, 92, 255, 0.14), rgba(79, 209, 197, 0.16));
}

.featured-image-wrap {
  margin: 0 0 18px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #ece8f7;
}

.featured-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.featured-title {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.12;
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.98rem;
}

.featured-content {
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 1.08rem;
  color: var(--text);
}

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

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

@media (max-width: 640px) {
  .site-wrap,
  .site-wrap-narrow {
    width: calc(100% - 16px);
  }

  .hero-banner {
    border-radius: 18px;
    margin-top: 0;
  }

  .intro-card,
  .form-hero-card,
  .form-card,
  .toolbar-card,
  .status-card {
    border-radius: 18px;
  }

  .intro-card,
  .form-hero-card,
  .form-card {
    padding: 18px 16px;
  }

  .post-card {
    border-radius: 20px;
  }

  .post-card-inner {
    padding: 18px 16px 20px;
  }

  .post-title {
    font-size: 1.35rem;
  }

  .post-content {
    font-size: 1rem;
    line-height: 1.78;
  }

  .featured-card {
    border-radius: 22px;
  }

  .featured-card-inner {
    padding: 20px 16px 22px;
  }

  .featured-title {
    font-size: 1.6rem;
  }

  .featured-content {
    font-size: 1rem;
    line-height: 1.8;
  }
}
