/**
 * Xeep Simple Forum - Modern Frontend Styles
 * Social media-inspired design with rounded cards, shadows, and smooth interactions
 */

:root {
  /* Primary Colors */
  --xeep-primary: #6366f1;
  --xeep-primary-hover: #4f46e5;
  --xeep-primary-light: #eef2ff;
  --xeep-primary-glow: rgba(99, 102, 241, 0.15);
  
  /* Secondary Colors */
  --xeep-secondary: #64748b;
  --xeep-secondary-hover: #475569;
  
  /* Status Colors */
  --xeep-success: #10b981;
  --xeep-success-light: #d1fae5;
  --xeep-danger: #ef4444;
  --xeep-danger-light: #fee2e2;
  --xeep-warning: #f59e0b;
  --xeep-warning-light: #fef3c7;
  --xeep-info: #3b82f6;
  --xeep-info-light: #dbeafe;
  
  /* Background & Surface */
  --xeep-bg: #f8fafc;
  --xeep-bg-card: #ffffff;
  --xeep-bg-hover: #f1f5f9;
  --xeep-bg-active: #e2e8f0;
  
  /* Text Colors */
  --xeep-text: #0f172a;
  --xeep-text-secondary: #475569;
  --xeep-text-muted: #94a3b8;
  --xeep-text-link: #6366f1;
  
  /* Borders */
  --xeep-border: #e2e8f0;
  --xeep-border-hover: #cbd5e1;
  
  /* Design Tokens */
  --xeep-radius-sm: 8px;
  --xeep-radius: 16px;
  --xeep-radius-lg: 24px;
  --xeep-radius-full: 9999px;
  
  /* Shadows */
  --xeep-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --xeep-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --xeep-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --xeep-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --xeep-shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
  
  /* Transitions */
  --xeep-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --xeep-transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Font */
  --xeep-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Container */
.xeep-forum-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-family: var(--xeep-font);
  color: var(--xeep-text);
  line-height: 1.6;
}

/* Full width container for single post */
.xeep-forum-single-wrapper {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.xeep-forum-single-wrapper .xeep-forum-container {
  max-width: 100%;
  width: 100%;
  padding: 1rem;
  margin: 0;
}

@media (min-width: 768px) {
  .xeep-forum-single-wrapper .xeep-forum-container {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .xeep-forum-single-wrapper .xeep-forum-container {
    padding: 2rem 3rem;
  }
}

.xeep-forum-topics-container {
  background: var(--xeep-bg);
  min-height: 100vh;
}

/* ============================================
   FORUM HEADER CARD
   ============================================ */

.xeep-forum-header-card {
  background: var(--xeep-bg-card);
  border-radius: var(--xeep-radius);
  box-shadow: var(--xeep-shadow);
  border: 1px solid var(--xeep-border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.xeep-forum-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.xeep-forum-main-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.375rem;
  color: var(--xeep-text);
}

.xeep-forum-main-subtitle {
  font-size: 0.9375rem;
  color: var(--xeep-text-secondary);
  margin: 0;
}

/* Toolbar */
.xeep-forum-toolbar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.xeep-forum-search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.xeep-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--xeep-text-muted);
  pointer-events: none;
}

.xeep-forum-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 2px solid var(--xeep-border);
  border-radius: var(--xeep-radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--xeep-bg);
  color: var(--xeep-text);
  transition: var(--xeep-transition);
}

.xeep-forum-search-input:hover {
  border-color: var(--xeep-border-hover);
}

.xeep-forum-search-input:focus {
  outline: none;
  border-color: var(--xeep-primary);
  box-shadow: 0 0 0 4px var(--xeep-primary-glow);
  background: var(--xeep-bg-card);
}

.xeep-forum-search-input::placeholder {
  color: var(--xeep-text-muted);
}

.xeep-forum-filters {
  display: flex;
  gap: 0.75rem;
}

