/**
 * ============================================
 * Stylesheet: community.css
 * Area:       海豹社區 BBS 系統 (Community Forum)
 * Version:    v1.0
 * ============================================
 *
 * WHAT THIS FILE DOES:
 *   毛氈海洋主題的 BBS 社區系統完整樣式。
 *   包含佈局、板塊導航、帖子列表、彈窗、編輯器等。
 *   基於 mujoo-tokens.css Design Token 系統。
 *
 * DEPENDS ON:
 *   - css/mujoo-tokens.css
 *   - css/mujoo-responsive.css
 *
 * CHANGELOG:
 *   v1.0 - 初始版本：完整 BBS 社區系統樣式
 */

/* ============================================
   0. CSS Variables (社区专用)
   ============================================ */
:root {
  --mc-bg: #f0f4f8;
  --mc-bg-felt: linear-gradient(135deg, #e8f0fe 0%, #f5e6f0 50%, #e6f5f0 100%);
  --mc-card-bg: #ffffff;
  --mc-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --mc-card-radius: 16px;
  --mc-border: #e2e8f0;
  --mc-text-primary: #1a365d;
  --mc-text-secondary: #4a5568;
  --mc-text-muted: #a0aec0;
  --mc-accent: #4ECDC4;
  --mc-accent-hover: #45b7aa;
  --mc-pink: #FF6B9D;
  --mc-purple: #A78BFA;
  --mc-blue: #3B82F6;
  --mc-orange: #F59E0B;
  --mc-green: #10B981;
  --mc-red: #EF4444;
  --mc-felt-texture: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  --mc-header-height: 60px;
  --mc-sidebar-width: 240px;
  --mc-sidebar-right-width: 260px;
}

/* ============================================
   1. Reset & Base
   ============================================ */
#mujoo-community-app {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  color: var(--mc-text-primary);
  background: var(--mc-bg);
  background-image: var(--mc-felt-texture);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#mujoo-community-app * {
  box-sizing: border-box;
}

/* ============================================
   2. Header
   ============================================ */
.mc-header {
  background: linear-gradient(135deg, #1a365d 0%, #2d4a7a 50%, #1a4b6e 100%);
  color: #ffffff;
  height: var(--mc-header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(26, 54, 93, 0.3);
}

.mc-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mc-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

.mc-logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.mc-logo-text {
  background: linear-gradient(135deg, #ffffff, #4ECDC4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mc-header-nav {
  display: flex;
  gap: 24px;
}

.mc-nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.mc-nav-link:hover {
  color: #4ECDC4;
}

.mc-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================
   3. Buttons
   ============================================ */
.mc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.mc-btn-primary {
  background: linear-gradient(135deg, #4ECDC4, #44a89e);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.mc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.mc-btn-secondary {
  background: #e2e8f0;
  color: var(--mc-text-primary);
}

.mc-btn-secondary:hover {
  background: #cbd5e0;
}

.mc-btn-checkin {
  background: linear-gradient(135deg, #FF6B9D, #ff5286);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.mc-btn-checkin:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.mc-btn-icon {
  font-size: 16px;
}

/* ============================================
   4. User Info
   ============================================ */
.mc-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  cursor: pointer;
}

.mc-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.15);
}

.mc-user-name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   5. Main Layout (三栏布局)
   ============================================ */
.mc-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: var(--mc-sidebar-width) 1fr var(--mc-sidebar-right-width);
  gap: 20px;
  flex: 1;
  width: 100%;
}

/* ============================================
   6. Sidebar (左侧边栏)
   ============================================ */
.mc-sidebar {
  position: sticky;
  top: calc(var(--mc-header-height) + 20px);
  height: fit-content;
  max-height: calc(100vh - var(--mc-header-height) - 40px);
  overflow-y: auto;
}

.mc-sidebar-section {
  background: var(--mc-card-bg);
  border-radius: var(--mc-card-radius);
  box-shadow: var(--mc-card-shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.mc-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--mc-text-primary);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--mc-accent);
}

