/* =====================================================
   CSS VARIABLES (LOCKED DESIGN SYSTEM)
===================================================== */
:root {
  --header-bg: #515E92;
  --footer-bg: #040C64;
  --side-bg:   #3F4353;
  --body-bg:   #CED2D7;

  --text-main: #0A0A0A;
  --text-light:#FFFFFF;
  --text-muted:#6B7280;

  --accent:    #F59E0B; /* gold */
}

/* =====================================================
   RESET / BASE
===================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--body-bg);
  color: var(--text-main);
  font-family: 'Libre Baskerville', Georgia, serif;
  line-height: 1.7;
}

/* =====================================================
   TYPOGRAPHY
===================================================== */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  margin-top: 0;
}

/* =====================================================
   HEADER (LOCKED)
===================================================== */
header {
  background: var(--header-bg);
  color: var(--text-light);
  padding: 0.6rem 1.5rem;
  border-bottom: 4px solid var(--accent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search {
  display: flex;
  align-items: center;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.logo-text {
  font-family: 'Pacifico', cursive;
  font-size: 1.3rem;
  color: var(--text-light);
  white-space: nowrap;
}

/* Navigation */
nav a {
  color: var(--text-light);
  text-decoration: none;
  margin-right: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
}

nav a:hover {
  text-decoration: underline;
}

/* Search */
.search {
  display: flex;
  align-items: center;
}

.search input {
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  border: none;
  font-family: 'Inter', system-ui, sans-serif;
}

/* User / Coins */
/* User / Coins */
.user-ui {
  display: flex;
  align-items: center;
  gap: 8px;

  font-family: 'Inter', system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.85);
}



.user-ui a {
  color: #FFD700;
  text-decoration: none;
  font-weight: 800;
}


.header-logout {
  color: #FFD700;
  font-weight: 800;
  position: relative;
  z-index: 3;
}

.user-ui a:hover {
  text-decoration: underline;
}

.coins {
  color: var(--accent);
  font-weight: 600;
}

/* =====================================================
   HEADER PROFILE LINK (AVATAR + USERNAME)
===================================================== */



.header-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.6rem;
  text-decoration: none;
  color: var(--text-light);
}

.header-profile-link:hover {
  text-decoration: underline;
}

/* Avatar circle */
.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;

  background-color: #FFD700; /* gold / yellow */
  color: #000000;            /* black initial */

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.5rem;
  font-weight: 1000;

  overflow: hidden;
}