.xeep-forum-filter-select {
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 2px solid var(--xeep-border);
  border-radius: var(--xeep-radius-sm);
  background: var(--xeep-bg);
  color: var(--xeep-text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--xeep-transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.xeep-forum-filter-select:hover {
  border-color: var(--xeep-border-hover);
}

.xeep-forum-filter-select:focus {
  outline: none;
  border-color: var(--xeep-primary);
  box-shadow: 0 0 0 4px var(--xeep-primary-glow);
}

/* ============================================
   TOPIC LIST
   ============================================ */

.xeep-forum-topics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Topic Card */
.xeep-forum-topic-card {
  background: var(--xeep-bg-card);
  border-radius: var(--xeep-radius);
  padding: 1.5rem;
  box-shadow: var(--xeep-shadow);
  border: 1px solid var(--xeep-border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: start;
  transition: var(--xeep-transition);
}

.xeep-forum-topic-card:hover {
  box-shadow: var(--xeep-shadow-md);
  border-color: var(--xeep-border-hover);
  transform: translateY(-2px);
}

.xeep-forum-topic-card.is-pinned {
  background: linear-gradient(135deg, var(--xeep-primary-light) 0%, var(--xeep-bg-card) 100%);
  border-color: var(--xeep-primary);
  border-left: 4px solid var(--xeep-primary);
}

.xeep-forum-topic-card.is-locked {
  opacity: 0.85;
}

/* Like/Upvote Column */
.xeep-topic-upvote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Modern Like Button */
.xeep-upvote-btn,
.xeep-like-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1.5px solid var(--xeep-border);
  border-radius: var(--xeep-radius-sm);
  color: var(--xeep-text-muted);
  cursor: pointer;
  transition: var(--xeep-transition);
  font-weight: 600;
  font-size: 0.8125rem;
}

.xeep-upvote-btn:hover,
.xeep-like-btn:hover {
  background: var(--xeep-danger-light);
  color: var(--xeep-danger);
  border-color: var(--xeep-danger);
  transform: scale(1.05);
}

.xeep-upvote-btn.voted,
.xeep-like-btn.voted {
  background: var(--xeep-danger-light);
  color: var(--xeep-danger);
  border-color: var(--xeep-danger);
}

.xeep-upvote-btn.voted svg,
.xeep-like-btn.voted svg {
  fill: var(--xeep-danger);
}

.xeep-upvote-btn svg,
.xeep-like-btn svg {
  transition: var(--xeep-transition);
}

.xeep-upvote-count,
.like-count {
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Small like button for replies */
.xeep-like-btn--small {
  flex-direction: row;
  padding: 0.375rem 0.625rem;
  gap: 0.375rem;
  border-radius: var(--xeep-radius-full);
}

/* Content Column */
.xeep-topic-content-col {
  flex: 1;
  min-width: 0;
}

.xeep-topic-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.xeep-topic-badges {
  display: flex;
  gap: 0.375rem;
}

.xeep-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--xeep-radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.xeep-badge--pinned {
  background: var(--xeep-primary-light);
  color: var(--xeep-primary);
}

.xeep-badge--locked {
  background: var(--xeep-warning-light);
  color: #92400e;
}

.xeep-badge--bronze {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.xeep-badge--silver {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #475569;
}

.xeep-badge--gold {
  background: linear-gradient(135deg, #fef08a, #fbbf24);
  color: #854d0e;
}

.xeep-badge--newcomer {
  background: var(--xeep-bg-hover);
  color: var(--xeep-text-muted);
}

/* Legacy badge classes */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--xeep-radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pinned {
  background: var(--xeep-primary-light);
  color: var(--xeep-primary);
}

.badge-locked {
  background: var(--xeep-warning-light);
  color: #92400e;
}

.badge-bronze,
.author-badge.badge-bronze {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.badge-silver,
.author-badge.badge-silver {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #475569;
}

.badge-gold,
.author-badge.badge-gold {
  background: linear-gradient(135deg, #fef08a, #fbbf24);
  color: #854d0e;
}

.badge-newcomer,
.author-badge.badge-newcomer {
  background: var(--xeep-bg-hover);
  color: var(--xeep-text-muted);
}

.xeep-topic-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.xeep-topic-title a {
  color: var(--xeep-text);
  text-decoration: none;
  transition: var(--xeep-transition);
}

.xeep-topic-title a:hover {
  color: var(--xeep-primary);
}

.xeep-topic-excerpt {
  color: var(--xeep-text-secondary);
  font-size: 0.9375rem;
  margin: 0.375rem 0 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Topic Meta */
.xeep-topic-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--xeep-text-muted);
}

.xeep-topic-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.xeep-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--xeep-radius-full);
  object-fit: cover;
  border: 2px solid var(--xeep-bg-card);
  box-shadow: var(--xeep-shadow-sm);
}

.xeep-author-name {
  color: var(--xeep-text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--xeep-transition);
}

.xeep-author-name:hover {
  color: var(--xeep-primary);
}

.xeep-meta-separator {
  color: var(--xeep-border);
}

.xeep-topic-category {
  color: var(--xeep-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--xeep-transition);
}

.xeep-topic-category:hover {
  text-decoration: underline;
}

/* Stats Column */
.xeep-topic-stats-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  min-width: 60px;
}

.xeep-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--xeep-text-muted);
  font-size: 0.8125rem;
}

.xeep-stat-item svg {
  opacity: 0.6;
}

.xeep-stat-value {
  font-weight: 600;
  color: var(--xeep-text-secondary);
}

/* ============================================
   BUTTONS
   ============================================ */

.xeep-forum-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--xeep-radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--xeep-transition);
  text-decoration: none;
  line-height: 1.4;
  font-family: inherit;
}

