/*
 * Shared styles for LinuxSim static content pages (/commands, /labs, /tips, /about, /cheatsheet).
 * Matches the Ubuntu aubergine + orange theme of the sim for visual consistency.
 */

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

:root {
  --bg: #2c001e;
  --bg-light: #3d0a2b;
  --bg-lighter: #5e2750;
  --surface: #380426;
  --border: rgba(233, 84, 32, 0.22);
  --accent: #e95420;
  --accent-hover: #ff6a38;
  --accent-dim: #a03a14;
  --text: #f6f6f6;
  --text-dim: #b8a8b0;
  --text-dimmer: #8a7580;
  --code-bg: #1a0011;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Ubuntu', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 0, 15, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 150ms, color 150ms;
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.cta {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.nav-link.cta:hover { background: var(--accent-hover); }

/* Modern topnav used by /welcome/ and /docs/ */
.topnav {
  background: rgba(44, 0, 30, 0.88);
  border-bottom: 1px solid rgba(233, 84, 32, 0.18);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.topnav .brand {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
  text-decoration: none;
}
.topnav .nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.topnav .nav-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: color 150ms, border-color 150ms;
}
.topnav .nav-links a:hover { color: #ffffff; }
.topnav .nav-links a.active { color: #ffaa55; border-bottom-color: #e95420; }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 120px;
}

h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #fff;
}

h2 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: #fff;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 8px;
  color: #fff;
}

h4 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 6px;
  color: var(--accent);
}

p {
  margin-bottom: 14px;
  color: var(--text-dim);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

code, pre {
  font-family: 'Ubuntu Mono', 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 14px;
}

code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffc99a;
  border: 1px solid rgba(233, 84, 32, 0.15);
}

pre {
  background: var(--code-bg);
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow-x: auto;
  margin: 16px 0;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  border: none;
  color: #ffd8b5;
}

ul, ol {
  margin-left: 24px;
  margin-bottom: 14px;
}
ul li, ol li {
  margin-bottom: 6px;
  color: var(--text-dim);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.hero {
  text-align: center;
  padding: 32px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.hero .tagline {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  margin: 16px 0;
  transition: background 150ms, transform 150ms;
}
.cta-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

.cmd-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 12px 0;
  scroll-margin-top: 80px;
}

.cmd-card .cmd-name {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.cmd-card h3 {
  margin: 0;
  color: var(--accent);
  font-family: 'Ubuntu Mono', monospace;
  font-size: 22px;
}

.cmd-card .cmd-short {
  color: var(--text-dim);
  font-size: 14px;
}

.cmd-card pre {
  margin: 10px 0;
  font-size: 13px;
}

.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.footer {
  text-align: center;
  padding: 60px 24px 40px;
  color: var(--text-dimmer);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer a { color: var(--text-dim); }

/* Sponsor strip — shown just below the main nav on every content page.
   Same look as the SponsorBadge in the sim for visual consistency. */
.sponsor-strip {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0.18) 100%);
  border-bottom: 1px solid rgba(129, 140, 248, 0.35);
}
.sponsor-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}
.sponsor-strip-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}
.sponsor-strip-link {
  color: #e0e0ff;
  font-weight: 600;
  text-decoration: none;
}
.sponsor-strip-link:hover {
  color: #ffffff;
  text-decoration: underline;
}
.sponsor-strip-tagline {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}
.sponsor-strip-arrow {
  opacity: 0.6;
  margin-left: auto;
}

@media (max-width: 700px) {
  h1 { font-size: 32px; }
  h2 { font-size: 22px; }
  main { padding: 32px 16px 80px; }
}
