:root {
  --bg-primary: #ffffff;
  --bg-sidebar: #fafafa;
  --bg-hover: #f4f4f5;
  --text-primary: #18181b;
  --text-secondary: #71717a;
  --border-color: #e4e4e7;
  --shadow-subtle: 0 1px 3px rgba(0,0,0,0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 0 1rem 2rem 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.sidebar-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.sidebar-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.25rem;
}

.nav-item {
  background: transparent;
  border: none;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--border-color);
}

/* Content Area */
.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 3rem 5rem;
  background-color: var(--bg-primary);
}

.section {
  display: none;
  animation: fadeIn 0.3s ease;
  max-width: 1400px;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.section-header p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1.1rem;
}

/* Detailed Content */
.detail-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.screenshot-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.screenshot-container img {
  width: 95%;
  max-width: none;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
}

.info-block h3 {
  margin-top: 0;
  font-size: 1.25rem;
  font-weight: 500;
}

.info-block p {
  color: var(--text-secondary);
}

.info-block ul {
  color: var(--text-secondary);
  padding-left: 1.25rem;
}

.info-block li {
  margin-bottom: 0.5rem;
}

/* Style Guide Classes */
.color-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-card {
  width: 120px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.color-swatch {
  height: 80px;
  width: 100%;
}

.color-info {
  padding: 0.75rem;
  font-size: 0.8rem;
  background: var(--bg-primary);
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.ui-components {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.2s;
  font-size: 0.9rem;
}

.btn:hover {
  opacity: 0.85;
}

.btn-secondary {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.app-footer {
  margin-top: auto;
  padding-top: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.75rem;
  border-top: 1px solid var(--border-color);
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.4rem;
}

/* Responsive Design */
@media (max-width: 860px) {
  body {
    flex-direction: column;
    height: 100vh;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    padding: 1.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .sidebar-header {
    padding: 0 0 1rem 0;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-menu-btn {
    display: block;
  }
  
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    gap: 0.5rem;
  }

  .nav-menu.show {
    display: flex;
  }
  
  .nav-item {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .app-footer {
    display: none;
  }
  
  .content-wrapper {
    padding: 2rem 1.5rem;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .section-header p {
    font-size: 1rem;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
