:root {
  --primary-blue: #2a6ef0;
  --secondary-blue: #4d8aff;
  --accent-blue: #6aa4ff;
  --dark-blue: #1a3d7a;
  --light-blue: #e6f0ff;
  --white: #ffffff;
  --gray: #f5f7fa;
  --text-dark: #333333;
  --success: #4caf50;
  --error: #f44336;
  --warning: #ff9800;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--gray);
  color: var(--text-dark);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

h1,
h2,
h3 {
  color: var(--dark-blue);
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 15px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-blue);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark-blue);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-blue);
}

.auth-buttons {
  display: flex;
  gap: 15px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-blue);
  color: white;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
}

.btn:hover {
  background-color: var(--dark-blue);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline:hover {
  background-color: var(--primary-blue);
  color: white;
}

.forum-container {
  display: flex;
  gap: 30px;
  margin-top: 80px;
}

.forum-sidebar {
  flex: 0 0 300px;
  background-color: var(--white);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 25px;
  height: fit-content;
}

.forum-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.forum-card {
  background-color: var(--white);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 25px;
}

.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.forum-stats {
  display: flex;
  gap: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.stat-label {
  font-size: 0.8rem;
  color: #777;
}

.category-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 8px 15px;
  background-color: var(--light-blue);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.category-btn.active {
  background-color: var(--primary-blue);
  color: white;
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.topic-item {
  display: flex;
  padding: 20px;
  border-radius: 10px;
  background-color: var(--light-blue);
  transition: all 0.3s;
  cursor: pointer;
}

.topic-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.topic-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 20px;
  min-width: 60px;
}

.vote-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-blue);
}

.vote-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #777;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.vote-btn:hover {
  color: var(--primary-blue);
}

.vote-btn.upvoted {
  color: var(--success);
}

.vote-btn.downvoted {
  color: var(--error);
}

.topic-content {
  flex: 1;
}

.topic-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark-blue);
}

.topic-excerpt {
  color: #666;
  margin-bottom: 10px;
  line-height: 1.5;
}

.topic-meta {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: #777;
}

.topic-author {
  display: flex;
  align-items: center;
  gap: 5px;
}

.author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

.topic-tags {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  padding: 3px 8px;
  background-color: var(--secondary-blue);
  color: white;
  border-radius: 12px;
  font-size: 0.7rem;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: 15px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  background-color: var(--primary-blue);
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 30px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-blue);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border 0.3s;
}

.form-control:focus {
  border-color: var(--primary-blue);
  outline: none;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.topic-detail {
  background-color: var(--white);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 25px;
  margin-bottom: 30px;
}

.topic-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.topic-title-large {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.topic-body {
  line-height: 1.6;
  margin-bottom: 20px;
}

.topic-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.comments-section {
  background-color: var(--white);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 25px;
}

.comment-form {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment-item {
  display: flex;
  padding: 20px;
  border-radius: 10px;
  background-color: var(--light-blue);
}

.comment-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 20px;
  min-width: 50px;
}

.comment-content {
  flex: 1;
}

.comment-meta {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 10px;
}

.comment-body {
  line-height: 1.5;
}

.user-profile-small {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.sidebar-section {
  margin-bottom: 30px;
}

.sidebar-section h3 {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.leaderboard-list,
.recent-topics-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.leaderboard-item,
.recent-topic-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.leaderboard-item:hover,
.recent-topic-item:hover {
  background-color: var(--light-blue);
}

.leaderboard-rank {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.rank-1 {
  background-color: var(--gold);
}

.rank-2 {
  background-color: var(--silver);
}

.rank-3 {
  background-color: var(--bronze);
}

footer {
  background-color: var(--dark-blue);
  color: white;
  text-align: center;
  padding: 30px 0;
  margin-top: 50px;
}

@media (max-width: 768px) {
  .forum-container {
    flex-direction: column;
  }

  .forum-sidebar {
    flex: 1;
  }

  .topic-item {
    flex-direction: column;
  }

  .topic-votes {
    flex-direction: row;
    margin-right: 0;
    margin-bottom: 15px;
    justify-content: space-between;
    width: 100%;
  }

  .vote-buttons {
    flex-direction: row;
    gap: 15px;
  }
}

.user-menu {
  position: relative;
  cursor: pointer;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 20px;
  background-color: var(--light-blue);
  transition: background-color 0.3s;
}

.user-profile:hover {
  background-color: var(--secondary-blue);
  color: white;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  min-width: 180px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 8px 0;
  z-index: 1001;
  margin-top: 5px;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: var(--text-dark);
  transition: background-color 0.3s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
}

.dropdown-item:hover {
  background-color: var(--light-blue);
}

/* Reduce navbar height */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 10px 0; /* Reduced from 15px */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-blue);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 20px; /* Added gap instead of margin-left */
}

.nav-links li {
  margin: 0; /* Remove margin-left since we're using gap */
}

.nav-links a {
  text-decoration: none;
  color: var(--dark-blue);
  font-weight: 500;
  transition: color 0.3s;
  padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-blue);
}

.auth-buttons {
  display: flex;
  gap: 10px;
}
