/* RedPillHill Main CSS File */

:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #457b9d;
  --dark: #1d3557;
  --light: #f1faee;
  --gray: #a8dadc;
  --text: #333;
  --bg: #f8f9fa;
  --card-bg: #fff;
  --border: #dee2e6;
  --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --primary: #ff4d5e;
  --primary-dark: #e63946;
  --secondary: #64b5f6;
  --dark: #0d1b2a;
  --light: #e0e1dd;
  --gray: #415a77;
  --text: #e0e1dd;
  --bg: #1b263b;
  --card-bg: #252d3f;
  --border: #415a77;
  --shadow: rgba(0, 0, 0, 0.3);
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body {
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: all 0.3s ease;
}

a {
  text-decoration: none;
  color: var(--secondary);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary);
}

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

/* Header Styles */
header {
  background-color: var(--dark);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px var(--shadow);
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo h1 {
  color: var(--light);
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--light);
  font-size: 1.5rem;
  cursor: pointer;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  color: var(--light);
  font-weight: 500;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  background-color: var(--primary);
}

/* Right Navigation Area */
.right-nav {
  display: flex;
  align-items: center;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  color: var(--light);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* User Navigation Menu */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.user-menu .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.user-menu .dropdown-toggle {
  color: var(--light);
  display: flex;
  align-items: center;
  cursor: pointer;
}

.user-menu .dropdown-toggle i {
  margin-left: 0.5rem;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--card-bg);
  min-width: 200px;
  border-radius: 4px;
  box-shadow: 0 4px 10px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 110;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown ul {
  display: block;
  list-style: none;
  padding: 0.5rem 0;
}

.user-dropdown li {
  margin: 0;
}

.user-dropdown a {
  color: var(--text);
  padding: 0.75rem 1rem;
  display: block;
  transition: background-color 0.3s ease;
}

.user-dropdown a:hover {
  background-color: var(--bg);
}

.user-dropdown .dropdown-divider {
  height: 1px;
  background-color: var(--border);
  margin: 0.5rem 0;
}

.login-buttons {
  display: flex;
  align-items: center;
}

.login-buttons .btn-login {
  color: var(--light);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.login-buttons .btn-register {
  background-color: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-left: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.login-buttons .btn-register:hover {
  background-color: var(--primary-dark);
}

/* Mobile login buttons */
.mobile-login-buttons {
  display: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
  color: var(--light);
  padding: 4rem 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  margin-left: 1rem;
}

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

/* Features Section */
.features {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--text);
  max-width: 700px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 10px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px var(--shadow);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

/* Main Content Areas */
.main-content {
  padding: 3rem 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 2rem;
}

.main-area {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 10px var(--shadow);
}

.main-area h2 {
  margin-bottom: 1.5rem;
  color: var(--primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.sidebar {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px var(--shadow);
}

.sidebar h3 {
  margin-bottom: 1rem;
  color: var(--primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Creator Corner */
.creator-spotlight {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 10px var(--shadow);
}

.creator-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.creator-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
}

.creator-info h3 {
  margin-bottom: 0.3rem;
}

.creator-info p {
  color: var(--gray);
}

.creator-content {
  margin-bottom: 1.5rem;
}

/* Discussion Forum */
.forum-post {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 10px var(--shadow);
}

.post-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.post-author {
  display: flex;
  align-items: center;
}

.author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.8rem;
}

.post-date {
  color: var(--gray);
  font-size: 0.9rem;
}

.post-content {
  margin-bottom: 1.5rem;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.post-actions button {
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.post-actions button:hover {
  color: var(--primary);
}

.post-actions button i {
  margin-right: 0.4rem;
}

/* Resources Section */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.resource-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px var(--shadow);
  transition: transform 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-5px);
}

.resource-card h3 {
  margin-bottom: 0.8rem;
  color: var(--secondary);
}

.resource-card p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Chat Room */
.chat-container {
  display: flex;
  height: 600px;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 10px var(--shadow);
  overflow: hidden;
}

.chat-sidebar {
  width: 250px;
  background-color: var(--dark);
  color: var(--light);
  padding: 1rem;
  overflow-y: auto;
}

.chat-sidebar h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray);
}

.chat-rooms {
  margin-bottom: 2rem;
}

.chat-rooms h4 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.room-list {
  list-style: none;
}

.room-list li {
  margin-bottom: 0.5rem;
}

.room-list a {
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  color: var(--light);
  transition: background-color 0.3s ease;
}

.room-list a:hover,
.room-list a.active {
  background-color: var(--secondary);
}

.online-users h4 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.user-list {
  list-style: none;
}

.user-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.user-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4caf50;
  margin-right: 0.5rem;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.message {
  margin-bottom: 1rem;
  max-width: 70%;
}

.message-other {
  align-self: flex-start;
}

.message-self {
  align-self: flex-end;
  margin-left: auto;
}

.message-content {
  background-color: var(--gray);
  padding: 0.8rem;
  border-radius: 8px;
}

.message-self .message-content {
  background-color: var(--secondary);
  color: white;
}

.message-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  color: var(--gray);
}

.chat-form {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
}

.chat-form input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-right: 0.5rem;
  background-color: var(--bg);
  color: var(--text);
}

.chat-form button {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.chat-form button:hover {
  background-color: var(--primary-dark);
}

/* Stats and Data Section */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px var(--shadow);
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text);
  font-size: 1rem;
}

.data-viz {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 10px var(--shadow);
  margin-bottom: 2rem;
}

/* Resource Templates */
.resource-template {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 10px var(--shadow);
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  background-color: var(--secondary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.download-btn:hover {
  background-color: var(--primary);
}

.download-btn i {
  margin-right: 0.5rem;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: var(--light);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h3 {
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--gray);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray);
}

.social-links {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.social-links a {
  color: var(--light);
  font-size: 1.2rem;
  margin: 0 0.8rem;
  transition: color 0.3s ease;
}

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

/* Center alignment utility class */
.text-center {
  text-align: center;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .chat-container {
    flex-direction: column;
    height: auto;
  }

  .chat-sidebar {
    width: 100%;
    max-height: 200px;
  }
}

@media (max-width: 768px) {
  /* Enable mobile menu */
  .nav-toggle {
    display: block;
  }

  nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--dark);
    padding: 1.5rem;
    transition: left 0.3s ease;
    z-index: 100;
    overflow-y: auto;
  }

  nav.active {
    left: 0;
  }

  nav ul {
    flex-direction: column;
  }

  nav ul li {
    margin: 0 0 1rem 0;
  }

  /* Hide desktop login buttons */
  .right-nav .login-buttons {
    display: none;
  }
  
  /* Show mobile login buttons in navigation menu */
  nav .mobile-login-buttons {
    display: flex;
    flex-direction: column;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
  }
  
  nav .mobile-login-buttons a {
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
  }
  
  nav .mobile-login-buttons .btn-register {
    margin-left: 0;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .btn {
    padding: 0.7rem 1.2rem;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 3rem 0;
  }

  .features,
  .main-content {
    padding: 2rem 0;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .btn-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .btn {
    width: 100%;
    margin-bottom: 1rem;
    text-align: center;
  }

  .btn-outline {
    margin-left: 0;
  }
  
  /* Forum posts and other content on small screens */
  .post-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-author {
    margin-bottom: 0.5rem;
  }
  
  .post-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-actions button {
    margin-bottom: 0.5rem;
  }
  
  .template-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .template-header .download-btn {
    margin-top: 1rem;
  }
}