:root {
  --primary-color: #1A1F2C;
  --secondary-color: #9b87f5;
  --accent-color: #7E69AB;
  --background-color: #F1F0FB;
  --text-color: #333333;
  --card-bg: #ffffff;
  --border-color: rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header with Gradient */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-container img {
  max-height: 60px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
.logo-container img:hover {
  transform: scale(1.05);
}

.header-text h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-top: 4px;
  font-weight: 300;
}

/* Layout */
.layout {
  display: flex;
  max-width: 1200px;
  margin: 3rem auto;
  gap: 2.5rem;
  padding: 0 1rem;
}

/* Navigation - Flat & Fluid */
nav {
  flex: 0 0 250px;
}

.nav-links {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1rem 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.nav-links a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid transparent;
}

.nav-links a:hover {
  background-color: rgba(155, 135, 245, 0.05);
  color: var(--secondary-color);
  padding-left: 2rem;
  border-left: 4px solid var(--secondary-color);
}

/* Main Content - Soft Shadows & Round Borders */
main {
  flex: 1;
  min-width: 0;
}

.content-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.04);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0,0,0,0.08);
}

.content-card h1, .content-card h2, .content-card h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.content-card p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  color: #4a5568;
}

.content-card img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
}

.content-card a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.content-card a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Inputs and Buttons for Forms/Forum */
input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
  background-color: #f8fafc;
  box-sizing: border-box;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(155, 135, 245, 0.1);
}

input[type="submit"], button, .button-primary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(155, 135, 245, 0.3);
}
input[type="submit"]:hover, button:hover, .button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(155, 135, 245, 0.4);
}

/* Forum Specific UI */
.forum-form {
  background: #f8fafc;
  padding: 25px;
  border-radius: 16px;
  margin-bottom: 40px;
  border: 1px solid #e2e8f0;
}
.post {
  background: #ffffff;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  transition: transform 0.3s ease;
}
.post:hover {
  transform: translateX(5px);
  border-color: var(--secondary-color);
}
.post-header {
  font-size: 0.9em;
  color: #718096;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}
.post-author {
  font-weight: 700;
  color: var(--primary-color);
}
.post-content {
  color: #2d3748;
  font-size: 1.05rem;
}

/* Specific overrides */
.small { font-size: 0.85rem; color: #a0aec0; }
.copyright { text-align: center; margin: 1rem 0; color: #a0aec0; font-size: 0.9rem; }

/* Footer */
footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 4rem 1rem;
  margin-top: 5rem;
  border-top: 5px solid var(--secondary-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-container a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-container a:hover {
  color: var(--secondary-color);
}

.badges {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.05);
  padding: 15px 25px;
  border-radius: 12px;
  margin-top: 1rem;
}

.badges img {
  max-height: 40px;
  filter: grayscale(100%) opacity(0.8);
  transition: all 0.3s ease;
}
.badges img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.1);
}

/* Animations JS classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  nav {
    flex: none;
    width: 100%;
  }
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  .nav-links a:hover {
    padding-left: 1.5rem;
  }
}