/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Professional Color Palette */
  --primary-color: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --secondary-color: #059669;
  --accent-color: #dc2626;
  --warning-color: #d97706;
  --info-color: #0891b2;

  /* Neutral Colors */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-white: #ffffff;

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;

  /* Border Colors */
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;

  /* Shadow Colors */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: var(--text-white);
  padding: 1rem 0;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  font-size: 2rem;
  color: #fbbf24;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  font-weight: 500;
  opacity: 0.9;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  opacity: 1;
  transform: translateY(-1px);
}

.user-actions {
  display: flex;
  gap: 1rem;
}

/* Button Styles */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: var(--text-white);
  border: 1px solid var(--primary-color);
}

.btn-primary:hover {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary-color) 100%
  );
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--text-white);
  border: 1px solid var(--text-white);
}

.btn-outline:hover {
  background: var(--text-white);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn.active {
  background: var(--primary-color);
  color: var(--text-white);
}

.btn-outline.active {
  background: var(--primary-color);
  color: var(--text-white);
  border-color: var(--primary-color);
}

.btn-primary.active {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero-content h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Section Styles */
.topics-section,
.qa-section,
.posts-section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #2d3748;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

/* Topics Grid */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.topic-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-align: center;
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.topic-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2rem;
}

.topic-card h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2d3748;
}

.topic-card p {
  color: #718096;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.topic-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #718096;
}

