/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Native Dialog Styles */
dialog {
  border: none;
  padding: 0;
  max-width: 90vw;
  margin: auto;
  position: fixed;
  inset: 0;
  height: fit-content;
  width: fit-content;
}

dialog[open] {
  display: flex;
  animation: dialog-fade-in 0.2s ease-out;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  animation: backdrop-fade-in 0.2s ease-out;
}

@keyframes dialog-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes backdrop-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Prevent horizontal scrollbar from 100vw elements */
html, body {
  overflow-x: hidden;
}

/* ==================== Flash Toast ==================== */
#flash-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 90%;
  max-width: 420px;
  pointer-events: none;
}

.flash-toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
}

.flash-toast-success {
  background: #065f46;
  color: #d1fae5;
}

.flash-toast-error {
  background: #991b1b;
  color: #fee2e2;
}

.flash-toast-icon {
  flex-shrink: 0;
  font-size: 16px;
}

.flash-toast p {
  flex: 1;
  margin: 0;
  line-height: 1.4;
}

.flash-toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.flash-toast-close:hover {
  opacity: 1;
}

@keyframes flashSlideIn {
  from { opacity: 0; transform: translateY(-1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes flashSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-1rem); }
}

/* ==================== Hero Toilet Section ==================== */
.hero-toilet-section {
  background: #f2f0ed;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.hero-tile-bg {
  position: absolute;
  inset: 0;
  background-color: #f2f0ed;
  background:
    radial-gradient(ellipse 60% 70% at 50% 55%, rgba(245, 222, 179, 0.5) 0%, transparent 70%),
    radial-gradient(ellipse 45% 50% at 50% 50%, rgba(255, 248, 235, 0.7) 0%, transparent 60%),
    linear-gradient(180deg, #f5f0ea 0%, #f2f0ed 40%, #ede8e2 100%);
  z-index: 0;
}

.hero-tile-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 35% 40% at 50% 50%, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  animation: glowPulse 4s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-tile-shine {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(210, 180, 140, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-tile-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 45% at 50% 45%, rgba(192, 160, 128, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes glowPulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ---- Poop Type Rotation ---- */
.hero-poop-type {
  opacity: 0;
  animation: poopRotate 15s infinite;
}
.hero-poop-1 { animation-delay: 0s; }
.hero-poop-2 { animation-delay: 3s; }
.hero-poop-3 { animation-delay: 6s; }
.hero-poop-4 { animation-delay: 9s; }
.hero-poop-5 { animation-delay: 12s; }

@keyframes poopRotate {
  0% { opacity: 0; }
  3% { opacity: 1; }
  17% { opacity: 1; }
  20% { opacity: 0; }
  100% { opacity: 0; }
}

/* ---- Feature Badges Marquee ---- */
.hero-marquee-strip {
  position: relative;
  z-index: 10;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(160, 103, 75, 0.15);
  border-bottom: 1px solid rgba(160, 103, 75, 0.15);
  padding: 10px 0;
}

.hero-marquee-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}

.hero-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3E2723;
  white-space: nowrap;
  letter-spacing: 0.15px;
  line-height: 1;
}

.hero-marquee-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #8B4513;
}

.hero-marquee-sep {
  color: #A0674B;
  opacity: 0.4;
  font-size: 16px;
  padding: 0 4px;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

@media (min-width: 640px) {
  .hero-marquee-strip { padding: 12px 0; }
  .hero-marquee-item { font-size: 14px; gap: 6px; padding: 0 12px; }
  .hero-marquee-icon { width: 16px; height: 16px; }
}

@media (min-width: 1024px) {
  .hero-marquee-strip { padding: 14px 0; }
  .hero-marquee-item { font-size: 15px; padding: 0 16px; }
  .hero-marquee-icon { width: 18px; height: 18px; }
}

/* ---- Toilet Core ---- */
.hero-toilet-wrapper {
  position: relative;
  display: inline-block;
  animation: toiletFadeIn 0.8s ease-out;
}

.hero-toilet-svg-el {
  display: block;
  width: 280px;
  height: auto;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.18));
}