.xeep-forum-btn--primary {
  background: linear-gradient(135deg, var(--xeep-primary), var(--xeep-primary-hover));
  color: white;
  box-shadow: var(--xeep-shadow), 0 0 0 0 var(--xeep-primary-glow);
}

.xeep-forum-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--xeep-shadow-md), var(--xeep-shadow-glow);
}

.xeep-forum-btn--primary:active {
  transform: translateY(0);
}

.xeep-forum-btn--secondary {
  background: var(--xeep-bg-card);
  color: var(--xeep-text);
  border: 2px solid var(--xeep-border);
}

.xeep-forum-btn--secondary:hover {
  background: var(--xeep-bg-hover);
  border-color: var(--xeep-border-hover);
}

.xeep-forum-btn--ghost {
  background: transparent;
  color: var(--xeep-text-secondary);
  padding: 0.5rem 1rem;
}

.xeep-forum-btn--ghost:hover {
  background: var(--xeep-bg-hover);
  color: var(--xeep-text);
}

.xeep-forum-btn--icon {
  padding: 0.625rem;
  border-radius: var(--xeep-radius-full);
}

.xeep-forum-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.xeep-forum-btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.xeep-forum-btn--lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ============================================
   FORMS
   ============================================ */

.xeep-forum-form {
  background: var(--xeep-bg-card);
  border: 1px solid var(--xeep-border);
  border-radius: var(--xeep-radius);
  padding: 1.5rem;
  box-shadow: var(--xeep-shadow);
}

.xeep-forum-form-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--xeep-border);
}

.xeep-forum-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--xeep-text);
}

.xeep-forum-form-subtitle {
  font-size: 0.9375rem;
  color: var(--xeep-text-muted);
  margin: 0.5rem 0 0;
}

.xeep-forum-form-group {
  margin-bottom: 1.25rem;
}

.xeep-forum-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--xeep-text);
  font-size: 0.9375rem;
}

.xeep-forum-input,
.xeep-forum-textarea,
.xeep-forum-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--xeep-border);
  border-radius: var(--xeep-radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--xeep-bg-card);
  color: var(--xeep-text);
  transition: var(--xeep-transition);
}

.xeep-forum-input:hover,
.xeep-forum-textarea:hover,
.xeep-forum-select:hover {
  border-color: var(--xeep-border-hover);
}

.xeep-forum-input:focus,
.xeep-forum-textarea:focus,
.xeep-forum-select:focus {
  outline: none;
  border-color: var(--xeep-primary);
  box-shadow: 0 0 0 4px var(--xeep-primary-glow);
}

.xeep-forum-input::placeholder,
.xeep-forum-textarea::placeholder {
  color: var(--xeep-text-muted);
}

.xeep-forum-textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

.xeep-forum-textarea--sm {
  min-height: 80px;
}

.xeep-required {
  color: var(--xeep-danger);
  margin-left: 0.25rem;
}

.xeep-forum-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--xeep-border);
}

.xeep-forum-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* Nested reply form */
.xeep-forum-nested-reply-form {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--xeep-bg);
  border-radius: var(--xeep-radius-sm);
}

.xeep-forum-nested-reply-form.hidden {
  display: none;
}

.xeep-forum-nested-reply-form {
  background: var(--xeep-bg-card);
  border: 1px solid var(--xeep-border);
  border-radius: var(--xeep-radius-sm);
  padding: 1rem;
  margin-top: 1rem;
}