.mc-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mc-category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
  font-size: 14px;
}

.mc-category-item:hover {
  background: #f0f4f8;
}

.mc-category-item.mc-active {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(78, 205, 196, 0.05));
  color: var(--mc-accent);
  font-weight: 600;
}

.mc-cat-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.mc-cat-name {
  flex: 1;
}

.mc-cat-count {
  font-size: 12px;
  color: var(--mc-text-muted);
  background: #f0f4f8;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ============================================
   7. Stats Card
   ============================================ */
.mc-stats-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.mc-stat-item {
  padding: 8px 4px;
  background: linear-gradient(135deg, #f0f4f8, #e8f0fe);
  border-radius: 10px;
}

.mc-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--mc-accent);
}

.mc-stat-label {
  display: block;
  font-size: 11px;
  color: var(--mc-text-muted);
  margin-top: 2px;
}

/* ============================================
   8. Content Area
   ============================================ */
.mc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mc-search-box {
  display: flex;
  align-items: center;
  background: var(--mc-card-bg);
  border-radius: 24px;
  box-shadow: var(--mc-card-shadow);
  overflow: hidden;
  flex: 1;
  max-width: 400px;
}

.mc-search-input {
  flex: 1;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background: transparent;
  color: var(--mc-text-primary);
}

.mc-search-btn {
  border: none;
  background: transparent;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 16px;
}

.mc-sort-tabs {
  display: flex;
  gap: 4px;
  background: var(--mc-card-bg);
  border-radius: 24px;
  padding: 4px;
  box-shadow: var(--mc-card-shadow);
}

.mc-sort-tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--mc-text-secondary);
  transition: all 0.2s;
}

.mc-sort-tab.mc-active {
  background: var(--mc-accent);
  color: #ffffff;
}

.mc-sort-tab:hover:not(.mc-active) {
  background: #f0f4f8;
}

/* ============================================
   9. Announcement Bar
   ============================================ */
.mc-announcement-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fff5f5, #ffe5ec);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

.mc-announce-icon {
  font-size: 18px;
}

/* ============================================
   10. Post List
   ============================================ */
.mc-post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mc-post-card {
  background: var(--mc-card-bg);
  border-radius: var(--mc-card-radius);
  box-shadow: var(--mc-card-shadow);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 4px solid transparent;
}

.mc-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border-left-color: var(--mc-accent);
}

.mc-post-card.mc-pinned {
  border-left-color: var(--mc-red);
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.mc-post-card.mc-featured {
  border-left-color: var(--mc-orange);
}

.mc-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.mc-post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, #e8f0fe, #f5e6f0);
  flex-shrink: 0;
}

.mc-post-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.mc-post-meta {
  flex: 1;
}

.mc-post-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--mc-text-primary);
}

.mc-post-time {
  font-size: 12px;
  color: var(--mc-text-muted);
}

.mc-post-category-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.mc-post-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mc-post-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--mc-text-primary);
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

.mc-post-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.mc-badge-pinned {
  background: #fee2e2;
  color: #dc2626;
}

.mc-badge-featured {
  background: #fef3c7;
  color: #d97706;
}

.mc-post-excerpt {
  font-size: 14px;
  color: var(--mc-text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mc-post-images-preview {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.mc-post-images-preview img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}

.mc-post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--mc-text-muted);
}

.mc-post-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mc-post-tags {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.mc-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: #f0f4f8;
  border-radius: 8px;
  color: var(--mc-text-secondary);
}

/* ============================================
   11. Loading
   ============================================ */
.mc-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--mc-text-muted);
}

.mc-loading-seal {
  font-size: 48px;
  animation: mc-bounce 1s ease-in-out infinite;
}

@keyframes mc-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============================================
   12. Pagination
   ============================================ */
.mc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
}

