/* ========== Base & Layout ========== */
:root{
  --sky: #bfefff;
  --sky-deep: #b3e5fc;
  --accent-green: #66bb6a;
  --cream: #f7fdff;
  --card-bg: #fffdf9;
  --brown: #5d4037;
  --muted: #6b6b6b;
}

* { box-sizing: border-box; }
html,body{ height:100%; }
body {
  margin:0;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-deep) 100%);
  color: #222;
  overflow-x: hidden;
}

/* ===== Hero ===== */
.hero {
  padding-top: 36px;
  padding-bottom: 16px;
  text-align: center;
}

.title {
  font-family: 'Comic Neue', cursive;
  font-size: clamp(2rem, 4vw, 3.4rem);
  color: var(--brown);
  text-shadow: 0 2px 0 rgba(0,0,0,0.04);
  margin-bottom: 6px;
}

.subtitle {
  font-size: 1.1rem;
  color: #444;
  margin-top: 0;
}

/* ===== Form card ===== */
.form-card {
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(247,253,255,0.98));
  padding: 0;
}

/* small green icon and title */
.form-icon {
  width:42px; height:42px;
  display:grid; place-items:center;
  background: #e6f8ec; color: var(--accent-green);
  border-radius:8px; font-size:1.1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border:1px solid rgba(102,187,106,0.15);
}

/* inputs */
.custom-input {
  background: #eaf7ff;
  border-radius: 8px;
  border: 1px solid rgba(120,120,120,0.08);
  padding: 12px 14px;
  font-size: 0.95rem;
  transition: box-shadow .18s ease, transform .12s ease;
}

.custom-input:focus {
  outline: none;
  box-shadow: 0 6px 18px rgba(102,187,106,0.12);
  transform: translateY(-1px);
  border-color: rgba(102,187,106,0.4);
}

/* special checkbox block */
.custom-check {
  background: #fffdf9;
}

/* publish button */
.btn-publish {
  background: var(--accent-green); color: #fff; border:none;
  padding: 10px 14px;
}

/* helper text */
.text-brown { color: var(--brown); font-weight:600; }

/* ===== Posts grid & cards ===== */
#postsContainer { margin-top: 6px; }

.post-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 8px 18px rgba(12,12,12,0.06);
  transition: transform .18s ease, box-shadow .18s ease;
  height:100%;
  display:flex; flex-direction:column;
}

.post-card:hover{
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 34px rgba(12,12,12,0.09);
}

/* post header */
.post-title {
  font-weight:700; color: #2b2b2b; margin-bottom:8px;
  font-size:1.05rem;
}

.post-meta { color: var(--muted); font-size:0.9rem; margin-bottom:12px; }

/* card actions */
.card-actions { margin-top:auto; display:flex; gap:8px; justify-content:flex-end; }

/* tiny buttons */
.btn-sm-round { border-radius:10px; padding:6px 8px; }

/* ===== Sky / Clouds animations ===== */
.sky { position: fixed; inset:0; pointer-events:none; z-index: -5; overflow:hidden; }

.cloud { position:absolute; width:360px; height:auto; opacity:0.9; transform-origin:center; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.03)); }

/* different clouds placed and animated at different speeds */
.cloud-1 { top:6%; left:-30%; animation: cloudMove linear infinite; animation-duration: 75s; transform: scale(.9); }
.cloud-2 { top:28%; left:-50%; animation: cloudMove linear infinite; animation-duration: 95s; transform: scale(1.1); opacity:0.8; }
.cloud-3 { top:55%; left:-40%; animation: cloudMove linear infinite; animation-duration: 110s; transform: scale(1.2); opacity:0.6; }

@keyframes cloudMove {
  0% { transform: translateX(0) scale(var(--)); }
  100% { transform: translateX(240vw); }
}

/* ===== Nature layer (trees & flowers) ===== */
.nature-layer {
  position: fixed;
  left: 0; right:0;
  bottom: 0;
  height: 180px;
  z-index: -3;
  display:flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  padding-bottom: 6px;
}

/* simple SVG-like shapes using CSS for reliability */
.nature-item {
  transform-origin: bottom center;
}

.tree {
  width: 64px; height: 140px;
  background: linear-gradient(180deg,#2e7d32 0%, #1b5e20 100%);
  border-radius: 30px 30px 8px 8px;
  box-shadow: 0 10px 18px rgba(20,80,30,0.12) inset;
  position: relative;
  animation: treeSway 6s ease-in-out infinite alternate;
}
.tree::after{
  content:"";
  position:absolute; left:10px; right:10px; top:-28px; height:48px;
  background: radial-gradient(circle at 35% 35%, #66bb6a, #2e7d32 70%);
  border-radius: 50%;
  opacity:0.95;
}

.flower {
  width: 36px; height: 36px;
  background: radial-gradient(circle at 40% 30%, #ffb6c1 0%, #ec407a 60%);
  border-radius: 50%;
  box-shadow: 0 6px 12px rgba(236,64,122,0.12) inset;
  animation: flowerSway 4.5s ease-in-out infinite alternate;
}

/* sway animations */
@keyframes treeSway {
  0%{ transform: rotate(-2.5deg); }
  100%{ transform: rotate(2.5deg); }
}
@keyframes flowerSway {
  0%{ transform: translateY(0) rotate(-2deg); }
  100%{ transform: translateY(-6px) rotate(2deg); }
}

/* ===== Petals falling (JS creates petals) ===== */
.petal {
  position: fixed;
  width: 12px; height: 18px;
  background: radial-gradient(ellipse at 50% 40%, #ffd6e8 0%, #ff8fbf 60%);
  border-radius: 60% 40% 60% 40%;
  opacity: 0.95;
  pointer-events:none;
  z-index: -2;
  transform-origin: center;
  will-change: transform, opacity;
}

/* petal animation is inline in JS via transform & transition to avoid many keyframes */

/* ===== Small screens tweaks ===== */
@media (max-width: 991px){
  .nature-layer { height:120px; gap:12px; padding-bottom:2px; }
  .tree { width:48px; height:100px; }
  .title { font-size: 2.2rem; }
}

/* ===== Toast style (bootstrap default enhancement) ===== */
.toast-container .toast { min-width: 220px; }

/* ===== Accessibility focus ring ===== */
.custom-input:focus-visible { outline: 3px solid rgba(102,187,106,0.18); outline-offset: 2px; }
