/*
╔══════════════════════════════════════════════════════════╗
║   🧋 SCHOOL BUZZ — style.css                            ║
║                                                          ║
║   SECTION 1 — Page & Navbar                             ║
║   EX 1 — Style the page background & text   → line ~45  ║
║   EX 2 — Style the navbar bar               → line ~63  ║
║   EX 3 — Colour the app name span           → line ~77  ║
║   EX 4 — Style the active nav button        → line ~96  ║
║                                                          ║
║   SECTION 2 — Landing Page                              ║
║   EX 5 — Style the live badge               → line ~118 ║
║   EX 6 — Animate the blinking dot           → line ~139 ║
║   EX 7 — Style the big headline             → line ~163 ║
║   EX 8 — Style the Enter button             → line ~181 ║
║   EX 9 — Style the preview cards            → line ~212 ║
║   EX 10 — Add colours to avatar circles     → line ~236 ║
║                                                          ║
║   SECTION 3 — Feed Page                                 ║
║   EX 11 — Style the input fields            → line ~265 ║
║   EX 12 — Style the Post button             → line ~288 ║
║   EX 13 — Style each post card              → line ~320 ║
║   EX 14 — Add colours to mood tags          → line ~345 ║
║   EX 15 — Add colour for YOUR new mood tag  → line ~363 ║
║                                                          ║
║   SECTION 4 — Detail Page                               ║
║   EX 16 — Style the Back button             → line ~378 ║
║   EX 17 — Style the action buttons          → line ~403 ║
║                                                          ║
║   CHALLENGES (write rules from scratch):                 ║
║   CH 1 — Style the character counter        → line ~428 ║
║   CH 2 — Style the Clear Form button        → line ~450 ║
║   CH 3 — Style the search bar               → line ~468 ║
║   CH 4 — Add outline glow on post cards     → line ~487 ║
║   CH 5 — Add a bounce animation             → line ~510 ║
║   CH 6 — Style the Back to Top button       → line ~530 ║
╚══════════════════════════════════════════════════════════╝

HOW CSS WORKS:
  selector {           ← WHO to style
    property: value;   ← WHAT to change
  }

COLOUR PALETTE (use these throughout):
  Dark background : #111111
  Card background : #141414
  Sidebar bg      : #0a0a0a
  Border colour   : #222222
  Orange accent   : #f97316
  Muted text      : #888888
  Light text      : #f0f0f0
*/


/* ── Reset — removes default browser spacing ── */
* { margin: 0; padding: 0; box-sizing: border-box; }


/* ══════════════════════════════════════════════
   SECTION 1 — PAGE & NAVBAR
══════════════════════════════════════════════ */

/* ════════════════════════════════════
  EX 1 — Style the page background & text colour 🎨
  The <body> wraps the whole page.
  Set:
    font-family  → Arial, sans-serif
    background   → a dark colour (try #111111)
    color        → light text colour (try #f0f0f0)
    min-height   → 100vh  (fills the full screen height)
  ✏️ Write the 4 properties inside body { } below:
════════════════════════════════════ */
body {
  /* ✏️ YOUR STYLES GO HERE */
  font-family: Arial, Helvetica, sans-serif;
  background-color: #111111;
  color: #f0f0f0;
  min-height: 100vh;
}


/* ════════════════════════════════════
  EX 2 — Style the navbar bar 🔲
  The .navbar sits at the very top of every screen.
  Set:
    background   → a darker colour than the page (try #000000)
    border-bottom → 1px solid #222222
    padding      → 12px 30px  (top-bottom, left-right)
    display      → flex
    align-items  → center
    justify-content → space-between
  ✏️ Write the 6 properties inside .navbar { } below:
════════════════════════════════════ */
.navbar {
  /* ✏️ YOUR STYLES GO HERE */
  background: #000000;
  border-bottom: #222222;
  padding: 12px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;

}

.nav-title { font-size: 18px; font-weight: bold; }

