/* Marsh Pages Styles */

/* Container */
.marsh-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Breadcrumb */
.marsh-breadcrumb {
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.marsh-breadcrumb a {
  color: #0d6efd;
  text-decoration: none;
}

.marsh-breadcrumb a:hover {
  text-decoration: underline;
}

.marsh-breadcrumb__sep {
  margin: 0 8px;
  color: #6c757d;
}

.marsh-breadcrumb__current {
  color: #6c757d;
}

/* Header */
.marsh-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.marsh-header__title {
  font-size: 2rem;
  margin: 0 0 8px 0;
}

.marsh-header__subtitle {
  color: #6c757d;
  margin: 0;
}

/* Identity Badge */
.marsh-identity-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 20px;
}

.marsh-identity-badge__avatar {
  font-size: 1.5rem;
}

.marsh-identity-badge__name {
  font-weight: 500;
}

.marsh-identity-badge__edit {
  text-decoration: none;
  opacity: 0.6;
}

.marsh-identity-badge__edit:hover {
  opacity: 1;
}

/* Section */
.marsh-section {
  margin-bottom: 40px;
}

.marsh-section__title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.marsh-section__desc {
  color: #6c757d;
  margin-bottom: 16px;
}

/* Forum Grid */
.marsh-forums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Forum Card */
.marsh-forum-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  border-left: 4px solid var(--forum-color, #6c757d);
}

.marsh-forum-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: var(--forum-color, #6c757d);
  text-decoration: none;
  color: inherit;
}

.marsh-forum-card--primary {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-width: 2px;
}

.marsh-forum-card__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.marsh-forum-card__content {
  flex: 1;
  min-width: 0;
}

.marsh-forum-card__title {
  font-size: 1.1rem;
  margin: 0 0 4px 0;
}

.marsh-forum-card__desc {
  font-size: 0.85rem;
  color: #6c757d;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.marsh-forum-card__stats {
  font-size: 0.8rem;
  color: #adb5bd;
}

.marsh-forum-card__stats span {
  margin-right: 12px;
}

