/* ============================================
   COMPONENTS — buttons, cards, feed, widgets
   All fonts: STALPH site-wide via tokens
   ============================================ */

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 13px; font-weight: normal;
  cursor: pointer; border: none;
  transition: transform var(--dur-fast) var(--ease-bounce), box-shadow var(--dur-fast), background var(--dur-fast);
}
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(0.97); }
.btn-primary   { background: var(--pink-dark);  color: var(--white); }
.btn-secondary { background: var(--blue);        color: var(--white); }
.btn-yellow    { background: var(--yellow);      color: var(--black); }
.btn-outline   { background: transparent; border: 2px solid var(--pink-dark); color: var(--pink-dark); }
.btn-ghost     { background: var(--pink-light);  color: var(--black); }
.btn-sm        { padding: 5px 12px; font-size: 12px; }
.btn-lg        { padding: 12px 28px; font-size: 15px; }
.btn-primary:hover   { background: #e0609a; box-shadow: 0 4px 16px rgba(241,119,174,0.4); }
.btn-secondary:hover { background: #526296; box-shadow: 0 4px 16px rgba(101,129,184,0.3); }
.btn-yellow:hover    { background: #f0c120; }

/* ---- Cards ---- */
.card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.card-pink { background: var(--pink-med); }
.card-blue { background: var(--blue-light); }
.card-yellow { background: var(--yellow); }

/* ---- Feed Layout ---- */
.feed-main { max-width: 680px; margin: 0 auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 32px; }

/* ---- Cosmic Check-in Widget ---- */
.cosmic-widget { background: var(--blue-light); border-radius: var(--radius-lg); padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); }
.cosmic-header { display: flex; align-items: center; justify-content: space-between; }
.cosmic-sign { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: bold; }
.cosmic-sign-icon { font-size: 20px; }
.cosmic-tabs { display: flex; gap: 4px; background: rgba(255,255,255,0.4); border-radius: var(--radius-pill); padding: 3px; }
.cosmic-tab { padding: 4px 12px; border-radius: var(--radius-pill); font-size: 11px; cursor: pointer; transition: background var(--dur-fast); font-family: var(--font-display); }
.cosmic-tab.active { background: var(--pink-dark); color: var(--white); }
.cosmic-tab:not(.active):hover { background: rgba(255,255,255,0.5); }
.cosmic-card { background: var(--yellow); border-radius: var(--radius-md); padding: var(--space-md); position: relative; }
.cosmic-today-badge { position: absolute; top: 8px; right: 10px; background: var(--pink-dark); color: var(--white); font-size: 10px; padding: 2px 8px; border-radius: var(--radius-pill); font-family: var(--font-display); }
.cosmic-reading-title { font-size: 14px; font-style: italic; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; font-family: var(--font-display); }
.cosmic-reading-text { font-size: 12px; line-height: 1.6; color: var(--black); }
.cosmic-sub-cards { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: var(--space-sm); }
.cosmic-sub-card { background: var(--pink-light); border-radius: var(--radius-md); padding: 10px; font-size: 12px; }
.cosmic-sub-card h4 { font-size: 11px; font-family: var(--font-display); margin-bottom: 4px; }
.cosmic-sub-card p { font-size: 11px; line-height: 1.5; color: #555; }
.astralmate-card { background: var(--blue); color: var(--white); border-radius: var(--radius-md); padding: 10px; display: flex; align-items: center; gap: 8px; }
.astralmate-icon { font-size: 24px; }
.astralmate-text h4 { font-size: 12px; font-family: var(--font-display); margin-bottom: 2px; }
.astralmate-text p { font-size: 11px; opacity: 0.85; line-height: 1.4; }

/* ---- Friend Finder + Talk Topics row ---- */
.feed-dual-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }

.friend-finder-card {
  background: var(--blue-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 3px solid var(--blue);
}
.friend-finder-label {
  display: inline-block;
  background: var(--yellow); color: var(--black);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 12px; padding: 4px 14px;
  margin-bottom: var(--space-sm);
}
.friend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.friend-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.friend-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px; color: var(--black);
  border: 3px solid var(--white);
  transition: transform var(--dur-fast) var(--ease-bounce);
}
.friend-avatar:hover { transform: scale(1.12); }
.friend-name { font-size: 10px; font-family: var(--font-display); text-align: center; }

.talk-topics-card {
  background: var(--pink-med);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  border: 3px solid var(--pink-dark);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-bounce);
  gap: 8px;
}
.talk-topics-card:hover { transform: scale(1.02); box-shadow: var(--shadow-pop); }
.talk-topics-card img { width: 52px; height: 52px; }
.talk-topics-label { font-size: 13px; font-family: var(--font-display); color: var(--white); line-height: 1.4; }
.talk-topics-sub { font-size: 17px; font-family: var(--font-display); color: var(--blue); margin-top: 2px; }

/* ---- Post Composer ---- */
.post-composer {
  background: var(--pink-med);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 3px solid var(--pink-dark);
}
.post-textarea {
  width: 100%; background: none; border: none; outline: none;
  resize: none; font-family: var(--font-display);
  font-size: 13px; line-height: 1.7; color: var(--black); min-height: 80px;
}
.post-textarea::placeholder { color: rgba(35,31,32,0.45); font-family: var(--font-display); }
.post-composer-footer { display: flex; align-items: center; gap: var(--space-sm); margin-top: var(--space-sm); }
.post-media-btn {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: var(--blue);
  transition: background var(--dur-fast); cursor: pointer;
}
.post-media-btn:hover { background: rgba(255,255,255,0.4); }
.post-media-btn img { width: 22px; height: 22px; }
.post-btn { margin-left: auto; }
.nsfw-toggle { display: flex; align-items: center; gap: 4px; font-family: var(--font-display); font-size: 10px; color: var(--black); cursor: pointer; }
.nsfw-checkbox { width: 14px; height: 14px; border: 2px solid var(--blue); border-radius: 3px; }

/* ---- Feed Post Card ---- */
.post-card {
  background: var(--pink-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex; flex-direction: column; gap: var(--space-sm);
  transition: box-shadow var(--dur-fast);
  border: 2px solid transparent;
}
.post-card:hover { box-shadow: var(--shadow-pop); border-color: var(--pink-med); }
.post-header { display: flex; align-items: center; gap: 10px; }
.post-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--blue-light); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px; color: var(--white); overflow: hidden;
}
.post-meta { flex: 1; }
.post-username { font-size: 15px; font-family: var(--font-display); }
.post-handle-time { font-size: 11px; color: #666; font-family: var(--font-display); }
.post-menu-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; transition: background var(--dur-fast); }
.post-menu-btn:hover { background: var(--pink-med); }
.post-body { font-size: 14px; line-height: 1.75; color: var(--black); font-family: var(--font-display); }
.post-media { border-radius: var(--radius-md); overflow: hidden; background: var(--black); position: relative; }
.post-media img, .post-media video { width: 100%; display: block; }
.post-play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: rgba(241,119,174,0.85);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.post-play-btn img { width: 24px; height: 24px; margin-left: 3px; }
.post-actions { display: flex; align-items: center; gap: var(--space-sm); padding-top: 4px; }
.post-action-btn {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-display); font-size: 12px; color: var(--blue);
  cursor: pointer; padding: 4px 10px;
  border-radius: var(--radius-pill);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.post-action-btn:hover { background: var(--pink-med); color: var(--pink-dark); }
