/* Modern Design System - dotpwn Edition */
:root {
  --primary: #6366f1;
  /* Indigo */
  --primary-hover: #4f46e5;
  --secondary: #10b981;
  /* Emerald/Green */
  --accent: #f59e0b;
  /* Amber */
  --text-main: #f1f5f9;
  /* Slate 100 */
  --text-light: #94a3b8;
  /* Slate 400 */
  --bg-body: #0f172a;
  /* Slate 900 */
  --bg-card: rgba(30, 41, 59, 0.5);
  /* Semi-transparent Slate 800 */
  --nav-bg: rgba(2, 6, 23, 0.8);
  --glass-border: rgba(51, 65, 85, 0.5);
  /* Slate 700 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --discord-primary: #5865F2;
  --discord-hover: #4752c4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-main: #f1f5f9;
    /* Slate 100 */
    --text-light: #94a3b8;
    /* Slate 400 */
    --bg-body: #020617;
    /* Slate 950 */
    --bg-card: #0f172a;
    /* Slate 900 */
    --nav-bg: rgba(2, 6, 23, 0.8);
    --glass-border: rgba(30, 41, 59, 1);
    /* Slate 800 */
  }
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: #0f172a;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

ul {
  list-style: none;
}

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

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

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

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 2.25rem;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}


.nav-link {
  font-weight: 500;
  font-size: 1rem;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
}

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

.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  width: 100%;
}


/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-main);
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 4.5rem;
}

.hero-content {
  max-width: 800px;
  animation: fadeIn Up 0.8s ease-out;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-discord {
  background: var(--discord-primary);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-discord:hover {
  background: var(--discord-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background-color: #e5e7eb;
}

/* Code blocks */
pre,
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  border-radius: var(--radius-md);
}

code {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  padding: 0.2rem 0.4rem;
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

pre code {
  background: transparent;
  padding: 0;
  color: var(--text-main);
}

/* Badges/Tags */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  margin-right: 0.5rem;
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

/* Footer */
footer {
  background: var(--bg-card);
  padding: 3rem 0;
  margin-top: 4rem;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

/* Forum Styles */
.forum-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-top: 2rem;
}

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

.forum-search {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  color: var(--text-main);
  width: 100%;
  max-width: 400px;
}

.forum-item {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.forum-item:hover {
  transform: translateX(5px);
  border-color: var(--primary);
}

.forum-item-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.forum-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

.forum-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.forum-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.sidebar-widget h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.input-post {
  width: 100%;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--text-main);
  font-family: var(--font-sans);
  margin-bottom: 1rem;
  resize: vertical;
  min-height: 100px;
}

@media (max-width: 992px) {
  .forum-layout {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Auth Components */
.auth-wrapper {
  display: flex;
  align-items: center;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.35rem 0.5rem;
  padding-right: 1rem;
  border-radius: 9999px;
  border: 1px solid var(--glass-border);
}

.user-profile img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--primary);
}

.user-profile span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.logout-link {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.logout-link:hover {
  color: var(--primary);
}

.hidden {
  display: none !important;
}

/* Forum & Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  width: 100%;
  max-width: 600px;
  padding: 2.5rem;
}

.forum-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.thread-card {
  border-left: 3px solid var(--primary);
}

.reply-container {
  margin-left: 3rem;
  margin-top: 1rem;
  border-left: 2px solid var(--glass-border);
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-bar {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.action-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.action-btn:hover {
  text-decoration: underline;
}

.edit-btn {
  color: var(--text-light);
}

/* Mobile Responsive */
@media (max-width: 768px) {


  .nav-links {
    position: fixed;
    top: 4.5rem;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-150%);
    transition: transform 0.3s ease-in-out;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
  }

  h1 {
    font-size: 2.5rem;
  }
}