* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-teal: #006b7d;
  --secondary-emerald: #00a693;
  --electric-blue: #00d9ff;
  --accent-coral: #ff6b6b;
  --accent-amber: #ffb627;
  --deep-navy: #0f1419;
  --pearl-white: #fdfefe;
  --sage-green: #95b8a3;
  --aurora-gradient: linear-gradient(
    135deg,
    #006b7d 0%,
    #00a693 25%,
    #00d9ff 50%,
    #ff6b6b 75%,
    #ffb627 100%
  );
  --midnight-gradient: linear-gradient(135deg, #0f1419 0%, #006b7d 100%);
  --success-green: #28a745;
  --warning-orange: #ffc107;
  --danger-red: #dc3545;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--deep-navy);
  color: var(--pearl-white);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 169, 147, 0.2);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: breathe 4s ease-in-out infinite;
  text-decoration: none;
  cursor: pointer;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  color: var(--sage-green);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--electric-blue);
  background: rgba(0, 217, 255, 0.1);
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--aurora-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid rgba(0, 217, 255, 0.3);
}

/* Main Content */
.main-content {
  margin-top: 80px;
  min-height: 100vh;
  padding: 2rem 0;
}

.community-section {
  padding: 2rem 0;
  display: none;
}

.community-section.active {
  display: block;
  animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Community Header */
.community-header {
  text-align: center;
  margin-bottom: 3rem;
  background: var(--midnight-gradient);
  padding: 3rem 2rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.community-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(0, 217, 255, 0.1),
    transparent
  );
  animation: rotate 15s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.community-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
}

.community-subtitle {
  font-size: 1.2rem;
  color: var(--sage-green);
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

/* Community Stats */
.community-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: rgba(0, 107, 125, 0.1);
  border: 1px solid rgba(0, 107, 125, 0.2);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--electric-blue);
  box-shadow: 0 15px 35px rgba(0, 217, 255, 0.2);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 217, 255, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.stat-card:hover::before {
  left: 100%;
}

.stat-icon {
  font-size: 2.5rem;
  color: var(--electric-blue);
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--pearl-white);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--sage-green);
  font-size: 0.9rem;
}

/* Category Navigation */
.category-nav {
  background: rgba(0, 107, 125, 0.1);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 3rem;
  backdrop-filter: blur(10px);
}

.category-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.category-tab {
  background: rgba(0, 169, 147, 0.2);
  color: var(--sage-green);
  padding: 0.8rem 1.5rem;
  border: 1px solid rgba(0, 169, 147, 0.3);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.category-tab.active {
  background: var(--aurora-gradient);
  color: var(--deep-navy);
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(0, 217, 255, 0.3);
}

.category-tab:hover {
  transform: translateY(-2px);
  border-color: var(--electric-blue);
}

/* Search and Filters */
.search-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-input {
  width: 100%;
  background: rgba(0, 107, 125, 0.2);
  border: 1px solid rgba(0, 169, 147, 0.3);
  color: var(--pearl-white);
  padding: 1rem 1rem 1rem 3rem;
  border-radius: 25px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sage-green);
  font-size: 1.2rem;
}

.filter-dropdown {
  background: rgba(0, 107, 125, 0.2);
  border: 1px solid rgba(0, 169, 147, 0.3);
  color: var(--pearl-white);
  padding: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-dropdown:hover {
  border-color: var(--electric-blue);
}

/* Community Grid */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.community-card {
  background: rgba(0, 107, 125, 0.1);
  border: 1px solid rgba(0, 107, 125, 0.2);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  cursor: pointer;
}

.community-card:hover {
  transform: translateY(-8px);
  border-color: var(--electric-blue);
  box-shadow: 0 20px 40px rgba(0, 217, 255, 0.2);
}

.community-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 217, 255, 0.05),
    transparent
  );
  transition: left 0.5s;
}

.community-card:hover::before {
  left: 100%;
}

.card-header {
  padding: 2rem;
  background: linear-gradient(
    135deg,
    rgba(0, 107, 125, 0.2),
    rgba(0, 169, 147, 0.1)
  );
  position: relative;
}