.mc-page-btn {
  padding: 8px 20px;
  border: 1px solid var(--mc-border);
  background: var(--mc-card-bg);
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.mc-page-btn:hover:not(:disabled) {
  background: var(--mc-accent);
  color: #ffffff;
  border-color: var(--mc-accent);
}

.mc-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mc-page-info {
  font-size: 14px;
  color: var(--mc-text-secondary);
}

/* ============================================
   13. Right Sidebar
   ============================================ */
.mc-sidebar-right {
  position: sticky;
  top: calc(var(--mc-header-height) + 20px);
  height: fit-content;
  max-height: calc(100vh - var(--mc-header-height) - 40px);
  overflow-y: auto;
}

.mc-hot-posts .mc-hot-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f4f8;
  cursor: pointer;
  transition: color 0.2s;
}

.mc-hot-posts .mc-hot-item:last-child {
  border-bottom: none;
}

.mc-hot-posts .mc-hot-item:hover .mc-hot-title {
  color: var(--mc-accent);
}

.mc-hot-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.mc-hot-rank.mc-rank-1 { background: #ef4444; }
.mc-hot-rank.mc-rank-2 { background: #f97316; }
.mc-hot-rank.mc-rank-3 { background: #eab308; }
.mc-hot-rank.mc-rank-other { background: #94a3b8; }

.mc-hot-title {
  font-size: 13px;
  line-height: 1.4;
  color: var(--mc-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mc-active-users {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mc-active-user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f0f4f8;
  border-radius: 16px;
  font-size: 12px;
  color: var(--mc-text-secondary);
}

.mc-active-user-avatar {
  font-size: 16px;
}

.mc-rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mc-rules-list li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--mc-text-secondary);
  border-bottom: 1px dashed #f0f4f8;
}

.mc-rules-list li:last-child {
  border-bottom: none;
}

/* ============================================
   14. Checkin Board
   ============================================ */
.mc-checkin-board .mc-checkin-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}

.mc-checkin-rank {
  font-weight: 700;
  color: var(--mc-accent);
  width: 20px;
}

.mc-checkin-name {
  flex: 1;
  color: var(--mc-text-secondary);
}

.mc-checkin-streak {
  font-size: 12px;
  color: var(--mc-pink);
  font-weight: 600;
}

/* ============================================
   15. Modal
   ============================================ */
.mc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.mc-modal {
  background: var(--mc-card-bg);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: mc-modal-in 0.3s ease;
}

.mc-modal-large {
  max-width: 800px;
}

.mc-modal-small {
  max-width: 420px;
}

@keyframes mc-modal-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.mc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--mc-border);
}

.mc-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.mc-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f0f4f8;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mc-modal-close:hover {
  background: #e2e8f0;
}

.mc-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.mc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--mc-border);
}

/* ============================================
   16. Form Elements
   ============================================ */
.mc-form-group {
  margin-bottom: 16px;
}

.mc-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--mc-text-primary);
  margin-bottom: 6px;
}

.mc-form-input,
.mc-form-select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--mc-border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--mc-text-primary);
  transition: border-color 0.2s;
  outline: none;
  background: #ffffff;
}

.mc-form-input:focus,
.mc-form-select:focus {
  border-color: var(--mc-accent);
}

.mc-form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--mc-border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--mc-text-primary);
  resize: vertical;
  min-height: 200px;
  outline: none;
  font-family: 'Noto Sans TC', monospace;
  line-height: 1.6;
  transition: border-color 0.2s;
}

.mc-form-textarea:focus {
  border-color: var(--mc-accent);
}

/* ============================================
   17. Editor Toolbar
   ============================================ */
.mc-editor-toolbar {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: #f8fafc;
  border: 2px solid var(--mc-border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}

.mc-editor-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--mc-text-secondary);
  transition: all 0.2s;
}

.mc-editor-btn:hover {
  background: #e2e8f0;
  color: var(--mc-text-primary);
}

.mc-form-group .mc-editor-toolbar + .mc-form-textarea {
  border-radius: 0 0 10px 10px;
  border-top: none;
}

/* ============================================
   18. Post Detail
   ============================================ */
.mc-detail-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--mc-border);
}

.mc-detail-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mc-detail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #e8f0fe, #f5e6f0);
}