/* ════════════════════════════════════
  EX 3 — Colour the app name <span> 🌈
  The <span> inside .nav-title gets the accent colour.
  This is how just part of the text becomes orange.
  Set:
    color  → your accent colour (try #f97316)
  ✏️ Write the 1 property below:
════════════════════════════════════ */
.nav-title span {
  /* ✏️ YOUR STYLES GO HERE */
  color: #f97316;

}

.nav-buttons { display: flex; gap: 8px; }

/* Default (not active) nav button */
.nav-btn {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #888;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: Arial, sans-serif;
}

/* ════════════════════════════════════
  EX 4 — Style the ACTIVE nav button ✅
  When a button is active (selected), it should look different.
  The class  .nav-btn.active  targets a button with BOTH classes.
  Set:
    background   → your accent colour (e.g. #f97316)
    border-color → same accent colour
    color        → white
    font-weight  → bold
  ✏️ Write the 4 properties inside .nav-btn.active { } below:
════════════════════════════════════ */
.nav-btn.active {
  /* ✏️ YOUR STYLES GO HERE */
  background: #f97316;
  border-color: #f97316;
  color: white;
  font-weight: bold;

}


/* ── Show / hide screens (keep this — it's needed for JS to work) ── */
.screen        { display: none; }
.screen.active { display: block; }


/* ══════════════════════════════════════════════
   SECTION 2 — LANDING PAGE
══════════════════════════════════════════════ */

/* Layout: 2 equal columns side by side */
.landing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 55px);
}

