/* ==========================================================================
   TempestXI Forum Styles - Full Redesign
   FFXI-inspired warm cream/gold aesthetic
   ========================================================================== */

/* Forum Page Layout */
.forum-page {
  padding: 30px 0 40px;
}

/* ==========================================================================
   Forum Header - Decorative style matching welcome section
   ========================================================================== */

.forum-header {
  max-width: 750px;
  margin: 0 auto 30px;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.forum-header::before {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  margin: 0 auto 20px;
}

.forum-header h1 {
  color: var(--accent);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.forum-header p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  font-style: italic;
}

.forum-header::after {
  content: '\2726';
  display: block;
  margin-top: 20px;
  color: var(--accent-glow);
  font-size: 14px;
  opacity: 0.7;
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(250, 246, 237, 0.6) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--accent-bright);
  text-decoration: underline;
}

.breadcrumb .separator {
  color: var(--accent-glow);
  font-size: 10px;
}

.breadcrumb .current {
  color: var(--text-bright);
  font-weight: 500;
}

/* ==========================================================================
   Messages / Alerts
   ========================================================================== */

.message {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.message::before {
  font-size: 18px;
  flex-shrink: 0;
}

.message-success {
  background: linear-gradient(180deg, rgba(61, 153, 112, 0.12) 0%, rgba(61, 153, 112, 0.06) 100%);
  border: 1px solid rgba(61, 153, 112, 0.4);
  color: #2d7a56;
}

.message-success::before {
  content: '✓';
  color: var(--success);
}

.message-error {
  background: linear-gradient(180deg, rgba(192, 57, 43, 0.12) 0%, rgba(192, 57, 43, 0.06) 100%);
  border: 1px solid rgba(192, 57, 43, 0.4);
  color: #a63329;
}

.message-error::before {
  content: '✕';
  color: var(--error);
}

.message p {
  margin: 0;
}

.message p + p {
  margin-top: 4px;
}

/* ==========================================================================
   Category Cards - Feature card style
   ========================================================================== */

.forum-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(180deg, #faf6ed 0%, #f5e6c8 100%);
  border: 1px solid #c9a227;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.1);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.category-card:hover {
  border-color: #d4b82e;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.2);
  transform: translateY(-2px);
  text-decoration: none;
}

.category-card:hover::before {
  opacity: 1;
}

.category-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #c9a227 0%, #a68b1a 100%);
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  box-shadow:
    0 2px 4px rgba(139, 105, 20, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.category-icon svg {
  width: 26px;
  height: 26px;
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.category-info {
  flex: 1;
  min-width: 0;
}

.category-info h2 {
  font-size: 17px;
  margin-bottom: 6px;
  color: var(--text-bright);
  font-weight: 600;
}

.category-info > p {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 0;
  line-height: 1.5;
}

.category-last-post {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.category-last-post .last-topic {
  color: var(--accent);
  font-weight: 500;
}

.category-last-post .last-user {
  color: var(--text-dim);
}

.category-last-post .last-time {
  color: var(--text-dim);
  font-style: italic;
}

.category-stats {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.category-stats .stat {
  text-align: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: var(--radius);
  min-width: 70px;
}

.category-stats .stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.category-stats .stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ==========================================================================
   Forum Stats Bar
   ========================================================================== */

.forum-stats {
  margin-top: 24px;
}

.stats-card {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 20px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(250, 246, 237, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

.stats-card::before,
.stats-card::after {
  content: '\2726';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-glow);
  font-size: 12px;
  opacity: 0.5;
}

.stats-card::before {
  left: 20px;
}

.stats-card::after {
  right: 20px;
}

.stat-item {
  text-align: center;
}

.stat-item .stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-item .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Category Header (Category View)
   ========================================================================== */

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: linear-gradient(180deg, #faf6ed 0%, #f5e6c8 100%);
  border: 1px solid #c9a227;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.1);
}

.category-header-info h1 {
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--accent);
}

.category-header-info p {
  color: var(--text);
  font-size: 14px;
  margin: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn svg {
  margin-right: 6px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 28px;
}

.btn-danger {
  background: linear-gradient(180deg, rgba(192, 57, 43, 0.1) 0%, rgba(192, 57, 43, 0.05) 100%);
  border-color: rgba(192, 57, 43, 0.4);
  color: var(--error);
}

.btn-danger:hover {
  background: linear-gradient(180deg, rgba(192, 57, 43, 0.2) 0%, rgba(192, 57, 43, 0.1) 100%);
  border-color: var(--error);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(180deg, #faf6ed 0%, #f5e6c8 100%);
  border: 1px solid #c9a227;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.1);
}

.empty-state::before {
  content: '\2726';
  display: block;
  color: var(--accent-glow);
  font-size: 24px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state svg {
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-bright);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-style: italic;
}

/* ==========================================================================
   Topics List
   ========================================================================== */

.topics-list {
  background: linear-gradient(180deg, #faf6ed 0%, #f5e6c8 100%);
  border: 1px solid #c9a227;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.1);
}

.topics-header {
  display: grid;
  grid-template-columns: 1fr 80px 80px 150px;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(180deg, #c9a227 0%, #a68b1a 100%);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.topic-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px 150px;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  background: rgba(255, 255, 255, 0.3);
}

.topic-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.1);
}

.topic-row:last-child {
  border-bottom: none;
}

.topic-row:hover {
  background: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.topic-row.pinned {
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.15) 0%, rgba(201, 162, 39, 0.05) 100%);
  border-left: 3px solid var(--accent-glow);
  padding-left: 17px;
}

.topic-row.pinned:hover {
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.25) 0%, rgba(201, 162, 39, 0.1) 100%);
}

.topic-row.locked {
  opacity: 0.7;
}

.topic-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.topic-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  padding-top: 2px;
}

.badge-pinned,
.badge-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.2) 0%, rgba(201, 162, 39, 0.1) 100%);
  border: 1px solid rgba(201, 162, 39, 0.3);
  color: var(--accent);
}