.mc-detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--mc-text-primary);
  margin-bottom: 20px;
}

.mc-detail-content p {
  margin: 0 0 12px 0;
}

.mc-detail-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

.mc-detail-content blockquote {
  border-left: 4px solid var(--mc-accent);
  padding: 12px 16px;
  margin: 12px 0;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
}

.mc-detail-content code {
  background: #f0f4f8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.mc-detail-content pre {
  background: #1a365d;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
}

.mc-detail-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--mc-border);
  border-bottom: 1px solid var(--mc-border);
  margin-bottom: 20px;
}

.mc-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--mc-border);
  background: transparent;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--mc-text-secondary);
  transition: all 0.2s;
}

.mc-action-btn:hover {
  background: #f0f4f8;
}

.mc-action-btn.mc-liked {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

/* ============================================
   19. Comments
   ============================================ */
.mc-comments-section {
  margin-top: 20px;
}

.mc-comments-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.mc-comment-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f4f8;
}

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

.mc-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: linear-gradient(135deg, #e8f0fe, #f5e6f0);
  flex-shrink: 0;
}

.mc-comment-body {
  flex: 1;
}

.mc-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.mc-comment-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--mc-text-primary);
}

.mc-comment-floor {
  font-size: 12px;
  color: var(--mc-text-muted);
  background: #f0f4f8;
  padding: 1px 6px;
  border-radius: 4px;
}

.mc-comment-time {
  font-size: 12px;
  color: var(--mc-text-muted);
}

.mc-comment-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--mc-text-secondary);
}

.mc-comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.mc-comment-action {
  font-size: 12px;
  color: var(--mc-text-muted);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.mc-comment-action:hover {
  color: var(--mc-accent);
}

/* Comment input */
.mc-comment-input-box {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--mc-border);
}

.mc-comment-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--mc-border);
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.mc-comment-input:focus {
  border-color: var(--mc-accent);
}

.mc-comment-submit {
  padding: 10px 20px;
  background: var(--mc-accent);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.mc-comment-submit:hover {
  background: var(--mc-accent-hover);
}

/* ============================================
   20. Checkin Content
   ============================================ */
.mc-checkin-content {
  text-align: center;
}

.mc-checkin-seal {
  font-size: 80px;
  margin-bottom: 16px;
}

.mc-checkin-msg {
  font-size: 18px;
  font-weight: 700;
  color: var(--mc-text-primary);
  margin-bottom: 8px;
}

.mc-checkin-streak-info {
  font-size: 14px;
  color: var(--mc-text-secondary);
  margin-bottom: 20px;
}

.mc-checkin-streak-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--mc-pink);
}

.mc-checkin-do-btn {
  padding: 12px 40px;
  background: linear-gradient(135deg, #FF6B9D, #ff5286);
  color: #ffffff;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.mc-checkin-do-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
}

.mc-checkin-done {
  color: var(--mc-green);
  font-weight: 600;
}

/* ============================================
   21. Empty State
   ============================================ */
.mc-empty-state {
  text-align: center;
  padding: 60px 20px;
}

.mc-empty-seal {
  font-size: 64px;
  margin-bottom: 16px;
}

.mc-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--mc-text-primary);
  margin-bottom: 8px;
}

.mc-empty-desc {
  font-size: 14px;
  color: var(--mc-text-muted);
  margin-bottom: 20px;
}

/* ============================================
   22. Footer
   ============================================ */
.mc-footer {
  text-align: center;
  padding: 20px;
  color: var(--mc-text-muted);
  font-size: 13px;
  border-top: 1px solid var(--mc-border);
  margin-top: 20px;
}

/* ============================================
   23. Toast Notification
   ============================================ */
.mc-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  animation: mc-toast-in 0.3s ease, mc-toast-out 0.3s ease 2.7s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

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

.mc-toast-info {
  background: #dbeafe;
  color: #1e40af;
}

@keyframes mc-toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes mc-toast-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   24. Responsive
   ============================================ */