.post-action-btn.liked { color: var(--pink-dark); }
.post-action-btn img { width: 18px; height: 18px; }
.post-share { margin-left: auto; }

/* ---- Skeleton / Misc ---- */
.skeleton {
  background: linear-gradient(90deg, var(--pink-light) 25%, var(--pink-med) 50%, var(--pink-light) 75%);
  background-size: 400px 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm);
}
.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-avatar { width: 42px; height: 42px; border-radius: 50%; }
.chip { display: inline-flex; align-items: center; background: var(--pink-light); border-radius: var(--radius-pill); padding: 3px 10px; font-family: var(--font-display); font-size: 11px; gap: 4px; cursor: pointer; transition: background var(--dur-fast); }
.chip:hover { background: var(--pink-med); }
.chip.blue { background: var(--blue-light); }
.chip.yellow { background: var(--yellow); }
.heart-token { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-display); font-size: 12px; font-weight: bold; }
.heart-token .heart { color: var(--pink-dark); animation: heartbeat 1.4s ease-in-out infinite; }
.modal-overlay { position: fixed; inset: 0; background: rgba(35,31,32,0.55); backdrop-filter: blur(4px); z-index: 200; display: flex; align-items: center; justify-content: center; animation: fadeIn var(--dur-fast); }
.modal-box { background: var(--white); border-radius: var(--radius-xl); width: min(520px, 92vw); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(35,31,32,0.25); animation: fadeUp var(--dur-med) var(--ease-bounce); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) var(--space-lg); border-bottom: 2px solid var(--pink-light); }
.modal-title { font-size: 17px; font-family: var(--font-display); }
.modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; color: var(--pink-dark); font-size: 20px; transition: background var(--dur-fast); }
.modal-close:hover { background: var(--pink-light); }
.modal-body { padding: var(--space-lg); }
.toast-container { position: fixed; bottom: var(--space-lg); right: var(--space-lg); z-index: 300; display: flex; flex-direction: column; gap: var(--space-sm); }
.toast { background: var(--black); color: var(--white); padding: 10px var(--space-md); border-radius: var(--radius-md); font-family: var(--font-display); font-size: 13px; max-width: 300px; animation: fadeUp var(--dur-med) var(--ease-bounce); display: flex; align-items: center; gap: 8px; }
.toast.success { background: var(--wallet-green); }
.toast.error   { background: var(--go-live); }
.toast.pink    { background: var(--pink-dark); }

/* ---- Comment box ---- */
.comment-box { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--pink-light); }
.comment-input-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.comment-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--blue-light); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 10px; color: var(--white); flex-shrink: 0; }
.comment-input { flex: 1; background: var(--white); border: 2px solid var(--pink-light); border-radius: var(--radius-pill); padding: 7px 14px; font-family: var(--font-display); font-size: 13px; outline: none; }
.comment-input:focus { border-color: var(--pink-dark); }
.comment-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.comment-text { font-family: var(--font-display); font-size: 13px; line-height: 1.5; background: var(--white); padding: 7px 12px; border-radius: var(--radius-md); }
.comment-text strong { color: var(--pink-dark); }

/* ---- Post menu dropdown ---- */
.post-card { position: relative; }
.post-menu-btn { position: relative; }
.post-menu-dropdown {
  position: absolute; top: 36px; right: 0;
  background: var(--white); border-radius: var(--radius-md);
  border: 2px solid var(--pink-light); box-shadow: var(--shadow-pop);
  z-index: 20; min-width: 160px; overflow: hidden;
  animation: fadeUp var(--dur-fast) var(--ease-bounce) both;
}
.pmd-item {
  padding: 10px 16px; font-family: var(--font-display); font-size: 13px;
  cursor: pointer; transition: background var(--dur-fast);
}
.pmd-item:hover { background: var(--pink-light); }

/* ── Page title / sub global style ── */
.ph { font-family: var(--font-display); font-size: 28px; color: var(--yellow) !important; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.ph img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.ps { font-family: var(--font-display); font-size: 13px; color: var(--white) !important; margin-bottom: 24px; }
.section-title { color: var(--black); }
