/* =========================================
   GAMENEX - NEUMORPHISM & GLASSMORPHISM
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* 1. CSS CUSTOM PROPERTIES */
:root {
  --bg-primary: #0D0B1F;       /* Very Dark Purple */
  --bg-secondary: #131129;     /* Dark Purple */
  --bg-tertiary: #1A1633;      /* Lighter Dark Purple */
  
  --shadow-dark: #070611;      /* For Neumorphism */
  --shadow-light: #15112d;     /* For Neumorphism */
  
  --accent-primary: #7B2FF7;   /* Vibrant Purple */
  --accent-secondary: #9D4EDD; /* Bright Purple */
  --accent-tertiary: #C77DFF;  /* Light Purple */
  --accent-glow: rgba(123, 47, 247, 0.5); /* Soft Glow */
  
  --text-primary: #ffffff;
  --text-secondary: #a8a5b8;
  
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
}

/* 2. RESET & BASE STYLES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* 3. LAYOUT UTILITIES */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
  z-index: 2;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fff, var(--accent-tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title.center {
  text-align: center;
}

.text-center {
  text-align: center;
}

.grid-layout {
  display: grid;
  gap: 2rem;
}

.mods-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.categories-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* 4. BACKGROUND & GLASSMORPHISM BLOBS */
.page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  z-index: -2;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.blob-1 {
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  animation: blobFloat 10s ease-in-out infinite alternate;
}

.blob-2 {
  top: 40%;
  right: -50px;
  width: 300px;
  height: 300px;
  background: var(--accent-secondary);
  animation: blobFloat 8s ease-in-out infinite alternate-reverse;
}

.blob-3 {
  bottom: 10%;
  left: 20%;
  width: 350px;
  height: 350px;
  background: #06b6d4; /* Soft cyan accent */
  opacity: 0.3;
  animation: blobFloat 12s ease-in-out infinite alternate;
}

@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -40px) scale(1.1); }
}

/* 5. COMPONENTS */

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  padding: 1rem 0;
  background: rgba(13, 11, 31, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(123, 47, 247, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 10px var(--accent-glow);
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo-img {
  max-height: 35px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--accent-glow);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-tertiary);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent-tertiary);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s ease;
}

/* --- Buttons --- */
.btn-primary {
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(123, 47, 247, 0.4);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(123, 47, 247, 0.6);
}

.btn-neuro {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid rgba(123, 47, 247, 0.1);
  border-radius: 50px;
  padding: 0.8rem 1.8rem;
  font-weight: 500;
  box-shadow: 
    6px 6px 12px var(--shadow-dark),
    -6px -6px 12px var(--shadow-light);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-neuro:hover {
  color: var(--accent-tertiary);
  box-shadow: 
    8px 8px 16px var(--shadow-dark),
    -8px -8px 16px var(--shadow-light),
    0 0 10px rgba(123, 47, 247, 0.2);
}

.btn-neuro:active {
  box-shadow: 
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

.btn-primary-small, .btn-neuro-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}
.btn-primary-small {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: 0 2px 10px rgba(123, 47, 247, 0.3);
}
.btn-primary-small:hover { box-shadow: 0 4px 15px rgba(123, 47, 247, 0.5); transform: translateY(-1px); }

.btn-neuro-small {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  border: none;
  cursor: pointer;
}
.btn-neuro-small:active {
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding-top: 80px;
}

.hero-content {
  text-align: center;
  max-width: 800px;
}

.hero-logo-img {
  max-height: 200px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  margin: 0 auto 2rem auto;
  filter: drop-shadow(0 0 20px rgba(199, 125, 255, 0.4));
  animation: floatLogo 6s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  background: linear-gradient(to right, #fff, var(--accent-tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(199, 125, 255, 0.3));
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-inline: auto;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Glassmorphic Card (Featured Mods) --- */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(199, 125, 255, 0.15);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(199, 125, 255, 0.4);
  box-shadow: 0 12px 40px rgba(123, 47, 247, 0.2);
}

.card-image-wrapper {
  width: 100%;
  height: 200px;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(45deg, var(--bg-tertiary), var(--bg-secondary));
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.card-content {
  padding: 1.5rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  color: var(--accent-tertiary);
}

.badge-accent {
  background: rgba(123, 47, 247, 0.1);
  border-color: rgba(123, 47, 247, 0.3);
}

.card-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.version {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
}

/* --- Neumorphic Card (Categories) --- */
.neuro-card {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 
    8px 8px 16px var(--shadow-dark),
    -8px -8px 16px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid transparent;
}

.neuro-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    12px 12px 24px var(--shadow-dark),
    -12px -12px 24px var(--shadow-light);
  border-color: rgba(123, 47, 247, 0.1);
}

.category-card .category-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 8px rgba(123, 47, 247, 0.4));
  transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
  transform: scale(1.1);
}