/* Avatar image */
.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Initials fallback */
.header-avatar .avatar-initials {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

/* Username text */
.header-username {
  font-size: 1rem;
  font-weight: 1000;
  white-space: nowrap;
  
}

/* =====================================================
   PAGE LAYOUT
===================================================== */
page 
.side {
  background: var(--side-bg);
  color: var(--text-light);
  padding: 1rem;
}

.content {
  padding: 2rem;
}

/* =====================================================
   BUTTONS
===================================================== */
.btn-pill-primary {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;

  background: var(--header-bg);
  color: var(--text-light);
  text-decoration: none;

  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;

  border: none;
  cursor: pointer;

  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-pill-primary:hover {
  background: #5f6db0;
  transform: translateY(-1px);
}

.btn-pill-secondary {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;

  background: #515E92; /* same as category pill */
  color: #ffffff;

  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;

  border: none;
  cursor: pointer;
  text-decoration: none;

  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-pill-secondary:hover {
  background: #5f6db0;
  transform: translateY(-1px);
}

.btn-pill-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* =====================================================
   STORY WRITE SECTION (CORRECT HIERARCHY)
===================================================== */
.story-write {
  margin-bottom: 1rem;
}

/* Prompt */
.story-prompt {
  font-family: 'Pacifico', cursive;
  font-size: 1.6rem;
  font-weight: 400;
  color: #1f2937;
  letter-spacing: 0.4px;
  margin-bottom: 0.75rem;
}

/* Writing canvas ONLY */
.story-canvas {
  background: #ffffff;
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

/* Textarea */
.story-input {
  width: 100%;
  min-height: 200px;
  padding: 0.75rem;

  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1rem;

  border-radius: 6px;
  border: 1px solid #000000;
  resize: vertical;
}

/* CTA row */
.story-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Guidance outside the canvas */
.story-guidance {
  margin-top: 0.6rem;
  margin-left: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =====================================================
   STORIES FEED
===================================================== */
.stories-feed {
  margin-top: 2.5rem;
}

.stories-empty {
  font-size: 1rem;
}

/* =====================================================
   FOOTER
===================================================== */
footer {
  background: var(--footer-bg);
  color: var(--text-light);
  text-align: center;
  padding: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  border-top: 4px solid var(--accent);
}

/* =====================================================
   HOME PAGE (ISOLATED NO GLOBAL IMPACT)
===================================================== */

/* HERO SECTION */
.home-hero {
  margin-bottom: 3rem;
}

.home-hero h1 {
  font-family: 'Pacifico', cursive;
  font-size: 1.8rem;
  font-weight: 400;          /* thinner stroke */
  line-height: 1.4;
  color: #00037;
  letter-spacing: 0.5px;
}

/* THREE BLOCK LAYOUT */
.home-blocks {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

/* CARD */
.home-block
{
  background: #ffffff;     /* header color */
  border-radius: 16px;
  padding: 2rem 1.8rem;
  min-height: 400px;
  border-bottom: 4px solid var(--accent);
border-top: 4px solid var(--accent);


  /* subtle depth */
  box-shadow: inset 0 0 18px rgba(0,0,0,0.15);
}

/* CARD HEADLINES THE 3 LINES */
.home-block h2 {
  font-family:'Pacifico', cursive;
  font-size: 2.2rem;
  font-weight: 400;          /* slightly stronger than hero */
  line-height: 1.45;
  color: #000000;
  margin-bottom: 1.4rem;
   -webkit-text-stroke: .5px #FF9000;
}

/* SUPPORTING TEXT */
.home-block p {
  font-family: 'Pacifico', cursive;
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.8;
  color: #333333;
  margin-bottom: 1.2rem;
}

/* LINKS */
.home-block a {
  font-family: 'Pacifico', cursive;
  font-size: 1.5rem;
  font-weight: 500;
   font-style: italic;
  color: #1f3a8a;
   -webkit-text-stroke: .5 #2f678c
  text-decoration: underline;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

main.content {
  flex: 1;
}

/* Footer always pushed down */
main.content {
  flex: 1 0 auto;
}

footer {
  margin-top: auto;
}

/* =========================
   PROFILE PAGE — FINAL
   Pills only. No panels.
========================= */

.profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  color: #2b2b2b;
}

/* =========================
   MAIN PILL STYLE
========================= */
.profile-page .pill {
  background: linear-gradient(180deg, #fbf8f3 0%, #f3eee5 100%);
  border-radius: 28px;
  padding: 28px 32px;
  margin-bottom: 32px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(214, 179, 106, 0.6);
}

/* =========================
   HERO PILL
========================= */
.pill-hero {
  display: flex;
  align-items: center;
  gap: 24px;
}



.avatar-pill {
  width: 64px;              /* ↓ reduced from 96px */
  height: 64px;
  border-radius: 50%;
  overflow: hidden;         /* ✅ CRITICAL */
  background: radial-gradient(circle at top, #ffffff 0%, #f1ebdf 70%);
  border: 2px solid #d6b36a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-pill img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* ✅ CRITICAL */
  object-position: center;
  display: block;
}

.hero-center h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 600;
}

.tagline {
  margin: 0 0 10px;
  color: #6b6b6b;
}

.stats-row {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: #6b6b6b;
}



/* =========================
   MIDDLE ROW (ABOUT + COMMENTS)
========================= */
.profile-middle {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 32px;
}

/* =========================
   INNER PILLS
========================= */
.question-pill,
.comment-pill,
.post-pill {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  padding: 16px 18px;
  margin-top: 16px;
  box-shadow:
    inset 0 0 0 1px rgba(214, 179, 106, 0.25);
}

.recent-comments {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recent-comment-item {
  background: #E6F1F7;
  border-radius: 14px;
  padding: 12px 14px;

  border: 1.5px solid #000000; /* ✅ black border */
}


.recent-comment-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.recent-comment-content {
  margin-top: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.recent-comment-date {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.recent-post-link {
  color: #1d4ed8;      /* blue */
  font-weight: 700;    /* bold */
  text-decoration: underline;
}

.recent-post-link:hover {
  color: #1e40af;
}

.recent-post-type {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}


/* =========================
   FORM ELEMENTS
========================= */
.profile-page label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.profile-page input,
.profile-page textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dcdcdc;
  font-size: 14px;
  background: #ffffff;
}

.profile-page input:focus,
.profile-page textarea:focus {
  outline: none;
  border-color: #d6b36a;
  box-shadow: 0 0 0 2px rgba(214, 179, 106, 0.25);
}

/* =========================
   BUTTONS (GOLD)
========================= */
.btn-pill {
  margin-top: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7e6b8 0%, #d6b36a 100%);
  color: #3a2a10;
  border: 1px solid #b8944a;
  font-size: 14px;
  cursor: pointer;
}

.btn-pill:hover {
  background: linear-gradient(180deg, #d6b36a 0%, #b8944a 100%);
}

.popular-post-item {
  margin-bottom: 14px;
}

.popular-post-link {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: underline;
}

.popular-post-link:hover {
  color: #1e40af;
}

.popular-post-type {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.popular-post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}


/* =========================
   POSTS SECTION
========================= */
.pill-posts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* =========================
   EMPTY TEXT
========================= */
.empty-state {
  font-size: 14px;
  color: #777;
}


/* ===============================
   PROFILE LAYOUT (LEFT GUTTER)
================================ */

.profile-layout {
  display: flex;
  align-items: flex-start;
  gap: 10px; /* tighter, ~¼ inch */
}

/* Main profile stays centered */
.profile-page {
  flex: 1;
  max-width: 1600px;
}


/* ===============================
   COINS PILL (ACTUAL PILL)
================================ */
.floating-coins {
  width: 260px;
  min-width: 260px;

  background: #74b3ce;
  border-radius: 22px;
  padding: 20px;

  border: 2px solid #000000; /* ✅ black border */

  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* Align coins pill with hero username */
.floating-coins {
  margin-top: 32px; /* matches .profile-page top padding */
}


/* Coin stats */
.coin-stat-pill {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  text-align: center;
}

.coin-label {
  display: block;
  font-size: 12px;
  opacity: 0.7;
}

.coin-value {
  font-size: 20px;
  font-weight: 700;
}

/* Divider */
.coin-divider {
  border: none;
  height: 1px;
  background: #ddd;
  margin: 12px 0;
}


 .coin-cta-pill {
  padding: 10px 14px;      /* reduce height */
  font-size: 0.9rem;      /* smaller text */
  border-radius: 14px;    /* slightly tighter */
  margin-top: 8px;
}

.coin-cta-pill.secondary {
  margin-top: 6px;
}



 /* ===============================
   COINS PILL – VERTICAL STACK
================================ */

/* Top action links */
.floating-coins a {
  display: block;
  margin-bottom: 6px;

  font-weight: 800;
  color: #000000; /* gold */
  text-decoration: none;
}

.floating-coins a:hover {
  text-decoration: underline;
}

/* History buttons */
.floating-coins .coin-action-pill {
  display: block;
  width: 100%;
  margin-bottom: 6px;
}

.coin-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.coin-action-pill::before,
.coin-action-pill::after {
  content: none !important;
  display: none !important;
}

/* =====================================================
   GLOBAL SEARCH — FINAL STYLES (LOCKED)
===================================================== */

/* -----------------------------
   MAIN SEARCH PILL (DO NOT TOUCH)
----------------------------- */
.search.global-search.search-pill {
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  position: relative;

  border: 2px solid var(--accent); /* gold border */
}

.search.global-search.search-pill input {
  background: transparent;
  border: none;
  outline: none;
  color: #000000;
  font-size: 0.9rem;
  width: 180px;
}

.search.global-search.search-pill input::placeholder {
  color: #555555;
}

/* -----------------------------
   DROPDOWN CONTAINER (BLUE)
----------------------------- */
.search.global-search.search-pill .search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;

  background: var(--header-bg);
  border-radius: 20px;
  padding: 10px;

  z-index: 3000;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}

/* -----------------------------
   RESULT PILLS (WHITE / LATEX)
----------------------------- */
.search.global-search.search-pill .search-item {
  background: #ffffff;
  color: #000000;

  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 999px;

  border: 1.5px solid #000000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.search.global-search.search-pill .search-item:last-child {
  margin-bottom: 0;
}

.search.global-search.search-pill .search-item:hover {
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Result text */
.search.global-search.search-pill .search-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #000000;
}

.search.global-search.search-pill .search-type {
  font-size: 0.65rem;
  color: #000000;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -----------------------------
   EMPTY STATE (ON BLUE)
----------------------------- */
.search.global-search.search-pill .search-empty {
  padding: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}


/* -----------------------------
   7/2
----------------------------- */



