/* Shared styles for codetoolbox.pro */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  transition: all 0.15s;
}
.nav-links a:hover { background: #eff6ff; color: var(--primary); }

/* Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-dropdown > a { cursor: pointer; }
.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  z-index: 200;
  padding: 0.5rem 0;
}
.nav-dropdown:hover .nav-dropdown-content { display: block; }
.nav-dropdown-content a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  font-size: 0.85rem;
  text-decoration: none;
}
.nav-dropdown-content a:hover { background: #eff6ff; }

/* Main */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  flex: 1;
  display: flex;
  gap: 2rem;
}

/* Sidebar */
.sidebar {
  width: 220px;
  flex-shrink: 0;
}
.sidebar h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.sidebar a {
  display: block;
  padding: 0.4rem 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 4px;
  margin-bottom: 0.15rem;
}
.sidebar a:hover { background: #eff6ff; color: var(--primary); }
.sidebar a.active { background: #eff6ff; color: var(--primary); font-weight: 600; }

/* Content */
.content { flex: 1; min-width: 0; }
.content h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.content h2 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }
.content h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
.content p { margin-bottom: 0.75rem; color: var(--text-muted); }
.content ul { margin: 0.5rem 0 1rem 1.5rem; color: var(--text-muted); }
.content li { margin-bottom: 0.25rem; }

/* Tool card */
.tool-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.tool-card h3 { margin-top: 0; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: #fff;
  margin-top: auto;
}
.site-footer a { color: var(--primary); text-decoration: none; }

/* Responsive */
@media (max-width: 768px) {
  .container { flex-direction: column; }
  .sidebar { 
    width: 100%;
    display: flex; 
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .sidebar a { margin-bottom: 0; }
  .header-inner { flex-direction: column; height: auto; padding: 0.75rem 0; }
}