.topic-stats span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Q&A Section */
.qa-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.qa-item {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.qa-item:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.qa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.qa-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.user-avatar.admin {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.user-info h5 {
  font-weight: 600;
  color: #2d3748;
}

.user-role {
  font-size: 0.9rem;
  color: #718096;
}

.qa-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.qa-date {
  font-size: 0.9rem;
  color: #718096;
}

.qa-category {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.qa-content h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2d3748;
}

.qa-content p {
  color: #4a5568;
  line-height: 1.6;
}

.qa-answer {
  background: #f7fafc;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--primary-color);
}

.answer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.answer-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.answer-content p {
  color: #4a5568;
  line-height: 1.6;
}

.qa-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.action-btn {
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn:hover {
  background: #f7fafc;
  color: var(--primary-color);
}

/* Posts Section */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.post-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.post-image {
  height: 200px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.post-content {
  padding: 1.5rem;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.post-category {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.post-date {
  font-size: 0.9rem;
  color: #718096;
}

.post-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2d3748;
}

.post-content p {
  color: #718096;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.post-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: #718096;
}

.post-stats span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer */
.footer {
  background: #2d3748;
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ffd700;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #a0aec0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #4a5568;
  color: #a0aec0;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #718096;
}

.modal-body {
  padding: 1.5rem;
}

/* Form Styles */
.auth-form,
.question-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Discussion Page Styles */
.discussion-hero {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.discussion-hero .hero-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.discussion-hero .hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.discussion-filters {
  background: #f8f9fa;
  padding: 2rem 0;
  border-bottom: 1px solid #e9ecef;
}

.filters-content {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.filter-group select {
  padding: 0.5rem 1rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background: white;
  font-size: 0.9rem;
  min-width: 150px;
}

.search-box {
  display: none; /* Hide search box */
}

.search-box input {
  padding: 0.5rem 1rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  width: 300px;
  font-size: 0.9rem;
}

.search-box button {
  padding: 0.5rem 1rem;
}

.discussion-topics {
  padding: 3rem 0;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.discussion-topic {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.discussion-topic:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.topic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.topic-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.topic-category {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.topic-date {
  color: #6c757d;
  font-size: 0.9rem;
}

.topic-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #6c757d;
  font-size: 0.9rem;
}

.stat i {
  font-size: 0.8rem;
}

.topic-title {
  margin-bottom: 1rem;
}

.topic-title a {
  color: #212529;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
}

.topic-title a:hover {
  color: var(--primary-color);
}

.topic-excerpt {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topic-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
}

.author-role {
  color: #6c757d;
  font-size: 0.8rem;
}

.load-more {
  text-align: center;
}

/* Discussion Form Styles */
.discussion-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-help {
  color: #6c757d;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Discussion Detail Modal */
.modal-content.large {
  max-width: 800px;
  width: 90%;
}

.discussion-detail {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.discussion-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 0.375rem;
  flex-wrap: wrap;
}

.discussion-category {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.discussion-date,
.discussion-author {
  color: #6c757d;
  font-size: 0.9rem;
}

.discussion-content {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 0.375rem;
  line-height: 1.6;
  color: #495057;
}

/* Comments Section */
.comments-section {
  border-top: 1px solid #e9ecef;
  padding-top: 2rem;
}

.comments-section h4 {
  margin-bottom: 1.5rem;
  color: #495057;
}

.add-comment {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 0.375rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-form .form-group {
  margin-bottom: 0;
}

.comment-form textarea {
  min-height: 80px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 0.375rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 600;
  color: #212529;
}

.comment-date {
  color: #6c757d;
  font-size: 0.8rem;
}

.comment-text {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.comment-actions {
  display: flex;
  gap: 1rem;
}

.comment-action {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.comment-action:hover {
  background: #f8f9fa;
  color: #495057;
}

/* Discussion Detail Page Styles */
.breadcrumb {
  background: #f8f9fa;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb-nav a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-nav a:hover {
  text-decoration: underline;
}

.breadcrumb-nav .separator {
  color: #6c757d;
}

.breadcrumb-nav .current {
  color: #495057;
  font-weight: 500;
}

.discussion-detail-page {
  padding: 2rem 0;
}

.discussion-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-bottom: 3rem;
}

.discussion-main {
  background: white;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.discussion-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.discussion-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.discussion-category {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.discussion-date,
.discussion-views {
  color: #6c757d;
  font-size: 0.9rem;
}

.discussion-views {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.discussion-title {
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.discussion-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.author-name {
  font-weight: 600;
  color: #212529;
}

.author-role {
  color: #6c757d;
  font-size: 0.9rem;
}

.discussion-actions {
  display: flex;
  gap: 0.5rem;
}

.discussion-content {
  margin-bottom: 2rem;
}

.content-body {
  line-height: 1.7;
  color: #495057;
}

.content-body h3 {
  color: #212529;
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem 0;
}

.content-body ul,
.content-body ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.content-body li {
  margin: 0.5rem 0;
}

.discussion-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tag {
  background: #f8f9fa;
  color: #495057;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  border: 1px solid #e9ecef;
}

.discussion-stats {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6c757d;
  font-size: 0.9rem;
}

.discussion-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-card h3 {
  margin-bottom: 1rem;
  color: #212529;
  font-size: 1.1rem;
}

.related-discussions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-item {
  padding-bottom: 1rem;
  border-bottom: 1px solid #f8f9fa;
}

.related-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-item h4 {
  margin-bottom: 0.5rem;
}

.related-item h4 a {
  color: #212529;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.related-item h4 a:hover {
  color: var(--primary-color);
}

.related-meta {
  color: #6c757d;
  font-size: 0.8rem;
}

.author-card {
  text-align: center;
}

.author-avatar-large {
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem auto;
}

.author-card h4 {
  margin-bottom: 0.5rem;
  color: #212529;
}

.author-bio {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.author-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.author-stats .stat {
  text-align: center;
}

.author-stats .number {
  display: block;
  font-weight: 600;
  color: #212529;
}

.author-stats .label {
  font-size: 0.8rem;
  color: #6c757d;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.comments-section {
  background: white;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.comments-header h3 {
  color: #212529;
  margin: 0;
}

.comments-filter select {
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background: white;
}

.add-comment {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
}

.comment-form-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.comment-form-header .user-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.comment-form-header span {
  font-weight: 500;
  color: #495057;
}

.comment-form .form-group {
  margin-bottom: 1rem;
}

.comment-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  font-size: 1rem;
  resize: vertical;
  min-height: 100px;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #495057;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #f8f9fa;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 600;
  color: #212529;
}

.comment-date {
  color: #6c757d;
  font-size: 0.9rem;
}

.comment-actions {
  display: flex;
  gap: 1rem;
}

.comment-action {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.comment-action:hover {
  background: #f8f9fa;
  color: #495057;
}

.comment-text {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.comment-replies {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 2px solid #e9ecef;
}

.reply-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.reply-avatar {
  width: 32px;
  height: 32px;
  background: #6c757d;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.reply-content {
  flex: 1;
}

.reply-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

.reply-author {
  font-weight: 500;
  color: #212529;
  font-size: 0.9rem;
}

.reply-date {
  color: #6c757d;
  font-size: 0.8rem;
}

.reply-text {
  color: #495057;
  line-height: 1.5;
  font-size: 0.9rem;
}

.load-more-comments {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .discussion-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .discussion-sidebar {
    order: -1;
  }
}

@media (max-width: 768px) {
  .discussion-main {
    padding: 1.5rem;
  }

  .discussion-title {
    font-size: 1.5rem;
  }

  .discussion-author {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .discussion-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .discussion-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .comments-section {
    padding: 1.5rem;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .comment-actions {
    flex-wrap: wrap;
  }

  .form-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .discussion-main {
    padding: 1rem;
  }

  .discussion-title {
    font-size: 1.3rem;
  }

  .discussion-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .sidebar-card {
    padding: 1rem;
  }

  .comments-section {
    padding: 1rem;
  }

  .comment-item {
    flex-direction: column;
    gap: 1rem;
  }

  .comment-actions {
    justify-content: flex-start;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .discussion-hero .hero-content h2 {
    font-size: 2rem;
  }

  .discussion-hero .hero-content p {
    font-size: 1rem;
  }

  .filters-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    margin-left: 0;
  }

  .search-box input {
    width: 100%;
  }

  .topics-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .discussion-topic {
    padding: 1rem;
  }

  .topic-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .topic-stats {
    justify-content: space-between;
  }

  .topic-author {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .author-info {
    justify-content: center;
  }

  .modal-content.large {
    width: 95%;
    margin: 1rem;
  }

  .discussion-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-item {
    flex-direction: column;
    gap: 1rem;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .section-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .qa-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .qa-meta {
    align-items: flex-start;
  }

  .qa-actions {
    flex-wrap: wrap;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 2rem 0;
  }

  .topics-section,
  .qa-section,
  .posts-section {
    padding: 2rem 0;
  }

  .topic-card,
  .qa-item {
    padding: 1.5rem;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .discussion-hero {
    padding: 2rem 0;
  }

  .discussion-filters {
    padding: 1rem 0;
  }

  .discussion-topics {
    padding: 2rem 0;
  }

  .form-actions {
    flex-direction: column;
  }

  .comment-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
}
