:root {
  --bg-color: #1a1b26;
  --text-color: #a9b1d6;
  --sidebar-bg: #16161e;
  --sidebar-width: 250px;
  --accent-color: #7aa2f7;
  --header-height: 60px;
  --border-color: #414868;
}

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

body {
  font-family: "Segoe UI", "Yu Gothic UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent-color);
}

.nav-links {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding-top: 10px;
}

.nav-links li a {
  display: block;
  padding: 10px 20px;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
  font-size: 0.95rem;
}

.nav-links li a:hover,
.nav-links li a.active {
  background-color: #24283b;
  color: var(--accent-color);
  border-left: 3px solid var(--accent-color);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-bar {
  height: var(--header-height);
  background-color: var(--sidebar-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 30px;
  font-size: 1.1rem;
  font-weight: 600;
}

.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  scroll-behavior: smooth;
}

.content-wrapper {
  max-width: 900px; /* Increased for wider images */
  margin: 0 auto;
}

/* Typography & Elements */
h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  margin-top: 3rem;
  color: #fff;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}
h1:first-child { margin-top: 0; }

h2 {
  font-size: 1.6rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: #c0caf5;
}

h3 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  color: #bb9af7;
  border-left: 4px solid var(--accent-color);
  padding-left: 10px;
}

h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #7dcfff;
}

p {
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

ul, ol {
    margin-bottom: 1.2rem;
    padding-left: 20px;
}
li {
    margin-bottom: 0.5rem;
}

code {
  background-color: #24283b;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: "Consolas", monospace;
  color: #e0af68;
}

pre {
  background-color: #24283b;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border-color);
}

.note {
  background-color: rgba(122, 162, 247, 0.1);
  border-left: 4px solid var(--accent-color);
  padding: 15px;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
}

.kbd {
  background-color: #414868;
  color: white;
  border-radius: 4px;
  padding: 2px 6px;
  border-bottom: 2px solid #24283b;
  font-size: 0.85em;
}

/* Images & Screenshots */
img.screenshot {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  margin: 1rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  background-color: #000; /* For transparent images */
}

/* Gallery for settings */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery h4 {
    margin-top: 0;
    text-align: center;
}

.gallery img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: #414868;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #565f89;
}

.sidebar-footer {
  padding: 20px 20px 0;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.back-to-product {
  display: block;
  padding: 12px 20px;
  color: var(--accent-color);
  text-decoration: none;
  background-color: rgba(122, 162, 247, 0.1);
  border-radius: 6px;
  text-align: center;
  transition: background-color 0.2s, transform 0.2s;
  font-size: 0.95rem;
  font-weight: 500;
}

.back-to-product:hover {
  background-color: rgba(122, 162, 247, 0.2);
  transform: translateX(-2px);
}
