/* ========================================
   ProManager Website Styles
   Developer-focused, Modern, Dark/Light Mode
   ======================================== */

/* CSS Variables */
:root {
  /* Light Mode Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #6c757d;
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --code-bg: #f1f5f9;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
}

[data-theme="dark"] {
  /* Dark Mode Colors */
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #252542;
  --bg-card: #1e1e32;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-primary: #818cf8;
  --accent-secondary: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  --border-color: #334155;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --code-bg: #252542;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-secondary);
}

code, .mono {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
}

code {
  background-color: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

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

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-secondary);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  background-color: rgba(var(--bg-primary), 0.9);
}

[data-theme="dark"] .navbar {
  background-color: rgba(15, 15, 26, 0.95);
}

[data-theme="light"] .navbar {
  background-color: rgba(255, 255, 255, 0.95);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav-brand svg {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Hero Section */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  text-align: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center top, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(ellipse at center top, rgba(129, 140, 248, 0.15) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-badge .badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  color: white;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}

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

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn svg {
  width: 20px;
  height: 20px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}

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

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  margin-bottom: 0;
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

/* Why Section */
.why-section {
  text-align: center;
}

.why-section h2 {
  margin-bottom: 1rem;
}

.why-section > p {
  max-width: 700px;
  margin: 0 auto 3rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: left;
}

.why-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.why-item-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.why-item h4 {
  margin-bottom: 0.25rem;
}

.why-item p {
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* Screenshot Section */
.screenshot-section {
  text-align: center;
}

.screenshot-placeholder {
  margin-top: 3rem;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.screenshot-placeholder svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Features Page */
.features-hero {
  padding-top: 140px;
  padding-bottom: 60px;
  text-align: center;
}

.feature-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.feature-section:last-child {
  border-bottom: none;
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.feature-header-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-header-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.feature-header h2 {
  margin-bottom: 0;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.feature-item-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.feature-item h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.feature-item p {
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* Download Page */
.download-hero {
  padding-top: 140px;
  padding-bottom: 60px;
  text-align: center;
}

.download-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.download-card-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-card-icon svg {
  width: 40px;
  height: 40px;
  color: var(--accent-primary);
}

.download-card h3 {
  margin-bottom: 0.5rem;
}

.download-card p {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.download-info {
  margin-top: 4rem;
}

.download-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.download-info-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.download-info-item svg {
  width: 32px;
  height: 32px;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.download-info-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.download-info-item p {
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* Open Source Page */
.opensource-hero {
  padding-top: 140px;
  padding-bottom: 60px;
  text-align: center;
}

.opensource-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.opensource-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
}

.opensource-card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.opensource-card-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.tech-stack {
  margin-top: 3rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.tech-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.tech-item:hover {
  border-color: var(--accent-primary);
}

.tech-item-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.tech-item h4 {
  font-size: 0.9375rem;
  margin-bottom: 0;
}

.contribute-section {
  text-align: center;
  padding: 4rem 0;
}

.contribute-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.contribute-step {
  position: relative;
  padding: 1.5rem;
}

.contribute-step-number {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.contribute-step h4 {
  margin-bottom: 0.5rem;
}

.contribute-step p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand svg {
  width: 24px;
  height: 24px;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

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

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

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 10px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--accent-primary);
  color: white;
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 5rem 0;
  background: var(--accent-gradient);
  color: white;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-section .btn-primary {
  background: white;
  color: var(--accent-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: var(--accent-secondary);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  z-index: 999;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 8px;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 1024px) {
  .features-grid,
  .download-cards,
  .opensource-values {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contribute-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .section {
    padding: 3rem 0;
  }

  .features-grid,
  .download-cards,
  .opensource-values,
  .why-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .download-info-grid {
    grid-template-columns: 1fr;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contribute-steps {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .card {
    padding: 1.5rem;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

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

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Code block styling */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
}

pre code {
  background: none;
  padding: 0;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}
