@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&family=Share+Tech+Mono&family=Noto+Sans+SC:wght@400;500&display=swap');

:root {
  --bg-outer: #1a1a1a;
  --bg-content: #f5f0e8;
  --color-primary: #CC0000;
  --bg-nav: #8B0000;
  --color-heading: #990000;
  --bg-terminal: #0d0d0d;
  --color-terminal: #ff4444;
  --color-text: #2a2009;
  --bg-sidebar: #e8e0d0;
  --color-border: #a0522d;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-outer);
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  background-color: var(--bg-outer);
}

header {
  background: linear-gradient(to bottom, #6b0000, #2a0000);
  border-bottom: 3px solid #c8a400;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-left svg {
  width: 50px;
  height: 50px;
  fill: #CC0000;
  stroke: #c8a400;
  stroke-width: 1px;
  margin-right: 20px;
}

.header-titles {
  display: flex;
  flex-direction: column;
}

.header-titles h1 {
  margin: 0;
  font-family: 'Noto Serif SC', serif;
  font-size: 32px;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
}

.header-titles p {
  margin: 5px 0 0 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  color: #e0e0e0;
}

.header-right {
  text-align: right;
  font-size: 12px;
  color: #aaa;
}

.header-right .hammer-sickle {
  font-size: 28px;
  color: rgba(204, 0, 0, 0.6);
  display: block;
  margin-top: 5px;
}

nav {
  background-color: var(--bg-nav);
  display: flex;
}

.tab-btn {
  background: none;
  border: none;
  color: #e0e0e0;
  padding: 15px 25px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  border-right: 1px solid rgba(0, 0, 0, 0.3);
}

.tab-btn:hover {
  background-color: rgba(204, 0, 0, 0.5);
  color: white;
}

.tab-btn.active {
  background-color: var(--color-primary);
  color: white;
  font-weight: bold;
}

.main-layout {
  display: flex;
  background-color: var(--bg-content);
  min-height: 600px;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--color-border);
  padding: 20px;
  box-sizing: border-box;
}

.content-area {
  width: 100%;
  max-width: 740px;
  padding: 30px;
  box-sizing: border-box;
}

.sidebar h3 {
  color: var(--color-heading);
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  margin-top: 0;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 5px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}

.sidebar li {
  margin-bottom: 10px;
}

.divider {
  height: 1px;
  background-color: var(--color-border);
  margin: 20px 0;
  opacity: 0.4;
}

.sidebar a {
  color: var(--color-heading);
  text-decoration: none;
}

.sidebar a:hover {
  text-decoration: underline;
}

.retro-badge {
  background: var(--bg-terminal);
  color: var(--color-terminal);
  font-family: 'Share Tech Mono', monospace;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  border: 1px solid #33ff33;
}

.warning-box {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 12px;
  font-size: 12px;
  border-left: 4px solid #ffc107;
  margin-top: 20px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

h2 {
  font-family: 'Noto Serif SC', serif;
  color: var(--color-heading);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 10px;
  margin-top: 0;
}

h3 {
  font-family: 'Noto Serif SC', serif;
  color: var(--color-heading);
}

pre {
  background-color: var(--bg-terminal);
  color: var(--color-terminal);
  font-family: 'Share Tech Mono', monospace;
  padding: 15px;
  border-radius: 3px;
  overflow-x: auto;
  border: 1px solid #333;
}

code {
  font-family: 'Share Tech Mono', monospace;
  background-color: rgba(0,0,0,0.05);
  padding: 2px 4px;
  border-radius: 3px;
  color: var(--color-heading);
}

pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

.btn {
  display: inline-block;
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  font-weight: bold;
  font-size: 14px;
  border: none;
  cursor: pointer;
  border-radius: 2px;
}

.btn:hover {
  background-color: var(--color-heading);
}

footer {
  background-color: var(--bg-outer);
  color: #666;
  text-align: center;
  padding: 20px;
  font-size: 12px;
  font-family: 'Share Tech Mono', monospace;
  border-top: 1px solid #333;
}

.content-img {
  max-width: 100%;
  border: 2px solid var(--color-border);
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  margin: 15px 0;
  display: block;
}

#lang-switcher {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.lang-btn {
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 1px solid #555;
  padding: 5px 10px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--color-primary);
  border-color: #f00;
}

@media (max-width: 768px) {
  #lang-switcher {
    position: static;
    text-align: center;
    background: #1a1a1a;
    padding: 15px 10px;
    border-bottom: 2px solid #333;
  }
  
  header {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
  
  .header-left {
    flex-direction: column;
  }
  
  .header-left svg {
    margin: 0 0 10px 0;
    display: block;
  }
  
  .header-titles h1 {
    font-size: 24px;
  }
  
  .header-right {
    text-align: center;
    margin-top: 15px;
  }
  
  nav {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--color-border);
  }
  
  .tab-btn {
    width: 100%;
    text-align: center;
    padding: 15px 20px;
    font-size: 15px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
  }
  
  .tab-btn:last-child {
    border-bottom: none;
  }
  
  .tab-btn.active {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background-color: var(--color-primary);
  }
  
  .main-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: 15px;
  }
  
  .content-area {
    width: 100%;
    padding: 15px;
  }
  
  pre {
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-all;
  }
  
  .btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin: 0 0 10px 0 !important;
  }
}