/* ---- Lid Overlay ---- */
.hero-lid-overlay {
  position: absolute;
  top: 21%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65%;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

.hero-lid-title {
  font-size: 30px;
  font-weight: 800;
  color: #2d2d2d;
  line-height: 1.25;
  margin-bottom: 6px;
  text-shadow: 0 1px 3px rgba(255,255,255,0.6);
  letter-spacing: -0.3px;
}

.hero-lid-title span {
  color: #c47a2a;
}

/* ---- Bowl Overlay ---- */
.hero-bowl-overlay {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
}

.hero-btn-wrapper {
  position: relative;
  display: inline-block;
}

.hero-mini-label {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 9px;
  font-weight: 700;
  background: linear-gradient(135deg, #FF6B35 0%, #FF8C00 100%);
  color: #fff;
  padding: 3px 8px;
  border-radius: 9999px;
  box-shadow: 0 3px 10px rgba(255, 107, 53, 0.5);
  animation: miniLabelBounce 2s ease-in-out infinite;
  white-space: nowrap;
  letter-spacing: 0.5px;
  z-index: 10;
  border: 2px solid rgba(255,255,255,0.3);
  pointer-events: none;
}

@keyframes miniLabelBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.08); }
}

.hero-poop-btn {
  background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
  box-shadow: 0 4px 16px rgba(139, 69, 19, 0.5);
  position: relative;
  overflow: hidden;
  padding: 10px 22px;
  font-size: 13px;
  white-space: nowrap;
}

.hero-poop-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.hero-poop-btn:hover {
  background: linear-gradient(135deg, #6D3410 0%, #B85B18 100%);
  box-shadow: 0 8px 28px rgba(139, 69, 19, 0.6);
}

.hero-poop-btn:hover::before {
  width: 300px;
  height: 300px;
}

.hero-poop-btn > * {
  position: relative;
  z-index: 1;
}

@keyframes toiletFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---- xs (< 400px) ---- */
@media (max-width: 399px) {
  .hero-toilet-svg-el {
    width: 160px;
  }
  .hero-lid-title {
    font-size: 14px;
  }
  .hero-poop-btn {
    padding: 10px 20px;
    font-size: 12px;
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.6);
  }
  .hero-mini-label {
    font-size: 8px;
    padding: 3px 7px;
    top: -9px;
    right: -6px;
  }
}

/* ---- small mobile (400-639px) ---- */
@media (min-width: 400px) and (max-width: 639px) {
  .hero-toilet-svg-el {
    width: 220px;
  }
  .hero-lid-title {
    font-size: 18px;
  }
  .hero-poop-btn {
    padding: 12px 24px;
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.6);
  }
  .hero-mini-label {
    font-size: 8px;
    padding: 3px 8px;
    top: -9px;
    right: -8px;
  }
}

/* ---- sm (640px) ---- */
@media (min-width: 640px) {
  .hero-toilet-svg-el {
    width: 280px;
  }

  .hero-lid-title {
    font-size: 26px;
    margin-bottom: 7px;
  }

  .hero-poop-btn {
    padding: 12px 26px;
    font-size: 15px;
  }

  .hero-mini-label {
    font-size: 10px;
    padding: 4px 10px;
    top: -11px;
    right: -11px;
  }

}

/* ---- md (768px) ---- */
@media (min-width: 768px) {
  .hero-toilet-svg-el {
    width: 300px;
  }

  .hero-lid-title {
    font-size: 30px;
    margin-bottom: 8px;
  }

  .hero-poop-btn {
    padding: 14px 30px;
    font-size: 17px;
  }

  .hero-mini-label {
    font-size: 10px;
    padding: 4px 10px;
  }

}

/* ---- lg (1024px) ---- */
@media (min-width: 1024px) {
  .hero-toilet-svg-el {
    width: 380px;
  }

  .hero-lid-title {
    font-size: 34px;
    margin-bottom: 10px;
  }

  .hero-poop-btn {
    padding: 16px 34px;
    font-size: 20px;
  }

  .hero-mini-label {
    font-size: 11px;
    padding: 5px 12px;
    top: -12px;
    right: -12px;
  }

}

/* ---- xl (1280px) ---- */
@media (min-width: 1280px) {
  .hero-toilet-svg-el {
    width: 400px;
  }

}

/* ==================== BrownFeed Design System ==================== */
:root {
  --brown-dark: #5D4037;
  --brown-medium: #8B4513;
  --brown-lighter: #D2691E;
  --brown-lightest: #F4A460;
  --cream: #FFF8DC;
  --cream-light: #FFFAF0;
  --accent-red: #FF6B6B;
  --accent-green: #51CF66;
}

/* ==================== Vote Buttons (Pill Style) ==================== */
.vote-section {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border-top: 1px solid #F3F4F6;
}

.vote-section-inner {
  display: flex;
  gap: 0.75rem;
}

.vote-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  line-height: 1;
}

.vote-pill-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.vote-pill-label {
  font-weight: 600;
}