.landing-left {
  padding: 80px 60px;
  border-right: 1px solid #222;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-right {
  padding: 60px;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

/* ════════════════════════════════════
  EX 5 — Style the "Live Now" badge 🔴
  This is the small orange pill above the headline.
  Set:
    display      → inline-flex
    align-items  → center
    gap          → 8px
    background   → rgba(249, 115, 22, 0.12)   ← orange at 12% opacity
    border       → 1px solid rgba(249, 115, 22, 0.3)
    color        → #f97316
    border-radius → 20px   ← makes it a pill shape
    padding      → 5px 14px
    font-size    → 12px
    font-weight  → bold
    margin-bottom → 24px
    width        → fit-content
  ✏️ Write the 11 properties inside .live-badge { } below:
════════════════════════════════════ */
.live-badge {
  /* ✏️ YOUR STYLES GO HERE */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(249, 115, 22, 0.12) ;
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #f97316;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 24px;
  width: fit-content;
}

/* ════════════════════════════════════
  EX 6 — Animate the blinking dot ⚡
  The orange dot inside the badge blinks on and off.

  STEP 1 — Style the dot itself:
    Set:
      width        → 8px
      height       → 8px
      background   → #f97316
      border-radius → 50%    ← makes it a circle
      animation    → blink 1.4s infinite

  STEP 2 — Write the @keyframes animation:
    @keyframes blink tells the browser HOW to animate.
    At 0% and 100% (start & end) → opacity: 1  (fully visible)
    At 50% (middle) → opacity: 0.2  (nearly invisible)

  ✏️ Write .live-dot { } then @keyframes blink { } below:
════════════════════════════════════ */
.live-dot {
  /* ✏️ YOUR DOT STYLES GO HERE (width, height, background, border-radius, animation) */
  width: 8px;
  height: 8px;
  background: #f97316;
  border-radius: 50%;
  animation: blink 1.4 infinite;
}

@keyframes blink {
  /* ✏️ Write:
       0%, 100% { opacity: 1; }
       50%      { opacity: 0.2; }
  */
}

/* ════════════════════════════════════
  EX 7 — Style the big headline 📰
  The <h1 class="big-title"> is the giant text on the left.
  Set:
    font-size    → 80px
    font-weight  → 900   ← heaviest/boldest weight
    line-height  → 0.9   ← lines sit tight together
    color        → white
    margin-bottom → 16px
  ✏️ Write the 5 properties inside .big-title { } below:
════════════════════════════════════ */
.big-title {
  /* ✏️ YOUR STYLES GO HERE */
  font-size: 80px;
  font-weight: 900;
  line-height: 0.9;
  color: white;
  margin-bottom: 16px;
}

/* The coloured dot in the headline */
.big-title .accent {
  color: #f97316;   /* change this if you change your accent colour */
}

.tagline {
  font-size: 16px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 360px;
}

/* ════════════════════════════════════
  EX 8 — Style the "See What's Happening" button 🟠
  This is the big orange call-to-action button.
  Set:
    background   → #f97316
    color        → white
    border       → none
    border-radius → 12px
    padding      → 18px 28px
    font-size    → 16px
    font-weight  → bold
    cursor       → pointer
    max-width    → 340px
    width        → 100%
    display      → flex
    justify-content → space-between
    font-family  → Arial, sans-serif

  ALSO add a hover state:
    .enter-btn:hover { background: #e06010; }
  ✏️ Write .enter-btn { } and .enter-btn:hover { } below:
════════════════════════════════════ */
.enter-btn {
  /* ✏️ YOUR STYLES GO HERE */
  background: #f97316;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 18px 28px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  max-width: 340px;
  width:100%;
  display :flex;
  justify-content: space-between;
  font-family:Arial, sans-serif;


}

.enter-btn:hover {
  /* ✏️ YOUR HOVER STYLE GOES HERE */
  .enter-btn:hover { background: #e06010; }
  .enter-btn {}
  .enter-btn:hover {}
}

.preview-label {
  font-size: 11px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

/* ════════════════════════════════════
  EX 9 — Style the preview cards 🃏
  These are the small post preview cards on the right side.
  Each card is a flex row: [avatar circle] [text]
  Set:
    background   → #141414
    border       → 1px solid #222222
    border-radius → 10px
    padding      → 14px
    display      → flex
    align-items  → center
    gap          → 12px

  ALSO add a hover state that lightens the border:
    .preview-card:hover { border-color: #333333; }
  ✏️ Write .preview-card { } and .preview-card:hover { } below:
════════════════════════════════════ */
.preview-card {
  /* ✏️ YOUR STYLES GO HERE */
  background:#141414;
  border: 1px solid #222222;
  border-radius: 10px;
  padding:14px;
  display: flex;
  align-items:center;
  gap:12px;


}

.preview-card:hover {
  /* ✏️ YOUR HOVER STYLE GOES HERE */
  .preview-card:hover { border-color: #333333; }
  .preview-card{}
  .preview-card:hover{}

}

/* ════════════════════════════════════
  EX 10 — Add colours to avatar circles 🔵🟠🟣
  Each avatar is a circle with a letter inside.
  The base .avatar rule makes it a circle — already written below.
  YOU write the colour classes that go on each avatar.

  Pattern:
    .orange-av { background: #f97316; }
    .blue-av   { background: #3b82f6; }
    ... and so on

  Available colours to use:
    Orange: #f97316    Blue:   #3b82f6
    Purple: #a855f7    Green:  #22c55e
    Pink:   #ec4899    Teal:   #14b8a6

  ✏️ Write all 6 colour classes below:
════════════════════════════════════ */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

/* ✏️ Write your 6 colour classes here:
   .orange-av { }
   .blue-av   { }
   .purple-av { }
   .green-av  { }
   .pink-av   { }
   .teal-av   { }
*/

.preview-username { font-size: 12px; font-weight: bold; color: #f97316; margin-bottom: 3px; }
.preview-text     { font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ══════════════════════════════════════════════
   SECTION 3 — FEED PAGE
══════════════════════════════════════════════ */

/* Layout: fixed left sidebar + flexible right feed */
.feed-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 55px);
}

.sidebar {
  border-right: 1px solid #222;
  background: #0a0a0a;
  overflow-y: auto;
}

.compose-box {
  padding: 20px;
  border-bottom: 1px solid #222;
}

.compose-box h3 { font-size: 13px; color: #aaa; margin-bottom: 14px; }

/* ════════════════════════════════════
  EX 11 — Style the input fields 📝
  The .field class is shared by <input>, <textarea>, and <select>.
  Set:
    width        → 100%
    background   → #161616
    border       → 1px solid #222222
    border-radius → 8px
    padding      → 10px 12px
    font-size    → 13px
    color        → #f0f0f0
    font-family  → Arial, sans-serif
    outline      → none   ← removes the default browser ring
    margin-bottom → 10px
    display      → block

  ALSO add placeholder text colour:
    .field::placeholder { color: #444444; }

  AND add a focus state — when the user clicks an input,
  the border lights up:
    .field:focus { border-color: #f97316; }

  ✏️ Write .field { }, .field::placeholder { }, .field:focus { } below:
════════════════════════════════════ */
.field {
  /* ✏️ YOUR STYLES GO HERE */
  width  : 100%;
  background: #161616;
  border:1px solid #222222;
  border-radius: 8px;
  padding:10px 12px;
  font-size: 13px;
  color : #f0f0f0;
  font-family : Arial, sans-serif;
  outline :none  ;
  margin-bottom : 10px;
  display  :block;

}

.field::placeholder {
  /* ✏️ YOUR STYLES GO HERE */
  .field::placeholder { color: #444444; }

}

.field:focus {
  /* ✏️ YOUR STYLES GO HERE */
  .field:focus { border-color: #f97316; }


}

textarea.field { resize: none; height: 80px; }

/* Row with Post + Clear buttons side by side */
.btn-row { display: flex; gap: 8px; margin-top: 4px; }

/* ════════════════════════════════════
  EX 12 — Style the Post button 🚀
  Set:
    background   → your accent colour
    color        → white
    border       → none
    border-radius → 8px
    padding      → 10px 20px
    font-size    → 13px
    font-weight  → bold
    cursor       → pointer
    flex         → 1   ← takes up remaining width in .btn-row
    font-family  → Arial, sans-serif

  AND a hover state:
    .post-btn:hover { background: slightly darker colour }
  ✏️ Write .post-btn { } and .post-btn:hover { } below:
════════════════════════════════════ */
.post-btn {
  /* ✏️ YOUR STYLES GO HERE */
  background: #f97316;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 1opx 20px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  flex: 1;
  font-family: Arial, Helvetica, sans-serif;

}

.post-btn:hover {
  /* ✏️ YOUR HOVER STYLE GOES HERE */
  .post-btn:hover { background: slightly darker colour }
  .post-btn{}
  .post-btn:hover{}

}

/* Stats boxes row */
.stats-row { display: flex; gap: 10px; padding: 16px 20px; }

.stat-box {
  flex: 1;
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.stat-num  { font-size: 20px; font-weight: bold; }
.stat-name { font-size: 10px; color: #555; margin-top: 3px; }

/* Feed column wrapper */
.feed-col  { display: flex; flex-direction: column; overflow: hidden; }
.feed-list { overflow-y: auto; flex: 1; }

/* ════════════════════════════════════
  EX 13 — Style each post card 📰
  A post card is a flex row: [avatar] [post body] [delete button]
  Set:
    background   → #141414
    border-bottom → 1px solid #1e1e1e
    padding      → 16px 20px
    display      → flex
    gap          → 12px
    align-items  → flex-start

  AND a hover state:
    .post-card:hover { background: #161616; }

  ✏️ Write .post-card { } and .post-card:hover { } below:
════════════════════════════════════ */
.post-card {
  /* ✏️ YOUR STYLES GO HERE */
  background: #141414;
  border-bottom: 1px solid #1e1e1e;
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;

}

.post-card:hover {
  /* ✏️ YOUR HOVER STYLE GOES HERE */
  .post-card:hover { background: #161616; }
  .post-card{}
  .post-btn:hover{}


}

.post-body     { flex: 1; min-width: 0; }
.post-username { font-size: 13px; font-weight: bold; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.post-text     { font-size: 13px; color: #bbb; line-height: 1.6; margin-bottom: 6px; }
.post-time     { font-size: 11px; color: #444; }

.del-btn         { background: none; border: none; color: #444; cursor: pointer; font-size: 15px; flex-shrink: 0; padding: 2px 6px; }
.del-btn:hover   { color: #ef4444; }
.view-link       { font-size: 11px; color: #555; cursor: pointer; margin-left: 8px; }
.view-link:hover { color: #f97316; }

/* ════════════════════════════════════
  EX 14 — Add colours to mood tag pills 🏷️
  Each tag is a small coloured label on a post.
  The base .tag rule is already written below.
  YOU write the colour rules for each mood.

  PATTERN:
    .tag-hot {
      background: rgba(249, 115, 22, 0.15);  ← orange at 15% opacity
      color: #f97316;
    }

  rgba(R, G, B, opacity) — 0.15 = 15% solid, mostly see-through

  Write a rule for each of the 4 mood tags:
    tag-hot    → orange:  rgba(249, 115, 22, 0.15)  / #f97316
    tag-funny  → purple:  rgba(167, 139, 250, 0.15) / #a78bfa
    tag-shock  → blue:    rgba(96,  165, 250, 0.15) / #60a5fa
    tag-proud  → green:   rgba(34,  197, 94,  0.15) / #22c55e

  ✏️ Write all 4 tag colour rules below:
════════════════════════════════════ */
.tag { font-size: 10px; font-weight: bold; padding: 2px 9px; border-radius: 10px; }

/* ✏️ Write your 4 tag colour rules here:
   .tag-hot   { }
   .tag-funny { }
   .tag-shock { }
   .tag-proud { }
*/

/* ════════════════════════════════════
  EX 15 — Add colour for YOUR new mood tag 🎨
  This connects to EX 5 in index.html and EX 3 in script.js.
  Pattern:
    .tag-YOURNAME { background: rgba(R,G,B,0.15); color: #HEXCODE; }
  ✏️ Write your new tag colour rule below:
════════════════════════════════════ */
/* ✏️ Write your .tag-YOURNAME { } here */


/* ══════════════════════════════════════════════
   SECTION 4 — DETAIL PAGE
══════════════════════════════════════════════ */

.detail-header {
  background: #0a0a0a;
  border-bottom: 1px solid #222;
  padding: 16px 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ════════════════════════════════════
  EX 16 — Style the Back button 🔙
  Set:
    background   → rgba(249, 115, 22, 0.1)  ← faint orange
    border       → 1px solid rgba(249, 115, 22, 0.3)
    color        → #f97316
    border-radius → 8px
    padding      → 8px 16px
    font-size    → 13px
    font-weight  → bold
    cursor       → pointer
    font-family  → Arial, sans-serif

  AND a hover state:
    .back-btn:hover { background: rgba(249, 115, 22, 0.2); }
  ✏️ Write .back-btn { } and .back-btn:hover { } below:
════════════════════════════════════ */
.back-btn {
  /* ✏️ YOUR STYLES GO HERE */
  background: rgba(249, 115, 22, 0.1)  ;
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #f97316;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;

}

.back-btn:hover {
  /* ✏️ YOUR HOVER STYLE GOES HERE */
  .back-btn:hover { background: rgba(249, 115, 22, 0.2); }
  .back-btn {}
  .back-btn:hover { }

}

/* Detail layout: big post on left, sidebar on right */
.detail-layout  { display: grid; grid-template-columns: 1fr 360px; height: calc(100vh - 55px - 53px); }
.detail-main    { padding: 32px; overflow-y: auto; }

.big-card         { background: #141414; border: 1px solid #222; border-radius: 14px; overflow: hidden; }
.big-card-top     { padding: 18px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #222; }
.big-avatar       { width: 48px; height: 48px; border-radius: 50%; background: #f97316; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: bold; color: white; flex-shrink: 0; }
.big-username     { font-size: 15px; font-weight: bold; color: #f97316; }
.big-time         { font-size: 11px; color: #555; margin-top: 3px; }
.big-tag          { margin-left: auto; padding: 5px 14px; background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.2); border-radius: 10px; font-size: 11px; font-weight: bold; color: #f97316; }

.stats-bar            { display: flex; border-bottom: 1px solid #222; }
.stat-item            { flex: 1; padding: 16px; text-align: center; border-right: 1px solid #222; }
.stat-item:last-child { border-right: none; }
.stat-item .s-num     { font-size: 22px; font-weight: bold; }
.stat-item .s-name    { font-size: 10px; color: #555; margin-top: 3px; }

.big-message { padding: 20px; font-size: 15px; color: #ccc; line-height: 1.7; border-bottom: 1px solid #222; }

.action-row { padding: 14px 20px; display: flex; gap: 10px; }

/* ════════════════════════════════════
  EX 17 — Style the action buttons (Like, Reply, Share) 💬
  Set:
    background   → #1a1a1a
    border       → 1px solid #222222
    color        → #888888
    border-radius → 8px
    padding      → 10px 18px
    font-size    → 13px
    font-weight  → 600
    cursor       → pointer
    font-family  → Arial, sans-serif

  AND a hover state:
    .action-btn:hover { background: #222; color: #f0f0f0; }

  AND a liked state (when Like is clicked, JS adds .liked class):
    .action-btn.liked { color: #f97316; border-color: rgba(249,115,22,0.4); }

  ✏️ Write all 3 rules below:
════════════════════════════════════ */
.action-btn {
  /* ✏️ YOUR STYLES GO HERE */
  background: #1a1a1a;
  border: 1px solid #222222;
  color: #888888;
  border-radius: 8px;
  padding: 1opx 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
}

.action-btn:hover {
  /* ✏️ YOUR HOVER STYLE GOES HERE */
  .action-btn:hover { background: #222; color: #f0f0f0; }
}

.action-btn.liked {
  /* ✏️ YOUR LIKED STYLE GOES HERE */
  .action-btn.liked { color: #f97316; border-color: rgba(249,115,22,0.4); }
}

.detail-sidebar { background: #090909; border-left: 1px solid #222; padding: 28px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; }
.sidebar-label  { font-size: 11px; color: #444; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill  { background: #161616; border: 1px solid #222; border-radius: 20px; padding: 6px 14px; font-size: 12px; font-weight: 600; color: #888; cursor: pointer; }
.pill:hover { border-color: #f97316; color: #f97316; }

.related-card       { background: #141414; border: 1px solid #222; border-radius: 10px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.related-card:hover { border-color: #333; }
.related-user       { font-size: 11px; font-weight: bold; color: #f97316; margin-bottom: 6px; }
.related-text       { font-size: 12px; color: #666; line-height: 1.5; }


/* ══════════════════════════════════════════════
   ⚡ CHALLENGE SECTION — write rules from scratch
   Each challenge tells you WHAT to write and WHY.
   There are no starter rules — you write everything!
══════════════════════════════════════════════ */


/* ════════════════════════════════════
  CH 1 — Style the character counter 🔢

  WHAT IT IS:
    Below the message box is:
      <p class="char-counter">Characters left: <span id="char-count">150</span></p>
    It counts down as the user types.

  WHAT TO WRITE:
    .char-counter {
      font-size: 11px;
      color: #555555;
      text-align: right;
      margin-top: -6px;
      margin-bottom: 10px;
    }

  BONUS — make it turn red when almost out of characters.
  In script.js (CH 1), the 'danger' class is added when < 20 left.
  Style it:
    .char-counter.danger { color: #ef4444; font-weight: bold; }

  ✏️ Write both rules below:
════════════════════════════════════ */
/* ✏️ Write .char-counter { } here */
.char-counter {
  font-size: 11px;
  color: #555555;
  text-align: right;
  margin-top: -6px;
  margin-bottom: 10px;
}


/* ✏️ Write .char-counter.danger { } here */
.char-counter.danger { color: #ef4444; font-weight: bold; }



/* ════════════════════════════════════
  CH 2 — Style the Clear Form button 🗑️

  WHAT IT IS:
    The "Clear" button next to "Post it!" has class="clear-btn".
    Right now it has NO styles — it looks like a plain browser button.

  WHAT TO WRITE:
    Make it match the dark theme:
      background: #1a1a1a;
      color: #888888;
      border: 1px solid #333333;
      border-radius: 8px;
      padding: 10px 16px;
      font-size: 13px;
      cursor: pointer;
      font-family: Arial, sans-serif;

    Add hover:
      .clear-btn:hover { background: #2a2a2a; color: #f0f0f0; }

  ✏️ Write both rules below:
════════════════════════════════════ */
/* ✏️ Write .clear-btn { } here */
.clear-btn{
  background: #1a1a1a;
  color: #888888;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  font-family: Arial, sans-serif;
}

/* ✏️ Write .clear-btn:hover { } here */


/* ════════════════════════════════════
  CH 3 — Style the search bar 🔍

  WHAT IT IS:
    The search input above the feed has class="search-field".
    It already inherits .field styles, but needs positioning.

  WHAT TO WRITE:
    .search-field {
      margin: 12px 16px 4px;
      width: calc(100% - 32px);
      border-color: #333333;
    }
    .search-field:focus {
      border-color: #f97316;
    }

  ✏️ Write both rules below:
════════════════════════════════════ */
/* ✏️ Write .search-field { } here */
.search-field {
  margin: 12px 16px 4px;
  width: calc(100% - 32px);
  border-color: #333333;
}

/* ✏️ Write .search-field:focus { } here */
.search-field:focus {
  border-color: #f97316;
}


/* ════════════════════════════════════
  CH 4 — Outline + glow when hovering a post card 🌟

  WHAT IS outline?
    outline is drawn OUTSIDE the element's border box.
    Unlike border, it takes NO space — it does not push
    other elements away.

  WHAT IS outline-offset?
    outline-offset sets a gap between the element and its outline.
    Example: outline-offset: 4px; creates a small gap.

  WHAT TO WRITE:
    First, add  transition  to the existing .post-card rule
    (find it above and add):
      transition: background 0.15s, outline 0.15s;

    Then write the hover rule:
      .post-card:hover {
        outline: 2px solid #f97316;
        outline-offset: -2px;
        background: #1a1a1a;
      }

  ✏️ Add transition to .post-card above, then write hover below:
════════════════════════════════════ */
/* .post-card:hover {
    ✏️ write outline, outline-offset, background here
} */
.post-card:hover {
  outline: 2px solid #f97316;
  outline-offset: -2px;
  background: #1a1a1a;
}


/* ════════════════════════════════════
  CH 5 — Add a bounce animation to the Like button 💥

  WHAT IS @keyframes?
    @keyframes defines what an animation looks like step by step.
    Then you attach it to an element using:
      animation: NAME DURATION;

  WHAT TO WRITE:
    Step 1 — Write the keyframes:
      @keyframes pop {
        0%   { transform: scale(1); }
        50%  { transform: scale(1.3); }
        100% { transform: scale(1); }
      }

    Step 2 — In script.js (EX 6) the animation is already triggered
    on the button. No extra CSS class needed here — just the @keyframes!

  ✏️ Write @keyframes pop { } below:
════════════════════════════════════ */
/* ✏️ Write @keyframes pop { } here */
@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}



/* ════════════════════════════════════
  CH 6 — Style the floating Back to Top button 🔼

  WHAT IS position: fixed?
    A fixed element stays in the same spot on screen
    even when the user scrolls. Perfect for floating buttons!

  WHAT IS z-index?
    z-index controls which element sits ON TOP when they overlap.
    A higher z-index = on top.

  WHAT TO WRITE:
    #top-btn {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: #f97316;
      color: white;
      border: none;
      border-radius: 50%;   ← makes it a circle
      width: 44px;
      height: 44px;
      font-size: 18px;
      cursor: pointer;
      z-index: 99;
      font-family: Arial, sans-serif;
    }

    BONUS hover:
  ✏️ Write #top-btn { } and #top-btn:hover { } below:
════════════════════════════════════ */
/* ✏️ Write #top-btn { } here */
#top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #f97316;
  color: white;
  border: none;
  border-radius: 50%; 
  width: 44px;
  height: 44px;
  font-size: 18px;
  cursor: pointer;
  z-index: 99;
  font-family: Arial, sans-serif;
}

/* ✏️ Write #top-btn:hover { } here */
#top-btn {}
#top-btn:hover { }
