/* Community Layout */
.community-home, .community-post-detail { padding: 20px 0; }
.community-disabled { text-align: center; padding: 60px 20px; color: #999; }
.community-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.community-main { min-width: 0; }
.community-sidebar { }
.community-disabled { text-align: center; padding: 60px; color: #999; }
.community-empty { text-align: center; padding: 40px; color: #999; }
.community-page-title { font-size: 24px; margin: 0 0 20px; }

/* Buttons */
.community-btn { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; border: none; cursor: pointer; transition: all .2s; text-decoration: none; }
.community-btn:hover { text-decoration: none; }
.community-btn-primary { background: #1a73e8; color: #fff; }
.community-btn-primary:hover { background: #1557b0; color: #fff; }
.community-btn-primary.active { background: #e74c3c; }
.community-btn-outline { background: #fff; color: #333; border: 1px solid #ddd; }
.community-btn-outline:hover { background: #f5f5f5; }

/* Home */
.community-home-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.community-home-head h1 { margin: 0; font-size: 22px; }
.community-home-actions { display: flex; gap: 8px; }

/* Avatars */
.community-avatar-xs { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.community-avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.community-avatar-md { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.community-avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }

/* Feed / Post Cards */
.community-feed { display: flex; flex-direction: column; gap: 16px; }
.community-post-card { background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.community-post-card-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.community-post-card-header strong { font-size: 14px; }
.community-post-group { font-size: 12px; color: #1a73e8; margin-left: 4px; }
.community-post-date { font-size: 12px; color: #999; margin-left: 8px; }
.community-post-card-body { display: block; padding: 0 16px 12px; text-decoration: none; color: #333; }
.community-post-card-body:hover { text-decoration: none; }
.community-post-card-body h3 { font-size: 16px; margin: 0 0 6px; }
.community-post-card-body p { font-size: 14px; color: #666; margin: 0 0 8px; line-height: 1.5; }
.community-post-card-body img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 6px; }
.community-post-card-footer { display: flex; gap: 16px; padding: 8px 16px; font-size: 13px; color: #888; border-top: 1px solid #f0f0f0; }

/* Post Detail */
.community-post-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.community-post-detail-title { font-size: 22px; margin: 0 0 16px; }
.community-post-detail-content { font-size: 15px; line-height: 1.7; color: #333; margin-bottom: 20px; }
.community-post-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 20px; }
.community-post-images img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.community-post-video { margin-bottom: 20px; }
.community-post-related { margin-bottom: 16px; }
.community-related-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: #f8f9fa; border-radius: 8px; text-decoration: none; color: #333; }
.community-related-card:hover { text-decoration: none; }
.community-related-card img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }
.community-related-price { display: block; font-weight: 600; color: #e74c3c; margin-top: 4px; }
.community-post-detail-stats { display: flex; gap: 20px; font-size: 14px; color: #888; margin-bottom: 16px; }
.community-post-detail-actions { margin-bottom: 16px; }
.community-post-group-link { margin-bottom: 24px; }

/* Comments */
.community-comments { margin-top: 24px; border-top: 1px solid #eee; padding-top: 24px; }
.community-comments h2 { font-size: 18px; margin: 0 0 16px; }
.community-comment-form { margin-bottom: 20px; }
.community-comment-form textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; min-height: 80px; resize: vertical; margin-bottom: 8px; }
.community-comment-form textarea:focus { outline: none; border-color: #1a73e8; }
.community-comment-list { display: flex; flex-direction: column; gap: 16px; }
.community-comment { display: flex; gap: 10px; }
.community-comment p { margin: 2px 0; font-size: 14px; color: #444; }
.community-comment-date { font-size: 12px; color: #999; }

/* Sidebar */
.community-sidebar-section { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.community-sidebar-section h3 { font-size: 15px; margin: 0 0 12px; }
.community-sidebar-list { display: flex; flex-direction: column; gap: 8px; }
.community-sidebar-item { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #333; font-size: 14px; }
.community-sidebar-item:hover { text-decoration: none; color: #1a73e8; }
.community-sidebar-item img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* Group List */
.community-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.community-group-card { display: flex; gap: 16px; padding: 16px; background: #fff; border: 1px solid #eee; border-radius: 8px; text-decoration: none; color: #333; transition: box-shadow .2s; }
.community-group-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.1); text-decoration: none; }
.community-group-card-icon { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.community-group-card-info h3 { margin: 0 0 4px; font-size: 16px; }
.community-group-card-info p { margin: 0 0 8px; font-size: 13px; color: #666; }
.community-group-card-stats { display: flex; gap: 12px; font-size: 12px; color: #888; }

/* Group Detail */
.community-group-detail { padding: 20px 0; }
.community-group-banner { width: 100%; max-height: 300px; overflow: hidden; border-radius: 8px; margin-bottom: 16px; }
.community-group-banner img { width: 100%; object-fit: cover; }
.community-group-heading { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.community-group-icon-lg { width: 80px; height: 80px; border-radius: 16px; object-fit: cover; }
.community-group-heading h1 { margin: 0 0 4px; font-size: 22px; }
.community-group-heading p { margin: 0 0 8px; font-size: 14px; color: #666; }
.community-group-stats { display: flex; gap: 16px; font-size: 13px; color: #888; }
.community-group-actions { margin-left: auto; }
.community-group-posts { margin-top: 24px; }
.community-group-posts h2 { font-size: 18px; margin: 0 0 16px; }

/* Member */
.community-member-detail { padding: 20px 0; }
.community-member-profile { display: flex; gap: 24px; align-items: center; padding: 24px; background: #fff; border: 1px solid #eee; border-radius: 8px; margin-bottom: 24px; }
.community-member-info h1 { margin: 0 0 8px; font-size: 22px; }
.community-member-stats { display: flex; gap: 16px; font-size: 14px; color: #888; margin-bottom: 12px; }
.community-member-posts h2 { font-size: 18px; margin: 0 0 16px; }

/* Search */
.community-search-page { padding: 20px 0; }
.community-search-form { margin-bottom: 24px; }
.community-search-bar { display: flex; gap: 8px; max-width: 600px; margin-bottom: 12px; }
.community-search-input { flex: 1; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; }
.community-search-input:focus { outline: none; border-color: #1a73e8; }
.community-search-tabs { display: flex; gap: 4px; }
.community-search-tab { padding: 6px 14px; font-size: 14px; color: #666; text-decoration: none; border-radius: 4px; }
.community-search-tab:hover { background: #f0f0f0; text-decoration: none; }
.community-search-tab.active { background: #1a73e8; color: #fff; }
.community-search-count { font-size: 14px; color: #666; margin-bottom: 16px; }

/* Post list page */
.community-post-list-page { padding: 20px 0; }
.community-post-list { display: flex; flex-direction: column; gap: 16px; }

/* Post Form */
.community-post-form-title { font-size: 22px; margin: 0 0 24px; }
.community-post-form { max-width: 640px; }
.community-form-group { margin-bottom: 20px; }
.community-form-label { display: block; font-size: 14px; font-weight: 500; color: #333; margin-bottom: 6px; }
.community-form-input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; }
.community-form-input:focus { outline: none; border-color: #1a73e8; }
.community-form-textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; min-height: 120px; resize: vertical; }
.community-form-textarea:focus { outline: none; border-color: #1a73e8; }
.community-form-select { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; background: #fff; }
.community-form-select:focus { outline: none; border-color: #1a73e8; }
.community-form-checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #333; cursor: pointer; }
.community-form-checkbox input { width: 16px; height: 16px; }
.community-form-images { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.community-form-image-item { position: relative; width: 80px; height: 80px; border-radius: 6px; overflow: hidden; background: #f5f5f5; }
.community-form-image-item img { width: 100%; height: 100%; object-fit: cover; }
.community-form-image-loading { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #999; }
.community-form-image-error { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #e74c3c; font-size: 12px; }
.community-form-image-remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; background: rgba(0,0,0,0.5); border-radius: 50%; cursor: pointer; line-height: 1; }
.community-form-upload-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; background: #f5f5f5; border: 1px dashed #ddd; border-radius: 6px; font-size: 14px; color: #666; cursor: pointer; transition: background .2s; }
.community-form-upload-btn:hover { background: #eee; }
.community-form-upload-icon { font-size: 18px; line-height: 1; }
.community-form-actions { display: flex; gap: 12px; padding-top: 16px; border-top: 1px solid #eee; }
.community-form-group--half { display: inline-block; width: calc(50% - 6px); margin-right: 12px; }
.community-form-options { display: flex; flex-wrap: wrap; gap: 12px; }
.community-form-radio, .community-form-checkbox-inline { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: #333; cursor: pointer; }
.community-form-radio input, .community-form-checkbox-inline input { width: 16px; height: 16px; }
.community-form-rating { display: flex; gap: 4px; }
.community-form-rating-star { cursor: pointer; font-size: 24px; color: #ddd; }
.community-form-rating-star input { display: none; }
.community-form-rating-star i { color: inherit; }
.community-form-rating-star:hover i, .community-form-rating-star:hover ~ .community-form-rating-star i { color: #f5a623; }
.community-form-file-upload { display: flex; align-items: center; gap: 8px; }
.community-form-file-name { font-size: 13px; color: #666; }
.community-form-field-tip { font-size: 12px; color: #999; margin-bottom: 4px; }

/* Responsive */
@media (max-width: 768px) {
  .community-layout { grid-template-columns: 1fr; }
  .community-sidebar { display: none; }
  .community-group-grid { grid-template-columns: 1fr; }
  .community-group-heading { flex-wrap: wrap; }
  .community-group-actions { margin-left: 0; width: 100%; }
  .community-member-profile { flex-direction: column; text-align: center; }
}
