/* Populis - Main Styles */

:root {
  /* Brand and UI colors */
  --color-brand: #2563eb;        /* Brand color - blue for links, buttons, accents */
  --color-neutral: hsl(0, 0%, 50%);  /* Neutral gray for default avatars */

  /* Argument position colors */
  --color-pro: #10b981;          /* Pro arguments - green */
  --color-contra: #ef4444;       /* Contra arguments - red */
  --color-nuance: #f59e0b;       /* Nuance arguments - orange */

  /* Background colors */
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-border: #e2e8f0;

  /* Text colors */
  --color-text: #1e293b;
  --color-text-muted: #64748b;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Other */
  --border-radius: 0.5rem;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Navigation */
.navbar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 102;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-brand);
  text-decoration: none;
  position: relative;
}

/* Hamburger Menu Button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: var(--spacing-sm);
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  background: none;
  transform: scale(1.1);
}

.hamburger {
  width: 25px;
  height: 3px;
  background: var(--color-brand);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger animation when active */
.menu-toggle.active .hamburger:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .hamburger:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .hamburger:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Vertical Navigation Menu */
.nav-links {
  position: fixed;
  top: 80px;
  right: -100%;
  width: 280px;
  height: calc(100vh - 80px);
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  transition: right 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  z-index: 101;
}

.nav-links.active {
  right: 0;
}

/* All menu links - consistent styling */
.nav-links > a,
.nav-links #auth-nav > a {
  color: var(--color-text);
  text-decoration: none;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s, color 0.2s, text-decoration 0.2s;
  display: block;
  width: 100%;
}

.nav-links > a:hover,
.nav-links #auth-nav > a:hover {
  background-color: var(--color-bg-alt);
  color: var(--color-brand);
  text-decoration: none;
}

.nav-links #auth-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}


/* Overlay when menu is open */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
  padding: var(--spacing-xl) 0;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--color-brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Forms */
input, textarea, select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  margin-bottom: var(--spacing-md);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button, .btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--color-brand);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover, .btn:hover {
  background: #1d4ed8;
  text-decoration: none;
}

button:disabled {
  background: var(--color-neutral);
  cursor: not-allowed;
}

/* Cards */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* Loading */
.loading {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--color-text-muted);
}

/* Error */
.error {
  color: var(--color-contra);
  padding: var(--spacing-md);
  background: #fee2e2;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
}

/* Footer */
footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--color-text-muted);
  margin: 0 var(--spacing-sm);
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mt-lg { margin-top: var(--spacing-lg); }