/* ============================================
   REPLIES
   ============================================ */

.xeep-forum-replies-section {
  margin-top: 2.5rem;
}

.xeep-forum-replies__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--xeep-border);
  color: var(--xeep-text);
}

.xeep-forum-replies {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.xeep-forum-reply-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--xeep-border);
  border-radius: var(--xeep-radius);
  background: var(--xeep-bg-card);
  box-shadow: var(--xeep-shadow-sm);
  transition: var(--xeep-transition);
}

.xeep-forum-reply-item:hover {
  box-shadow: var(--xeep-shadow);
}

.xeep-forum-reply-item--child {
  margin-left: 2.5rem;
  border-left: 3px solid var(--xeep-primary);
  background: var(--xeep-bg-card);
}

.xeep-forum-reply__avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--xeep-radius-full);
  flex-shrink: 0;
  object-fit: cover;
  border: 3px solid var(--xeep-bg-card);
  box-shadow: var(--xeep-shadow);
}

.xeep-forum-reply__content {
  flex: 1;
  min-width: 0;
}

.xeep-forum-reply__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.xeep-forum-reply__author {
  font-weight: 600;
  color: var(--xeep-text);
  text-decoration: none;
}

.xeep-forum-reply__author:hover {
  color: var(--xeep-primary);
}

.xeep-forum-reply__date {
  font-size: 0.8125rem;
  color: var(--xeep-text-muted);
}

.xeep-forum-reply__text {
  margin: 0.75rem 0;
  line-height: 1.7;
  color: var(--xeep-text-secondary);
}

.xeep-forum-reply__text p {
  margin: 0 0 0.75rem;
}

.xeep-forum-reply__text p:last-child {
  margin-bottom: 0;
}

.xeep-forum-reply__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ============================================
   SINGLE TOPIC PAGE
   ============================================ */

.xeep-forum-single-wrapper {
  background: var(--xeep-bg);
  min-height: 100vh;
  padding: 2rem 0;
}

.xeep-forum-topic-single {
  background: var(--xeep-bg-card);
  border-radius: var(--xeep-radius);
  box-shadow: var(--xeep-shadow);
  overflow: hidden;
}

.xeep-forum-topic-header {
  padding: 2rem;
  border-bottom: 1px solid var(--xeep-border);
}

.xeep-forum-topic-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.5rem 0;
  color: var(--xeep-text);
  line-height: 1.3;
}

.xeep-forum-topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--xeep-text-muted);
}

.meta-item svg {
  opacity: 0.6;
}

.xeep-forum-topic-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  padding: 2rem;
}

.topic-author-sidebar {
  text-align: center;
  padding: 1.5rem;
  background: var(--xeep-bg);
  border-radius: var(--xeep-radius);
}

.author-avatar {
  margin-bottom: 1rem;
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: var(--xeep-radius-full);
  border: 4px solid var(--xeep-bg-card);
  box-shadow: var(--xeep-shadow-md);
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.author-info .author-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--xeep-text);
  text-decoration: none;
}

.author-info .author-name:hover {
  color: var(--xeep-primary);
}

.author-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--xeep-radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.author-posts {
  font-size: 0.8125rem;
  color: var(--xeep-text-muted);
}

.topic-main-content {
  min-width: 0;
}

.topic-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--xeep-text-secondary);
}

.topic-body p {
  margin: 0 0 1rem;
}

.topic-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--xeep-radius-sm);
}

.topic-custom-fields {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--xeep-bg);
  border-radius: var(--xeep-radius-sm);
}

.custom-field {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--xeep-border);
  color: var(--xeep-text-secondary);
}

.custom-field:last-child {
  border-bottom: none;
}

.custom-field strong {
  color: var(--xeep-text);
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.topic-tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--xeep-bg-hover);
  border-radius: var(--xeep-radius-full);
  color: var(--xeep-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--xeep-transition);
}

.topic-tag:hover {
  background: var(--xeep-primary-light);
}

.topic-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--xeep-border);
}

.xeep-forum-report-btn,
.xeep-forum-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--xeep-bg-hover);
  border: 2px solid transparent;
  border-radius: var(--xeep-radius-sm);
  color: var(--xeep-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--xeep-transition);
  font-family: inherit;
}