.badge-locked {
  background: linear-gradient(180deg, rgba(192, 57, 43, 0.15) 0%, rgba(192, 57, 43, 0.05) 100%);
  border-color: rgba(192, 57, 43, 0.3);
  color: var(--error);
}

.topic-info {
  min-width: 0;
  flex: 1;
}

.topic-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.topic-row:hover .topic-title {
  color: var(--accent);
}

.topic-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.topic-meta .topic-author {
  color: var(--accent);
  font-weight: 500;
}

.topic-replies,
.topic-views {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-bright);
  text-align: center;
  align-self: center;
}

.topic-activity {
  font-size: 12px;
  color: var(--text-muted);
  align-self: center;
  text-align: right;
}

.topic-activity .activity-time {
  display: block;
  color: var(--text);
  font-weight: 500;
}

.topic-activity .activity-user {
  color: var(--text-dim);
  font-style: italic;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

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

.page-link {
  padding: 10px 18px;
  background: linear-gradient(180deg, #faf6ed 0%, #f5e6c8 100%);
  border: 1px solid #c9a227;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(201, 162, 39, 0.1);
}

.page-link:hover {
  background: linear-gradient(180deg, #c9a227 0%, #a68b1a 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(201, 162, 39, 0.2);
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   Topic Header (Topic View)
   ========================================================================== */

.topic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: linear-gradient(180deg, #faf6ed 0%, #f5e6c8 100%);
  border: 1px solid #c9a227;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.1);
}

.topic-header h1 {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-bright);
}

.topic-header h1 .badge {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topic-header h1 .badge-pinned {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.2) 0%, rgba(201, 162, 39, 0.1) 100%);
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: var(--accent);
  width: auto;
  height: auto;
}

.topic-header h1 .badge-locked {
  background: linear-gradient(180deg, rgba(192, 57, 43, 0.15) 0%, rgba(192, 57, 43, 0.05) 100%);
  border: 1px solid rgba(192, 57, 43, 0.3);
  color: var(--error);
  width: auto;
  height: auto;
}

.topic-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.inline-form {
  display: inline;
}

/* ==========================================================================
   Posts List - Enhanced FFXI-Inspired Design
   ========================================================================== */

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 30px;
}

.post {
  display: grid;
  grid-template-columns: 200px 1fr;
  background: linear-gradient(180deg, #fdfbf7 0%, #f8f0e0 100%);
  border: 2px solid #c9a227;
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow:
    0 4px 12px rgba(201, 162, 39, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
}

/* Decorative corner frame */
.post-frame {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  pointer-events: none;
  z-index: 1;
}

.post-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-glow);
}

.post-corner-tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-radius: 4px 0 0 0;
}

.post-corner-tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-radius: 0 4px 0 0;
}

.post-corner-bl {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 4px;
}

.post-corner-br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-radius: 0 0 4px 0;
}