@media (max-width: 1024px) {
  .mc-main {
    grid-template-columns: var(--mc-sidebar-width) 1fr;
  }
  .mc-sidebar-right {
    display: none;
  }
}

@media (max-width: 768px) {
  .mc-main {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .mc-sidebar {
    position: static;
    max-height: none;
  }

  .mc-sidebar-section:not(:first-child) {
    display: none;
  }

  .mc-category-list {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 4px;
  }

  .mc-category-item {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 13px;
  }

  .mc-header-nav {
    display: none;
  }

  .mc-btn-label {
    display: none;
  }

  .mc-user-name {
    display: none;
  }

  .mc-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .mc-search-box {
    max-width: 100%;
  }

  .mc-post-card {
    padding: 14px;
  }

  .mc-modal {
    border-radius: 16px 16px 0 0;
    max-height: 95vh;
  }

  .mc-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

@media (max-width: 480px) {
  .mc-header-inner {
    padding: 0 12px;
  }

  .mc-post-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mc-post-tags {
    margin-left: 0;
    width: 100%;
  }
}

/* Production states and keyboard navigation. */
.mc-post-card, .mc-detail-content, .mc-comment-body, .mc-post-meta { min-width: 0; overflow-wrap: anywhere; }
.mc-detail-content pre { overflow-x: auto; max-width: 100%; }
.mc-detail-content img { max-width: 100%; height: auto; }
.mc-error-message { padding: 16px 0; line-height: 1.7; color: var(--mc-text, #173f46); }
.mc-form-input, .mc-form-select, .mc-form-textarea, .mc-comment-input { font-size: 16px; min-width: 0; }
.mc-btn:disabled, .mc-action-btn:disabled, .mc-comment-submit:disabled { opacity: .55; cursor: not-allowed; }
.mc-modal { max-height: calc(100dvh - 24px); overflow-y: auto; }
.mc-profile-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 20px; }
.mc-my-post-item { display: block; width: 100%; text-align: start; color: inherit; font: inherit; background: transparent; cursor: pointer; }
.mc-hot-item { color: inherit; font: inherit; background: transparent; text-align: start; width: 100%; border: 0; cursor: pointer; }
#mc-comments-pages, #mc-my-tab-pages { display: flex; gap: 12px; margin-block: 16px; }
#mujoo-community-app :focus-visible, .mc-modal-overlay :focus-visible { outline: 3px solid #17695e; outline-offset: 3px; }
#mujoo-community-app ::selection { color: #123d39; background: #c0e9d8; }
.mc-form-input, .mc-form-textarea { caret-color: #17695e; }
[aria-busy="true"] { cursor: progress; }
@media (max-width: 560px) { .mc-comment-input-box { flex-wrap: wrap; } .mc-comment-input { flex-basis: 100%; } .mc-header-actions { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { #mujoo-community-app *, .mc-modal-overlay * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Keep community routes and actions reachable in a growing phone header. */
.mc-notif-panel { color: #173f46; }
@media (max-width: 768px) {
  .mc-header { height: auto; min-height: var(--mc-header-height); }
  .mc-header-inner { height: auto; flex-wrap: wrap; gap: 10px; padding: 12px; }
  .mc-header-logo { flex-shrink: 0; white-space: nowrap; }
  .mc-header-nav { display: flex; order: 3; flex-basis: 100%; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; }
  .mc-header-nav .mc-nav-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 4px; white-space: nowrap; color: #fff; }
  .mc-header-actions { justify-content: flex-end; gap: 8px; }
  .mc-header-actions .mc-btn, .mc-header-actions .mc-user-info { min-height: 44px; min-width: 44px; }
  .mc-header .mc-notif-panel { right: 0; }
}
@media (max-width: 560px) {
  .mc-header-actions { width: 100%; }
}
@media (max-width: 768px) and (max-height: 560px) {
  .mc-header { position: relative; }
  .mc-header .mc-notif-panel { position: fixed; top: 12px; right: 12px; left: 12px; width: auto; max-width: none; max-height: calc(100dvh - 24px); }
}