.xeep-forum-report-btn:hover {
  background: var(--xeep-danger-light);
  color: var(--xeep-danger);
  border-color: var(--xeep-danger);
}

.xeep-forum-share-btn:hover {
  background: var(--xeep-info-light);
  color: var(--xeep-info);
  border-color: var(--xeep-info);
}

/* ============================================
   MODAL
   ============================================ */

.xeep-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.xeep-modal-overlay.is-open {
  opacity: 1;
}

.xeep-modal {
  background: var(--xeep-bg-card);
  border-radius: var(--xeep-radius-lg);
  box-shadow: var(--xeep-shadow-lg);
  width: 100%;
  max-width: 600px;
  margin: auto;
  transform: scale(0.95) translateY(-20px);
  transition: transform 0.3s ease;
  max-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
}

.xeep-modal-overlay.is-open .xeep-modal {
  transform: scale(1) translateY(0);
}

.xeep-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--xeep-border);
  flex-shrink: 0;
}

.xeep-modal-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0;
  color: var(--xeep-text);
}

.xeep-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--xeep-bg-hover);
  border-radius: var(--xeep-radius-full);
  color: var(--xeep-text-secondary);
  cursor: pointer;
  transition: var(--xeep-transition);
}

.xeep-modal-close:hover {
  background: var(--xeep-bg-active);
  color: var(--xeep-text);
}

.xeep-modal-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.xeep-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.xeep-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--xeep-border);
  background: var(--xeep-bg);
  border-radius: 0 0 var(--xeep-radius-lg) var(--xeep-radius-lg);
  flex-shrink: 0;
}

/* ============================================
   NOTICES
   ============================================ */

.xeep-forum-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--xeep-radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
}

.xeep-forum-notice--success {
  background: var(--xeep-success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.xeep-forum-notice--error {
  background: var(--xeep-danger-light);
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.xeep-forum-notice--warning {
  background: var(--xeep-warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

.xeep-forum-notice--info {
  background: var(--xeep-info-light);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.xeep-forum-notice a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.xeep-forum-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--xeep-bg-card);
  border-radius: var(--xeep-radius);
  box-shadow: var(--xeep-shadow);
  border: 1px solid var(--xeep-border);
}

.xeep-empty-icon {
  color: var(--xeep-text-muted);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.xeep-forum-empty-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--xeep-text);
}

.xeep-forum-empty-state p {
  color: var(--xeep-text-secondary);
  margin: 0 0 1.5rem;
}

/* ============================================
   LOAD MORE
   ============================================ */

.xeep-forum-load-more {
  text-align: center;
  margin-top: 1.5rem;
}

/* ============================================
   PAGINATION
   ============================================ */

.xeep-forum-pagination {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 2rem;
}

.xeep-forum-pagination a,
.xeep-forum-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--xeep-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--xeep-transition);
}

.xeep-forum-pagination a {
  background: var(--xeep-bg-card);
  color: var(--xeep-text-secondary);
  border: 1px solid var(--xeep-border);
}

.xeep-forum-pagination a:hover {
  background: var(--xeep-bg-hover);
  border-color: var(--xeep-border-hover);
  color: var(--xeep-text);
}

.xeep-forum-pagination span.current {
  background: var(--xeep-primary);
  color: white;
  border: 1px solid var(--xeep-primary);
}

/* ============================================
   SPINNER
   ============================================ */

.xeep-forum-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--xeep-border);
  border-top-color: var(--xeep-primary);
  border-radius: 50%;
  animation: xeep-spin 0.8s linear infinite;
}

@keyframes xeep-spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .xeep-forum-container {
    padding: 1rem;
  }
  
  .xeep-forum-header-top {
    flex-direction: column;
    align-items: stretch;
  }
  
  .xeep-forum-toolbar {
    flex-direction: column;
  }
  
  .xeep-forum-search-box {
    min-width: 100%;
  }
  
  .xeep-forum-filters {
    width: 100%;
  }
  
  .xeep-forum-filter-select {
    flex: 1;
  }
  
  .xeep-forum-topic-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .xeep-topic-upvote-col {
    order: 2;
    flex-direction: row;
    gap: 0.75rem;
  }
  
  .xeep-upvote-btn {
    flex-direction: row;
  }
  
  .xeep-topic-stats-col {
    order: 3;
    flex-direction: row;
    justify-content: flex-start;
    padding: 0;
    gap: 1.5rem;
  }
  
  .xeep-forum-topic-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .topic-author-sidebar {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 1rem;
    padding: 1rem;
  }
  
  .author-avatar {
    margin-bottom: 0;
  }
  
  .author-avatar img {
    width: 56px;
    height: 56px;
  }
  
  .xeep-forum-reply-item--child {
    margin-left: 1.5rem;
  }
  
  .xeep-modal-overlay {
    padding: 1rem;
  }
  
  .xeep-modal {
    max-height: calc(100vh - 2rem);
  }
}

