/* ===== NEW FORUMS PAGE STYLES ===== */

/* Main Container */
.forum-main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
  min-height: 100vh;
}

/* Hero Section */
.forum-hero-section {
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem);
  margin-bottom: 3rem;
}

.forum-hero-section h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(2rem, 5vw, 3rem);
  border-radius: 30px;
  display: inline-block;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 3px solid var(--emerald);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  color: var(--emerald);
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.forum-hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--emerald);
  font-weight: 600;
  background: var(--card-bg);
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(2rem, 4vw, 3rem);
  border-radius: 25px;
  display: inline-block;
  border: 2px solid var(--emerald);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

/* Forum Controls */
.forum-controls-section {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.forum-create-thread-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: var(--emerald);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 139, 87, 0.3);
}

.forum-create-thread-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 139, 87, 0.4);
  background: var(--sea-green);
}

/* Threads Container */
.forum-threads-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.forum-loading {
  text-align: center;
  padding: 3rem;
  color: var(--emerald);
  font-size: 1.2rem;
  font-weight: 600;
}

/* Thread Card */
.forum-thread-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 2px solid var(--emerald);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.forum-thread-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(46, 139, 87, 0.3);
}

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

.forum-thread-title {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  color: var(--emerald);
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.forum-thread-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.forum-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.forum-thread-excerpt {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.forum-thread-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(46, 139, 87, 0.2);
}

.forum-thread-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.forum-thread-actions {
  display: flex;
  gap: 0.5rem;
}

.forum-action-btn {
  padding: 0.5rem 1rem;
  background: var(--light-bg);
  border: 1px solid var(--emerald);
  border-radius: 8px;
  color: var(--emerald);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.forum-action-btn:hover {
  background: var(--emerald);
  color: white;
}

.forum-delete-btn {
  background: rgba(255, 107, 107, 0.1);
  border-color: var(--crimson);
  color: var(--crimson);
}

.forum-delete-btn:hover {
  background: var(--crimson);
  color: white;
}

/* Attachment Badge */
.forum-attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  background: rgba(46, 139, 87, 0.1);
  border: 1px solid var(--emerald);
  border-radius: 12px;
  font-size: 0.8rem;
  color: var(--emerald);
  font-weight: 600;
}

/* Modal Styles */
.forum-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 20, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  overflow-y: auto;
}

.forum-modal-container {
  background: var(--card-bg);
  border-radius: 20px;
  border: 2px solid var(--emerald);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.forum-modal-large {
  max-width: 900px;
}

.forum-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 2px solid rgba(46, 139, 87, 0.3);
}

.forum-modal-header h2 {
  color: var(--emerald);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.forum-modal-close {
  background: none;
  border: none;
  color: var(--crimson);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.forum-modal-close:hover {
  transform: scale(1.2);
}

.forum-modal-body {
  padding: 2rem;
}

/* Form Styles */
.forum-form-group {
  margin-bottom: 1.5rem;
}

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

.forum-input,
.forum-textarea {
  width: 100%;
  padding: 1rem;
  background: var(--light-bg);
  border: 2px solid rgba(46, 139, 87, 0.3);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.forum-input:focus,
.forum-textarea:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

.forum-textarea {
  resize: vertical;
  min-height: 120px;
}

.forum-file-input {
  width: 100%;
  padding: 0.8rem;
  background: var(--light-bg);
  border: 2px dashed rgba(46, 139, 87, 0.3);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
}

.forum-file-info {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.forum-error {
  color: var(--crimson);
  font-weight: 600;
  margin: 1rem 0;
  padding: 0.8rem;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 8px;
  display: none;
}

.forum-error:not(:empty) {
  display: block;
}

.forum-form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.forum-btn-primary,
.forum-btn-secondary {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  flex: 1;
}

.forum-btn-primary {
  background: var(--emerald);
  color: white;
  box-shadow: 0 4px 15px rgba(46, 139, 87, 0.3);
}

.forum-btn-primary:hover {
  background: var(--sea-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 139, 87, 0.4);
}

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

.forum-btn-secondary:hover {
  background: rgba(46, 139, 87, 0.1);
}

.forum-auth-toggle {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(46, 139, 87, 0.2);
  color: var(--text);
}

.forum-auth-toggle a {
  color: var(--emerald);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.5rem;
}

.forum-auth-toggle a:hover {
  text-decoration: underline;
}

/* Thread Details */
.forum-thread-details {
  margin-bottom: 2rem;
}

.forum-thread-content {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(46, 139, 87, 0.3);
  margin-bottom: 2rem;
}

.forum-thread-content p {
  color: var(--text);
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
}

.forum-attachment-display {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--emerald);
}

.forum-attachment-display img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 0.5rem;
}

.forum-attachment-link {
  color: var(--emerald);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.forum-attachment-link:hover {
  text-decoration: underline;
}

/* Reply Section */
.forum-reply-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--light-bg);
  border-radius: 15px;
  border: 2px solid var(--emerald);
}

.forum-reply-section h3 {
  color: var(--emerald);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Replies Container */
.forum-replies-container {
  margin-top: 2rem;
}

.forum-reply-card {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid rgba(46, 139, 87, 0.3);
  margin-bottom: 1rem;
}

.forum-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(46, 139, 87, 0.2);
}

.forum-reply-author {
  font-weight: 600;
  color: var(--emerald);
}

.forum-reply-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.forum-reply-content {
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
  .forum-hero-section h1 {
    font-size: 2rem;
    padding: 1.5rem 2rem;
  }
  
  .forum-hero-subtitle {
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
  }
  
  .forum-controls-section {
    justify-content: center;
  }
  
  .forum-create-thread-btn {
    width: 100%;
    justify-content: center;
  }
  
  .forum-thread-header {
    flex-direction: column;
  }
  
  .forum-thread-meta {
    flex-wrap: wrap;
  }
  
  .forum-thread-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .forum-form-actions {
    flex-direction: column;
  }
  
  .forum-modal-container {
    max-width: 95%;
  }
  
  .forum-modal-body {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .forum-hero-section h1 {
    font-size: 1.8rem;
    padding: 1.2rem 1.5rem;
  }
  
  .forum-hero-subtitle {
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
  }
  
  .forum-thread-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .forum-action-btn {
    width: 100%;
  }
}