.vote-pill-count {
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}

.vote-pill-up {
  background: #FEF3C7;
  border-color: #FDE68A;
  color: #92400E;
}

.vote-pill-up:hover {
  background: #FDE68A;
  border-color: #FBBF24;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
  transform: translateY(-1px);
}

.vote-pill-up:hover .vote-pill-icon { transform: translateY(-2px); }

.vote-pill-up.voted {
  background: #F59E0B;
  border-color: #D97706;
  color: white;
}

.vote-pill-down {
  background: #F3F4F6;
  border-color: #E5E7EB;
  color: #6B7280;
}

.vote-pill-down:hover {
  background: #E5E7EB;
  border-color: #9CA3AF;
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
  transform: translateY(-1px);
}

.vote-pill-down:hover .vote-pill-icon { transform: translateY(2px); }

.vote-pill-down.voted {
  background: #6B7280;
  border-color: #4B5563;
  color: white;
}

.vote-pill-disabled {
  opacity: 0.65;
  cursor: pointer;
}

.vote-pill-disabled:hover { opacity: 0.85; }

/* ==================== Comment Vote Buttons (Compact) ==================== */
.comment-vote-actions {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

.comment-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
  color: #9CA3AF;
}

.comment-vote-btn .vote-icon {
  width: 12px;
  height: 12px;
  transition: transform 0.15s ease;
}

.comment-vote-btn span {
  font-weight: 600;
  min-width: 12px;
  text-align: center;
}

.comment-vote-btn.up:hover {
  background: #FEF3C7;
  border-color: #FDE68A;
  color: #92400E;
}

.comment-vote-btn.up:hover .vote-icon { transform: translateY(-2px); }

.comment-vote-btn.up.voted {
  background: #FDE68A;
  border-color: #FBBF24;
  color: #92400E;
}

.comment-vote-btn.down:hover {
  background: #F3F4F6;
  border-color: #E5E7EB;
  color: #4B5563;
}

.comment-vote-btn.down:hover .vote-icon { transform: translateY(2px); }

.comment-vote-btn.down.voted {
  background: #E5E7EB;
  border-color: #9CA3AF;
  color: #4B5563;
}

.post-edit-header {
  background: var(--brown-gradient);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-edit-header-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.post-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-form-label {
  font-size: 13px;
  font-weight: 600;
  color: #4B5563;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.post-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #E5E7EB;
  border-radius: 0.75rem;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-form-input:focus {
  outline: none;
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.post-form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid #E5E7EB;
  border-radius: 0.75rem;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  min-height: 200px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-form-textarea:focus {
  outline: none;
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.post-form-errors {
  background: #FEF2F2;
  border-left: 4px solid #EF4444;
  padding: 1rem;
  border-radius: 0 0.75rem 0.75rem 0;
}

.post-form-errors-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #B91C1C;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.post-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #F3F4F6;
}

.post-form-cancel {
  padding: 0.625rem 1.5rem;
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.post-form-cancel:hover {
  color: #374151;
  background: #F3F4F6;
}

.post-form-submit {
  padding: 0.625rem 1.75rem;
  font-size: 14px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.2);
}

.post-form-submit:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
  transform: translateY(-1px);
}

/* ==================== Comment Edit (Inline) ==================== */
.comment-edit-card {
  padding: 1rem;
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 2px solid #FDE68A;
  border-radius: 1rem;
  animation: editSlideIn 0.2s ease-out;
}

.comment-edit-card.reply-edit {
  padding: 0.75rem;
  border-radius: 0 0.75rem 0.75rem 0;
  border-left: 3px solid #F59E0B;
}

@keyframes editSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-edit-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 12px;
  font-weight: 600;
  color: #92400E;
  margin-bottom: 0.625rem;
}

.comment-edit-form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.comment-edit-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #FDE68A;
  border-radius: 0.75rem;
  background: white;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  color: #1F2937;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.comment-edit-textarea:focus {
  outline: none;
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.comment-edit-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.comment-edit-cancel {
  padding: 0.375rem 1rem;
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  text-decoration: none;
}

.comment-edit-cancel:hover {
  color: #374151;
  background: rgba(0, 0, 0, 0.05);
}

.comment-edit-submit {
  padding: 0.375rem 1.25rem;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.comment-edit-submit:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
  transform: translateY(-1px);
}

/* Comment Card */
.comment-card {
  padding: 1rem 0;
  border-bottom: 1px solid #F3F4F6;
}

.comment-card:last-child {
  border-bottom: none;
}

/* Mention Tag */
.mention-tag {
  color: var(--brown-medium, #92400e);
  font-weight: 600;
}

/* Reply Card */
.reply-card {
  padding: 1rem 0;
  border-bottom: 1px solid #F3F4F6;
}

.reply-card:last-child {
  border-bottom: none;
}

/* User Avatar */
.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: linear-gradient(145deg, var(--brown-lightest), var(--brown-lighter));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 3px 10px rgba(139, 69, 19, 0.2);
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
}

.user-avatar.small {
  width: 34px;
  height: 34px;
  font-size: 16px;
  border-width: 2px;
}

/* User Info Container - 2-line layout: nickname / level+badge */
.user-info-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-info-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.user-name {
  font-weight: 600;
  color: #1F2937;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
  min-width: 0;
}

.user-name a {
  color: inherit;
  text-decoration: none;
}

.user-name a:hover {
  color: var(--brown-medium);
}

@media (min-width: 640px) {
  .user-name {
    max-width: 240px;
  }
}

/* Level Text (plain, no background) */
.user-level {
  color: var(--brown-lighter);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .user-level {
    font-size: 12px;
  }
}

/* Name Row: level + nickname on same line */
.user-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

/* 똥주인 Author Badge */
.author-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--brown-lighter) 0%, #CD853F 50%, #DEB887 100%);
  color: white;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 
    0 2px 8px rgba(210, 105, 30, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.author-badge::before {
  content: none;
}

.author-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 3s infinite;
}