/* ============================================
   USER PROFILES
   ============================================ */

.xeep-user-profile {
  max-width: 100%;
  margin: 0 auto;
}

/* Cover Image */
.xeep-profile-cover {
  height: 200px;
  background: linear-gradient(135deg, var(--xeep-primary) 0%, var(--xeep-primary-hover) 100%);
  background-size: cover;
  background-position: center;
  border-radius: var(--xeep-radius-lg) var(--xeep-radius-lg) 0 0;
  position: relative;
}

.xeep-profile-cover-edit {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px);
}

/* Profile Header */
.xeep-profile-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 0 2rem 1.5rem;
  background: var(--xeep-bg-card);
  margin-top: -60px;
  position: relative;
  flex-wrap: wrap;
}

.xeep-profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.xeep-profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--xeep-bg-card);
  box-shadow: var(--xeep-shadow-md);
  object-fit: cover;
}

.xeep-profile-avatar-wrap .xeep-profile-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  transform: translate(25%, 25%);
}

.xeep-profile-info {
  flex: 1;
  min-width: 200px;
  padding-top: 70px;
}

.xeep-profile-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--xeep-text);
  margin: 0 0 0.25rem;
}

.xeep-profile-username {
  color: var(--xeep-text-muted);
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
}

.xeep-profile-bio {
  color: var(--xeep-text-secondary);
  margin: 0 0 1rem;
  line-height: 1.6;
  max-width: 600px;
}

.xeep-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--xeep-text-muted);
  font-size: 0.875rem;
}

.xeep-profile-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.xeep-profile-meta-item svg {
  opacity: 0.7;
}

.xeep-profile-link {
  color: var(--xeep-primary);
  text-decoration: none;
}

.xeep-profile-link:hover {
  text-decoration: underline;
}

.xeep-profile-actions {
  padding-top: 70px;
  flex-shrink: 0;
}

.xeep-profile-social {
  display: flex;
  gap: 0.5rem;
}

.xeep-social-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--xeep-radius);
  background: var(--xeep-bg-hover);
  color: var(--xeep-text-secondary);
  transition: var(--xeep-transition);
  text-decoration: none;
}

.xeep-social-btn:hover {
  background: var(--xeep-primary);
  color: white;
}

/* Profile Stats */
.xeep-profile-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 1.5rem 2rem;
  background: var(--xeep-bg-card);
  border-top: 1px solid var(--xeep-border);
  border-bottom: 1px solid var(--xeep-border);
}

.xeep-profile-stat {
  text-align: center;
}

.xeep-profile-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--xeep-text);
}

.xeep-profile-stat-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--xeep-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Profile Tabs */
.xeep-profile-tabs {
  background: var(--xeep-bg-card);
  border-radius: 0 0 var(--xeep-radius-lg) var(--xeep-radius-lg);
}

.xeep-profile-tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--xeep-border);
  padding: 0 2rem;
  overflow-x: auto;
}

.xeep-profile-tab-btn {
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--xeep-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--xeep-transition);
  white-space: nowrap;
}

.xeep-profile-tab-btn:hover {
  color: var(--xeep-text);
}

.xeep-profile-tab-btn.active {
  color: var(--xeep-primary);
  border-bottom-color: var(--xeep-primary);
}

.xeep-profile-tabs-content {
  padding: 1.5rem 2rem 2rem;
}

.xeep-profile-tab-pane {
  display: none;
}

.xeep-profile-tab-pane.active {
  display: block;
}

/* Profile Content Items */
.xeep-profile-content-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--xeep-border);
}

.xeep-profile-content-item:last-child {
  border-bottom: none;
}

.xeep-content-item-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.375rem;
  color: var(--xeep-text);
}

.xeep-content-item-title a {
  color: inherit;
  text-decoration: none;
}