.card-flag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--pearl-white);
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--sage-green);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: rgba(0, 169, 147, 0.2);
  color: var(--secondary-emerald);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.7rem;
  border: 1px solid rgba(0, 169, 147, 0.3);
}

.card-body {
  padding: 2rem;
}

.community-stats-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mini-stat {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 169, 147, 0.1);
  border-radius: 10px;
}

.mini-stat-number {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--electric-blue);
  margin-bottom: 0.3rem;
}

.mini-stat-label {
  font-size: 0.7rem;
  color: var(--sage-green);
}

.recent-activity {
  margin-bottom: 1.5rem;
}

.activity-title {
  color: var(--electric-blue);
  font-weight: 600;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  padding: 0.8rem;
  background: rgba(0, 107, 125, 0.1);
  border-radius: 8px;
}

.activity-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--aurora-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.activity-text {
  flex: 1;
  font-size: 0.8rem;
  color: var(--sage-green);
}

.activity-time {
  font-size: 0.7rem;
  color: var(--sage-green);
  opacity: 0.7;
}

.join-button {
  width: 100%;
  background: var(--aurora-gradient);
  color: var(--deep-navy);
  padding: 1rem;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.join-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 217, 255, 0.4);
}

/* Forum Thread Styles */
.forum-container {
  background: rgba(0, 107, 125, 0.1);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 169, 147, 0.2);
}

.forum-title {
  font-size: 1.8rem;
  color: var(--electric-blue);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-btn {
  background: rgba(0, 169, 147, 0.2);
  color: var(--electric-blue);
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--electric-blue);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.back-btn:hover {
  background: var(--electric-blue);
  color: var(--deep-navy);
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.thread-item {
  background: rgba(0, 107, 125, 0.2);
  border: 1px solid rgba(0, 107, 125, 0.3);
  border-radius: 15px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.thread-item:hover {
  border-color: var(--electric-blue);
  transform: translateX(5px);
}

.thread-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.thread-title-text {
  color: var(--pearl-white);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.thread-author {
  color: var(--sage-green);
  font-size: 0.9rem;
}

.thread-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--sage-green);
}

.thread-excerpt {
  color: var(--sage-green);
  margin: 1rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.thread-stats {
  display: flex;
  gap: 2rem;
  font-size: 0.8rem;
  color: var(--sage-green);
}

.thread-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Create Post Button */
.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--aurora-gradient);
  color: var(--deep-navy);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1500;
  box-shadow: 0 8px 25px rgba(0, 217, 255, 0.4);
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(0, 217, 255, 0.6);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 20, 25, 0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  padding: 2rem;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--deep-navy);
  border: 1px solid rgba(0, 169, 147, 0.3);
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(0, 169, 147, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(
    135deg,
    rgba(0, 107, 125, 0.2),
    rgba(0, 169, 147, 0.1)
  );
}

.modal-title {
  font-size: 1.8rem;
  color: var(--electric-blue);
}

.close-modal {
  background: none;
  border: none;
  color: var(--sage-green);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: var(--accent-coral);
  background: rgba(255, 107, 107, 0.1);
}

.modal-body {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  color: var(--electric-blue);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: rgba(0, 107, 125, 0.2);
  border: 1px solid rgba(0, 169, 147, 0.3);
  color: var(--pearl-white);
  padding: 1rem;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-primary {
  background: var(--aurora-gradient);
  color: var(--deep-navy);
  padding: 1rem 2rem;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 217, 255, 0.4);
}

/* Notification */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--secondary-emerald);
  color: var(--pearl-white);
  padding: 1rem 2rem;
  border-radius: 10px;
  z-index: 2001;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  border: 1px solid rgba(0, 217, 255, 0.3);
  max-width: 350px;
}

.notification.show {
  transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .community-title {
    font-size: 2rem;
  }

  .community-grid {
    grid-template-columns: 1fr;
  }

  .category-tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .search-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: auto;
  }

  .nav-links {
    display: none;
  }

  .community-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .community-stats-mini {
    grid-template-columns: 1fr;
  }

  .fab {
    bottom: 20px;
    right: 20px;
  }
}

/* Loading Animation */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--sage-green);
}

.loading i {
  font-size: 3rem;
  animation: spin 2s linear infinite;
  color: var(--electric-blue);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