/* Original post special styling */
.post-original {
  border-color: #b8860b;
  box-shadow:
    0 6px 20px rgba(184, 134, 11, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.post-original::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    #d4af37 15%,
    #f4d03f 50%,
    #d4af37 85%,
    transparent 100%
  );
  z-index: 2;
}

.post-original .post-corner {
  border-color: #d4af37;
  border-width: 3px;
}

/* Author Sidebar */
.post-sidebar {
  padding: 24px 16px;
  background: linear-gradient(180deg,
    rgba(201, 162, 39, 0.12) 0%,
    rgba(201, 162, 39, 0.04) 50%,
    rgba(201, 162, 39, 0.08) 100%
  );
  border-right: 2px solid rgba(201, 162, 39, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.post-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at top, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.post-author {
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Avatar with decorative frame */
.author-avatar-frame {
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
}

.author-avatar-frame::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 2px solid var(--accent-glow);
  border-radius: 12px;
  background: linear-gradient(135deg,
    rgba(201, 162, 39, 0.2) 0%,
    rgba(201, 162, 39, 0.05) 100%
  );
}

.author-avatar-frame::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  position: relative;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.author-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: linear-gradient(135deg, #d4af37 0%, #aa8c2c 50%, #8b7355 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  position: relative;
  border: 2px solid #fff;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.author-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-bright);
  margin-bottom: 8px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

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

/* Author rank badge */
.author-rank {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(245, 230, 200, 0.8) 100%);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.author-rank svg {
  opacity: 0.7;
}

.author-rank-op {
  background: linear-gradient(180deg, #ffd700 0%, #daa520 100%);
  border-color: #b8860b;
  color: #5a4a1a;
  box-shadow:
    0 2px 4px rgba(218, 165, 32, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.author-rank-op svg {
  opacity: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* Author stats (for OP) */
.author-stats {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.author-stat {
  text-align: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: var(--radius);
  min-width: 50px;
}

.author-stat-value {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.author-stat-label {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Author meta info */
.author-meta {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(201, 162, 39, 0.15);
}

.author-joined {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-dim);
}

.author-joined svg {
  opacity: 0.6;
}

/* Post Content Area */
.post-content {
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fff 0%, #fdfbf7 100%);
}

/* Post Header */
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.08) 0%, rgba(201, 162, 39, 0.02) 100%);
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
  font-size: 12px;
  color: var(--text-muted);
}

.post-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 4px 8px;
  background: linear-gradient(180deg, var(--accent-glow) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  box-shadow:
    0 2px 4px rgba(139, 105, 20, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.post-date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.post-date svg {
  opacity: 0.6;
}

.post-edited {
  font-style: italic;
  color: var(--text-dim);
  font-size: 11px;
}

.post-permalink {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  color: var(--text-dim);
  transition: all 0.15s ease;
}

.post-permalink:hover {
  background: rgba(201, 162, 39, 0.15);
  color: var(--accent);
}

.btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.15s ease;
  border-radius: var(--radius);
}

.btn-link:hover {
  color: var(--error);
  background: rgba(192, 57, 43, 0.1);
}

/* Post Body */
.post-body {
  flex: 1;
  padding: 24px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
}

.post-body p {
  margin-bottom: 16px;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body strong {
  color: var(--text-bright);
  font-weight: 600;
}

.post-body a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 39, 0.3);
  text-underline-offset: 2px;
}

.post-body a:hover {
  color: var(--accent-bright);
  text-decoration-color: var(--accent);
}

.post-body ul,
.post-body ol {
  margin: 16px 0;
  padding-left: 28px;
}

.post-body li {
  margin-bottom: 8px;
  position: relative;
}

.post-body ul li::marker {
  color: var(--accent);
}

.post-body blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.08) 0%, rgba(201, 162, 39, 0.03) 100%);
  border-left: 4px solid var(--accent-glow);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  color: var(--text-muted);
  position: relative;
}

.post-body blockquote::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 32px;
  color: var(--accent-glow);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

.post-body code {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.12) 0%, rgba(201, 162, 39, 0.06) 100%);
  padding: 3px 8px;
  border-radius: var(--radius);
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  color: var(--accent);
  border: 1px solid rgba(201, 162, 39, 0.2);
}

.post-body pre {
  background: linear-gradient(180deg, #f8f4eb 0%, #f3ead8 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  overflow-x: auto;
  margin: 20px 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.post-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
  border: none;
  font-size: 13px;
  line-height: 1.6;
}

/* Post Footer */
.post-footer {
  padding: 12px 24px;
  border-top: 1px solid rgba(201, 162, 39, 0.1);
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.02) 0%, rgba(201, 162, 39, 0.06) 100%);
}