.category-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* --- Gallery Item --- */
.gallery-item {
  height: 250px;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.gallery-item .image-placeholder {
  transition: transform 0.5s ease;
}
.gallery-item:hover .image-placeholder {
  transform: scale(1.05);
}

/* --- Community Social Buttons --- */
.community-subtitle {
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.neuro-social-btn {
  width: 120px;
  height: 120px;
  background: var(--bg-primary);
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  box-shadow: 
    8px 8px 16px var(--shadow-dark),
    -8px -8px 16px var(--shadow-light);
  transition: all 0.3s ease;
}

.neuro-social-btn svg {
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.neuro-social-btn span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.neuro-social-btn:hover {
  transform: translateY(-5px);
  box-shadow: 
    12px 12px 24px var(--shadow-dark),
    -12px -12px 24px var(--shadow-light),
    0 0 15px rgba(123, 47, 247, 0.2);
}

.neuro-social-btn:hover svg,
.neuro-social-btn:hover span {
  color: var(--accent-tertiary);
  filter: drop-shadow(0 0 5px var(--accent-glow));
}

.neuro-social-btn:active {
  box-shadow: 
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(123, 47, 247, 0.1);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  box-shadow: 0 0 10px var(--accent-primary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.footer-links {
  text-align: right;
}

.footer-links p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.footer-social a {
  font-size: 0.85rem;
  color: var(--accent-tertiary);
}

.footer-social a:hover {
  text-shadow: 0 0 8px var(--accent-glow);
}

/* 6. ANIMATIONS & REVEALS */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger grid items */
.mods-grid > *:nth-child(1) { transition-delay: 0.1s; }
.mods-grid > *:nth-child(2) { transition-delay: 0.2s; }
.mods-grid > *:nth-child(3) { transition-delay: 0.3s; }

.categories-grid > *:nth-child(1) { transition-delay: 0.1s; }
.categories-grid > *:nth-child(2) { transition-delay: 0.15s; }
.categories-grid > *:nth-child(3) { transition-delay: 0.2s; }
.categories-grid > *:nth-child(4) { transition-delay: 0.25s; }
.categories-grid > *:nth-child(5) { transition-delay: 0.3s; }
.categories-grid > *:nth-child(6) { transition-delay: 0.35s; }

/* --- Article Post Styles --- */
.article-post {
  padding: 4rem 5rem;
  max-width: 900px;
  margin: 0 auto;
}

.article-header {
  padding: 0 0 40px 0;
  text-align: center;
}

.article-meta {
  color: var(--accent-tertiary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.article-banner {
  width: 100%;
  height: auto;
  max-height: 400px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(123, 47, 247, 0.2);
}

.article-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 4rem;
}

.article-content h2, .article-content h3 {
  color: var(--text-primary);
  margin: 2.5rem 0 1.5rem 0;
  font-family: var(--font-heading);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* --- Comment Section --- */
.comment-section {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(123, 47, 247, 0.1);
}

.comment-form {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.neumorphic-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid rgba(123, 47, 247, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  box-shadow: 
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
  transition: all 0.3s ease;
}

.neumorphic-input:focus {
  outline: none;
  border-color: var(--accent-tertiary);
  box-shadow: 
    inset 6px 6px 12px var(--shadow-dark),
    inset -6px -6px 12px var(--shadow-light),
    0 0 10px rgba(123, 47, 247, 0.1);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.comment-item {
  display: flex;
  gap: 1.5rem;
}

.comment-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(123, 47, 247, 0.3);
}

.comment-body {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 0 20px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-grow: 1;
}

.comment-author {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* 7. MEDIA QUERIES (Responsive) */
@media (max-width: 900px) {
  .article-post {
    padding: 2.5rem 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
  }
  .btn-neuro { justify-content: center; }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(13, 11, 31, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease;
    border-bottom: 1px solid rgba(123, 47, 247, 0.2);
  }
  
  .nav-links.open {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .desktop-btn {
    display: none;
  }

  .hamburger {
    display: flex;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    text-align: center;
  }
  .footer-social {
    justify-content: center;
  }
}
