@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --primary-dark: #1a1d29;
  --secondary-dark: #252837;
  --accent-blue: #4f46e5;
  --accent-purple: #7c3aed;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --hover-bg: #374151;
  --card-bg: #1e293b;
  --gradient-primary: linear-gradient(135deg, #4f46e5, #7c3aed);
  --gradient-secondary: linear-gradient(135deg, #0f172a, #1e293b);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--gradient-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar-menu {
  width: 280px;
  background: var(--primary-dark);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-menu.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.version-tag {
  background: var(--gradient-primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
  background: var(--hover-bg);
}

.toggle-bar {
  width: 1.25rem;
  height: 0.125rem;
  background: var(--text-secondary);
  border-radius: 0.125rem;
  transition: all 0.3s ease;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  border-left-color: var(--accent-blue);
}

.nav-link.active {
  background: var(--hover-bg);
  color: var(--text-primary);
  border-left-color: var(--accent-purple);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  transition: margin-left 0.3s ease;
}

.page-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  font-weight: 400;
}

.content-wrapper {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Promo Card */
.promo-card {
  background: var(--gradient-primary);
  border-radius: 1rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.promo-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.promo-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.promo-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.promo-text {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--accent-purple);
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  margin-top: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: #f1f5f9;
}

/* Content Article */
.content-article {
  background: var(--card-bg);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.article-section {
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.article-section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 0.25rem;
  background: var(--gradient-primary);
  border-radius: 0.125rem;
}

.section-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.section-text:last-child {
  margin-bottom: 0;
}

.section-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  margin-top: auto;
  margin-left: 280px;
  transition: margin-left 0.3s ease;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent-blue);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar-menu {
    transform: translateX(-100%);
  }

  .sidebar-menu.collapsed {
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 0;
  }

  .site-footer {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 2rem 1rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .content-wrapper {
    padding: 1rem;
  }

  .promo-card {
    padding: 1.5rem;
  }

  .promo-title {
    font-size: 1.5rem;
  }

  .article-section {
    padding: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .sidebar-header {
    padding: 1rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .promo-card {
    padding: 1rem;
  }

  .promo-title {
    font-size: 1.25rem;
  }

  .promo-text {
    font-size: 1rem;
  }

  .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .article-section {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Mobile sidebar overlay */
@media (max-width: 1024px) {
  .sidebar-menu:not(.collapsed) {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .sidebar-menu:not(.collapsed)::before {
    content: "";
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

/* Smooth animations */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Focus styles for accessibility */
.nav-link:focus,
.footer-link:focus,
.cta-button:focus,
.sidebar-toggle:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .sidebar-menu,
  .site-footer {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .page-header {
    background: white;
    color: black;
  }

  .content-article {
    background: white;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