.post-signature {
  text-align: center;
}

.signature-icon {
  color: var(--accent-glow);
  font-size: 12px;
  opacity: 0.5;
}

/* Hover effect for entire post */
.post:hover {
  box-shadow:
    0 8px 24px rgba(201, 162, 39, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.post:hover .post-corner {
  border-color: #d4af37;
}

/* ==========================================================================
   Reply Form
   ========================================================================== */

.reply-form {
  background: linear-gradient(180deg, #faf6ed 0%, #f5e6c8 100%);
  border: 1px solid #c9a227;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.1);
}

.reply-form h2 {
  font-size: 17px;
  margin-bottom: 20px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.reply-form h2::before {
  content: '\270E';
  font-size: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-bright);
  font-size: 13px;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-glow);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.7;
}

.form-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
  font-style: italic;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(201, 162, 39, 0.15);
}

/* ==========================================================================
   Reply Locked / Login Prompts
   ========================================================================== */

.reply-locked,
.reply-login {
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(180deg, #faf6ed 0%, #f5e6c8 100%);
  border: 1px solid #c9a227;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.1);
}

.reply-locked::before,
.reply-login::before {
  content: '\2726';
  display: block;
  color: var(--accent-glow);
  font-size: 20px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.reply-locked svg {
  color: var(--text-dim);
  margin-bottom: 12px;
}

.reply-locked p,
.reply-login p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-style: italic;
}

.reply-login .btn {
  margin: 0 8px;
}

/* ==========================================================================
   Create Topic Form
   ========================================================================== */

.create-topic-form {
  background: linear-gradient(180deg, #faf6ed 0%, #f5e6c8 100%);
  border: 1px solid #c9a227;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.1);
}

.create-topic-form h1 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--accent);
}

.form-subtitle {
  color: var(--text);
  margin-bottom: 28px;
  font-size: 14px;
  font-style: italic;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 900px) {
  .category-card {
    flex-wrap: wrap;
  }

  .category-stats {
    width: 100%;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid rgba(201, 162, 39, 0.2);
    margin-top: 4px;
  }
}

@media (max-width: 768px) {
  .forum-page {
    padding: 20px 0 30px;
  }

  .forum-header {
    padding: 0 16px;
  }

  .category-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .category-icon {
    width: 48px;
    height: 48px;
  }

  .category-icon svg {
    width: 22px;
    height: 22px;
  }

  .category-stats {
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
  }

  .category-stats .stat {
    flex: 1;
    min-width: 0;
  }

  .topics-header {
    display: none;
  }

  .topic-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .topic-row.pinned {
    padding-left: 13px;
  }

  .topic-replies,
  .topic-views {
    display: none;
  }

  .topic-activity {
    text-align: left;
    font-size: 11px;
    padding-top: 8px;
    border-top: 1px solid rgba(201, 162, 39, 0.1);
  }

  .post {
    grid-template-columns: 1fr;
  }

  .post-frame {
    display: none;
  }

  .post-sidebar {
    border-right: none;
    border-bottom: 2px solid rgba(201, 162, 39, 0.2);
    padding: 16px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
  }

  .post-author {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    flex-wrap: wrap;
  }

  .author-avatar-frame {
    margin-bottom: 0;
  }

  .author-avatar-frame::before,
  .author-avatar-frame::after {
    display: none;
  }

  .author-avatar,
  .author-avatar-placeholder {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .author-name {
    margin-bottom: 4px;
  }

  .author-rank {
    margin-bottom: 0;
  }

  .author-stats {
    margin-top: 0;
    margin-left: auto;
  }

  .author-meta {
    display: none;
  }

  .post-header {
    padding: 12px 16px;
  }

  .post-body {
    padding: 16px;
  }

  .post-footer {
    padding: 10px 16px;
  }

  .category-header,
  .topic-header {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .topic-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .topic-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .stats-card {
    flex-wrap: wrap;
    gap: 24px;
    padding: 16px;
  }

  .stats-card::before,
  .stats-card::after {
    display: none;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .reply-form,
  .create-topic-form {
    padding: 20px;
  }

  .breadcrumb {
    padding: 10px 14px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .category-stats {
    gap: 10px;
  }

  .category-stats .stat {
    padding: 6px 10px;
  }

  .category-stats .stat-value {
    font-size: 16px;
  }

  .pagination {
    flex-direction: column;
    gap: 12px;
  }

  .page-link {
    width: 100%;
    text-align: center;
  }
}