@keyframes poopWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

@keyframes shimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

/* Comment Author Section */
.comment-author-section {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.comment-author-section .user-info-container {
  gap: 1px;
  min-width: 0;
}

.comment-author-section .user-name {
  font-size: 13px;
  max-width: 140px;
}

@media (min-width: 640px) {
  .comment-author-section .user-name {
    max-width: 220px;
  }
}

.comment-author-section .user-level {
  font-size: 10px;
}

.comment-author-section .user-name-row {
  gap: 3px;
}

.comment-author-section .author-badge {
  font-size: 9px;
  padding: 2px 8px;
}

/* Post Actions Section */
.post-actions-section {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: #F9FAFB;
  border-top: 1px solid #E5E7EB;
}

.post-actions-left,
.post-actions-right {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 14px;
  color: #6B7280;
}

.action-btn:hover {
  border-color: var(--brown-medium);
  color: var(--brown-medium);
}

.action-btn.btn-edit:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.action-btn.btn-delete:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Board Table */
.board-table-wrapper {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.board-table {
  width: 100%;
  border-collapse: collapse;
}

.board-table thead {
  background: linear-gradient(135deg, var(--brown-lightest) 0%, var(--brown-lighter) 100%);
}

.board-table th {
  padding: 0.75rem 1rem;
  text-align: center;
  font-weight: 600;
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.board-table tbody tr {
  border-bottom: 1px solid #E5E7EB;
  transition: all 0.2s ease;
}

.board-table tbody tr:hover {
  background: #FFFAF0;
}

.board-table td {
  padding: 0.75rem 1rem;
  text-align: center;
  color: #6B7280;
  font-size: 14px;
}

.board-table .col-title {
  text-align: left;
}

.board-author-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  max-width: 100%;
}

.board-author-name {
  font-weight: 500;
  color: #1F2937;
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .board-author-name {
    font-size: 13px;
  }
}

.board-author-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.board-author-name-row {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.board-author-level {
  font-size: 10px;
  color: var(--brown-lighter);
  font-weight: 600;
  flex-shrink: 0;
}

.post-title-link {
  color: #1F2937;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.post-title-link:hover {
  color: var(--brown-medium);
}

.post-comment-count {
  color: var(--brown-medium);
  font-weight: 600;
  margin-left: 0.25rem;
}

/* Badges */
.badge-new {
  display: inline-block;
  padding: 2px 6px;
  background: var(--accent-red);
  color: white;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 0.5rem;
  animation: pulse 1.5s infinite;
}

.badge-hot {
  color: var(--accent-red);
  margin-left: 0.5rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ==================== Gut Health Badge ==================== */
.gut-health-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.55rem;
  padding: 1px 4px;
  border-radius: 4px;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 2px;
  line-height: 1.2;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .gut-health-badge {
    font-size: 0.6rem;
    padding: 1px 5px;
    margin-left: 4px;
  }
}

/* Gut health indicator dot - smaller on mobile */
.gut-health-badge .gut-health-indicator {
  width: 6px;
  height: 6px;
  margin-right: 2px;
}

@media (min-width: 640px) {
  .gut-health-badge .gut-health-indicator {
    width: 8px;
    height: 8px;
    margin-right: 3px;
  }
}
.gut-health-excellent { background: #dcfce7; color: #166534; }
.gut-health-good { background: #ccfbf1; color: #115e59; }
.gut-health-normal { background: #f3f4f6; color: #374151; }
.gut-health-caution { background: #fef9c3; color: #854d0e; }
.gut-health-warning { background: #ffedd5; color: #9a3412; }
.gut-health-danger { background: #fee2e2; color: #991b1b; }
.gut-health-not_stool { background: #e5e7eb; color: #6b7280; }
.gut-health-not_analyzed { background: #e0e7ff; color: #4338ca; }

/* Gut Health Indicator Dot */
.gut-health-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 3px;
  flex-shrink: 0;
}
.gut-health-indicator-excellent { background: #22c55e; }
.gut-health-indicator-good { background: #14b8a6; }
.gut-health-indicator-normal { background: #9ca3af; }
.gut-health-indicator-caution { background: #eab308; }
.gut-health-indicator-warning { background: #f97316; }
.gut-health-indicator-danger { background: #ef4444; }
.gut-health-indicator-not_stool { background: #d1d5db; }
.gut-health-indicator-not_analyzed { background: #a5b4fc; }

/* ==================== Analysis Compact (feed cards) ==================== */
.analysis-compact {
  padding: 4px 8px;
  font-size: 0.65rem;
  line-height: 1.3;
  color: #6b7280;
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analysis-compact-label {
  font-weight: 600;
  color: #9ca3af;
}
.analysis-compact-status {
  font-weight: 600;
}
.analysis-compact-dot {
  color: #d1d5db;
}
.analysis-compact-desc {
  color: #9ca3af;
}
.analysis-compact-not-stool { color: #9ca3af; }
.analysis-compact-excellent .analysis-compact-status { color: #166534; }
.analysis-compact-good .analysis-compact-status { color: #115e59; }
.analysis-compact-normal .analysis-compact-status { color: #374151; }
.analysis-compact-caution .analysis-compact-status { color: #854d0e; }
.analysis-compact-warning .analysis-compact-status { color: #9a3412; }
.analysis-compact-danger .analysis-compact-status { color: #991b1b; }

/* ==================== Analysis Section (detail page) ==================== */
.analysis-section {
  padding: 16px 24px;
  background: linear-gradient(135deg, #fefce8 0%, #fff7ed 100%);
  border-top: 1px solid #fde68a;
}
.analysis-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.analysis-section-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background: #f59e0b;
  border-radius: 2px;
}
.analysis-section-not-stool {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}
.analysis-section-not-stool .analysis-section-title { color: #6b7280; }
.analysis-section-not-stool .analysis-section-title::before { background: #9ca3af; }
.analysis-section-not-stool-msg {
  color: #9ca3af;
  font-size: 0.8rem;
}
.analysis-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(253, 230, 138, 0.3);
  font-size: 0.8rem;
}
.analysis-row:last-child { border-bottom: none; }
.analysis-row-label {
  width: 90px;
  flex-shrink: 0;
  font-weight: 600;
  color: #92400e;
  font-size: 0.75rem;
}
.analysis-row-value {
  flex: 1;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 4px;
}
.analysis-score-num { font-weight: 700; }
.analysis-score-status { font-size: 0.7rem; margin-left: 2px; }
.analysis-status-excellent { color: #166534; }
.analysis-status-good { color: #115e59; }
.analysis-status-normal { color: #6b7280; }
.analysis-status-caution { color: #854d0e; }
.analysis-status-warning { color: #9a3412; }
.analysis-status-danger { color: #991b1b; }
.analysis-row-desc {
  flex-direction: column;
  align-items: flex-start;
}
.analysis-desc-text {
  color: #4b5563;
  font-size: 0.8rem;
  line-height: 1.5;
  margin-top: 4px;
}
.analysis-flags {
  gap: 4px;
  flex-wrap: wrap;
}
.analysis-flag-tag {
  display: inline-block;
  padding: 1px 6px;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}

.ranking-item .analysis-compact {
  border-top: none;
  background: transparent;
  padding: 0;
  font-size: 0.6rem;
  margin-top: -2px;
}

@media (max-width: 640px) {
  .analysis-section { padding: 12px 16px; }
  .analysis-row-label { width: 72px; font-size: 0.7rem; }
  .analysis-compact { font-size: 0.6rem; padding: 3px 6px; }
}
