/* Style Sheet Template 1 - Two-Panel Layout */

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

/* Two-Panel Container Layout */
.container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Left Sidebar (Navigation) */
.sidebar {
  width: 280px;
  background: #2c3e50;
  color: #ecf0f1;
  padding: 20px;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar h2 {
  color: #ecf0f1;
  font-size: 1.5em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #34495e;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav li {
  margin: 8px 0;
}

.sidebar nav a {
  display: block;
  color: #bdc3c7;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.sidebar nav a:hover {
  background: #34495e;
  color: #fff;
  transform: translateX(5px);
}

.sidebar nav a.active {
  background: #3498db;
  color: #fff;
  font-weight: 600;
}

/* Right Content Panel */
.content {
  flex: 1;
  background: #fff;
  padding: 40px;
  overflow-y: auto;
  max-width: 100%;
  font-size: 1.4em;
}

main {
  max-width: 900px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2.5em;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.3em;
  color: #2c3e50;
}

h2 {
  font-size: 2em;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3em;
  color: #34495e;
}

h3 {
  font-size: 1.5em;
  color: #34495e;
}

h4 {
  font-size: 1.25em;
}

h5 {
  font-size: 1.1em;
}

h6 {
  font-size: 1em;
}

p {
  margin: 1em 0;
}

/* Code Blocks - Styled by Prism.js */

/* Blockquotes */
blockquote {
  border-left: 4px solid #3498db;
  margin: 1em 0;
  padding-left: 1em;
  color: #666;
  font-style: italic;
  background: #f9f9f9;
  padding: 10px 10px 10px 20px;
  border-radius: 0 5px 5px 0;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: left;
}

table th {
  background: #3498db;
  color: white;
  font-weight: 600;
}

table tr:nth-child(even) {
  background: #f9f9f9;
}

table tr:hover {
  background: #f1f1f1;
}

/* Lists */
ul, ol {
  padding-left: 2em;
  margin: 1em 0;
}

li {
  margin: 0.5em 0;
}

/* Links */
a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* Horizontal Rule */
hr {
  border: none;
  border-top: 2px solid #eee;
  margin: 2em 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 1em 0;
}

/* Mark/Highlight */
mark {
  background: #fff3cd;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Math Display - KaTeX Support */
.katex-display {
  margin: 1.5em 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.math-error {
  color: #e74c3c;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    max-height: 200px;
  }
  
  .content {
    padding: 20px;
  }
  
  main {
    max-width: 100%;
  }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: #34495e;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #7f8c8d;
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #95a5a6;
}

.content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.content::-webkit-scrollbar-thumb {
  background: #bdc3c7;
  border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
  background: #95a5a6;
}