.xeep-content-item-title a:hover {
  color: var(--xeep-primary);
}

.xeep-content-item-context {
  font-size: 0.875rem;
  color: var(--xeep-text-muted);
  margin: 0 0 0.375rem;
}

.xeep-content-item-context a {
  color: var(--xeep-primary);
  text-decoration: none;
}

.xeep-content-item-excerpt {
  font-size: 0.9375rem;
  color: var(--xeep-text-secondary);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.xeep-content-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--xeep-text-muted);
}

.xeep-content-item-likes {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.xeep-no-content {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--xeep-text-muted);
}

.xeep-profile-load-more-wrap {
  text-align: center;
  margin-top: 1.5rem;
}

/* Loading State */
.xeep-loading {
  text-align: center;
  padding: 2rem;
  color: var(--xeep-text-muted);
}

/* Author Link Styles */
.xeep-author-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: var(--xeep-transition);
}

.xeep-author-link:hover {
  color: var(--xeep-primary);
}

.xeep-author-link img {
  border-radius: 50%;
}

/* Mentions */
.xeep-mention {
  color: var(--xeep-primary);
  font-weight: 500;
  text-decoration: none;
}

.xeep-mention:hover {
  text-decoration: underline;
}

/* Profile Responsive */
@media (max-width: 768px) {
  .xeep-profile-cover {
    height: 150px;
  }
  
  .xeep-profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem 1.5rem;
    margin-top: -50px;
  }
  
  .xeep-profile-avatar {
    width: 100px;
    height: 100px;
  }
  
  .xeep-profile-info {
    padding-top: 0.5rem;
  }
  
  .xeep-profile-meta {
    justify-content: center;
  }
  
  .xeep-profile-actions {
    padding-top: 0;
  }
  
  .xeep-profile-stats {
    gap: 1.5rem;
    padding: 1rem;
  }
  
  .xeep-profile-stat-value {
    font-size: 1.25rem;
  }
  
  .xeep-profile-tabs-nav {
    padding: 0 1rem;
  }
  
  .xeep-profile-tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .xeep-profile-tabs-content {
    padding: 1rem;
  }
}

/* ============================================
   PROFILE EDIT MODAL
   ============================================ */

.xeep-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: var(--xeep-transition-slow);
}

.xeep-profile-modal.is-open {
  background: rgba(0, 0, 0, 0.6);
  opacity: 1;
}

.xeep-profile-modal-content {
  background: var(--xeep-bg-card);
  border-radius: var(--xeep-radius);
  box-shadow: var(--xeep-shadow-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: var(--xeep-transition-slow);
}

.xeep-profile-modal.is-open .xeep-profile-modal-content {
  transform: scale(1) translateY(0);
}

.xeep-profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--xeep-border);
}

.xeep-profile-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--xeep-text);
}

.xeep-profile-modal-close {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--xeep-text-muted);
  border-radius: var(--xeep-radius-sm);
  transition: var(--xeep-transition);
}

.xeep-profile-modal-close:hover {
  background: var(--xeep-bg-hover);
  color: var(--xeep-text);
}

.xeep-profile-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.xeep-form-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--xeep-text-muted);
  margin: 1.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--xeep-border);
}

.xeep-form-group {
  margin-bottom: 1rem;
}

.xeep-form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--xeep-text-secondary);
  margin-bottom: 0.5rem;
}

.xeep-form-group label svg {
  opacity: 0.7;
}

.xeep-form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--xeep-border);
  border-radius: var(--xeep-radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--xeep-bg);
  color: var(--xeep-text);
  transition: var(--xeep-transition);
  resize: vertical;
}

.xeep-form-control:hover {
  border-color: var(--xeep-border-hover);
}

.xeep-form-control:focus {
  outline: none;
  border-color: var(--xeep-primary);
  box-shadow: 0 0 0 4px var(--xeep-primary-glow);
  background: var(--xeep-bg-card);
}

.xeep-form-control::placeholder {
  color: var(--xeep-text-muted);
}

.xeep-profile-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--xeep-border);
}

@media (max-width: 640px) {
  .xeep-profile-modal-content {
    max-height: 100vh;
    border-radius: 0;
    height: 100%;
  }
  
  .xeep-profile-modal-footer {
    flex-direction: column-reverse;
  }
  
  .xeep-profile-modal-footer button {
    width: 100%;
  }
}