.marsh-forum-card__badge {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Forum Header */
.marsh-forum-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
  border-left: 4px solid var(--forum-color, #6c757d);
  border-radius: 12px;
  margin-bottom: 24px;
}

.marsh-forum-header__icon {
  font-size: 3rem;
}

.marsh-forum-header__content {
  flex: 1;
}

.marsh-forum-header__title {
  margin: 0 0 8px 0;
}

.marsh-forum-header__desc {
  color: #6c757d;
  margin: 0 0 8px 0;
}

.marsh-forum-header__stats {
  font-size: 0.85rem;
  color: #adb5bd;
}

.marsh-forum-header__stats span {
  margin-right: 16px;
}

/* New Thread Form */
.marsh-new-thread {
  margin-bottom: 24px;
}

/* Sort Bar */
.marsh-sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.marsh-sort-bar__label {
  color: #6c757d;
  font-size: 0.9rem;
}

.marsh-sort-bar__option {
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: #495057;
  font-size: 0.9rem;
}

.marsh-sort-bar__option:hover {
  background: #e9ecef;
  text-decoration: none;
  color: #212529;
}

.marsh-sort-bar__option.active {
  background: #0d6efd;
  color: #fff;
}

/* Thread Cards */
.marsh-threads {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marsh-thread-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  position: relative;
}

.marsh-thread-card:hover {
  background: #f8f9fa;
  text-decoration: none;
  color: inherit;
}

.marsh-thread-card--pinned {
  border-color: #ffc107;
  background: #fffbeb;
}

.marsh-thread-card__pin {
  position: absolute;
  top: 8px;
  right: 8px;
}

.marsh-thread-card__votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.marsh-thread-card__score {
  font-weight: 600;
  font-size: 1.1rem;
}

.marsh-thread-card__score.positive { color: #198754; }
.marsh-thread-card__score.negative { color: #dc3545; }

.marsh-thread-card__content {
  flex: 1;
  min-width: 0;
}

.marsh-thread-card__title {
  font-size: 1rem;
  margin: 0 0 4px 0;
  font-weight: 500;
}

.marsh-thread-card__meta {
  font-size: 0.85rem;
  color: #6c757d;
}

.marsh-thread-card__author {
  margin-right: 12px;
}

.marsh-thread-card__stats {
  text-align: right;
  font-size: 0.85rem;
  color: #6c757d;
}

.marsh-thread-card__replies {
  display: block;
}

.marsh-thread-card__activity {
  display: block;
  font-size: 0.75rem;
}

/* Empty State */
.marsh-empty {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.marsh-empty__icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.marsh-empty__title {
  margin: 0 0 8px 0;
}

.marsh-empty__desc {
  color: #6c757d;
  margin-bottom: 20px;
}

/* Pagination */
.marsh-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px;
}

.marsh-pagination__link {
  padding: 8px 16px;
  background: #0d6efd;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
}

.marsh-pagination__link:hover {
  background: #0b5ed7;
  color: #fff;
}

.marsh-pagination__info {
  color: #6c757d;
}

/* Thread View */
.marsh-thread-view__header {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  margin-bottom: 24px;
}

.marsh-thread-view__voting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.marsh-thread-view__title {
  margin: 0 0 12px 0;
}

.marsh-thread-view__meta {
  font-size: 0.9rem;
  color: #6c757d;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.marsh-thread-view__forum {
  padding: 2px 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid var(--forum-color, #6c757d);
}

/* Vote Buttons */
.marsh-vote {
  background: none;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #6c757d;
  transition: all 0.15s;
}

.marsh-vote:hover:not(:disabled) {
  background: #f8f9fa;
}

.marsh-vote:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.marsh-vote--up.active {
  background: #d4edda;
  border-color: #198754;
  color: #198754;
}

.marsh-vote--down.active {
  background: #f8d7da;
  border-color: #dc3545;
  color: #dc3545;
}

.marsh-vote__score {
  font-weight: 600;
  font-size: 1.1rem;
}

/* Posts */
.marsh-posts {
  margin-bottom: 24px;
}

.marsh-post {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 8px;
  margin-left: calc(var(--depth, 0) * 24px);
}

.marsh-post--reply {
  border-left: 3px solid #dee2e6;
}

.marsh-post__voting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.marsh-post__content {
  flex: 1;
  min-width: 0;
}

.marsh-post__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.marsh-post__author {
  font-weight: 500;
}

.marsh-post__time {
  color: #6c757d;
}

.marsh-post__body {
  line-height: 1.6;
}

.marsh-post__actions {
  margin-top: 8px;
}

.marsh-post__action {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 8px;
}

.marsh-post__action:hover {
  color: #0d6efd;
}

/* Reply Form */
.marsh-reply-form {
  margin-left: calc(var(--depth, 0) * 24px + 56px);
  margin-bottom: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.marsh-main-reply {
  padding: 24px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
}

.marsh-main-reply h4 {
  margin-top: 0;
}

.marsh-main-reply--locked {
  text-align: center;
  background: #f8f9fa;
}

/* Promote Section */
.marsh-promote {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-radius: 12px;
  text-align: center;
}

.marsh-promote h4 {
  margin-top: 0;
}

/* Info Cards */
.marsh-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.marsh-info__card {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.marsh-info__card h4 {
  margin-top: 0;
}

.marsh-info__card p {
  margin-bottom: 0;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Badge Mini */
.marsh-badge-mini {
  font-size: 0.8rem;
  margin-left: 2px;
}

.marsh-badge {
  display: inline-block;
  padding: 4px 8px;
  background: #e9ecef;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-right: 4px;
}

/* Identity Page */
.marsh-identity-page {
  max-width: 600px;
  margin: 0 auto;
}

.marsh-identity-card {
  text-align: center;
  padding: 40px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 16px;
  margin-bottom: 24px;
}

.marsh-identity-card__icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.marsh-identity-card__avatar {
  font-size: 5rem;
  margin-bottom: 16px;
}

.marsh-identity-card__username {
  margin: 0 0 16px 0;
}

.marsh-identity-card__stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 16px;
}

.marsh-identity-card__stats .stat {
  text-align: center;
}

.marsh-identity-card__stats .stat__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
}

.marsh-identity-card__stats .stat__label {
  font-size: 0.85rem;
  color: #6c757d;
}

.marsh-identity-card__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Identity Intro */
.marsh-identity-intro {
  text-align: center;
  margin-bottom: 32px;
}

.marsh-identity-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.marsh-identity-features .feature {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.marsh-identity-features .feature__icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.marsh-identity-features .feature h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.marsh-identity-features .feature p {
  margin: 0;
  font-size: 0.85rem;
  color: #6c757d;
}

/* Identity Tabs */
.marsh-identity-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: #e9ecef;
  padding: 4px;
  border-radius: 8px;
}

.marsh-identity-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.15s;
}

.marsh-identity-tab:hover {
  background: rgba(255,255,255,0.5);
}

.marsh-identity-tab.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Identity Form */
.marsh-identity-form {
  padding: 24px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
}

/* Avatar Grid */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.avatar-option {
  padding: 12px;
  font-size: 1.5rem;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.avatar-option:hover {
  background: #e9ecef;
}

.avatar-option.active {
  border-color: #0d6efd;
  background: #e7f1ff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .marsh-header {
    flex-direction: column;
    gap: 16px;
  }

  .marsh-forums-grid {
    grid-template-columns: 1fr;
  }

  .marsh-forum-header {
    flex-direction: column;
    text-align: center;
  }

  .marsh-forum-header__new {
    width: 100%;
  }

  .marsh-thread-view__header {
    flex-direction: column;
  }

  .marsh-thread-view__voting {
    flex-direction: row;
    justify-content: center;
  }

  .marsh-identity-features {
    grid-template-columns: 1fr;
  }

  .avatar-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .marsh-post {
    margin-left: calc(var(--depth, 0) * 12px);
  }

  .marsh-reply-form {
    margin-left: calc(var(--depth, 0) * 12px + 20px);
  }
}
