@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
:root{
--bg:#0f1115;
--panel:#161a22;
--text:#e6e6eb;
--muted:#9aa0aa;
--accent:#7c7cff;
--border:#232837;
}
[data-theme="light"]{
--bg:#f6f7fb;
--panel:#ffffff;
--text:#0f1115;
--muted:#5a5f6a;
--accent:#5b5bff;
--border:#e3e6ef;
}
*{box-sizing:border-box}
body{
margin:0;
font-family:Inter,system-ui;
background:var(--bg);
color:var(--text);
display:flex;
min-height:100vh;
}
.mobile-header{
display:none;
position:fixed;
top:0;left:0;right:0;
background:var(--panel);
border-bottom:1px solid var(--border);
padding:12px 16px;
z-index:1000;
height:56px;
}
.mobile-header-content{
display:flex;
width:100%;
justify-content:space-between;
align-items:center;
}
.mobile-header h1{
font-size:18px;
font-weight:800;
margin:0;
}
.mobile-menu-btn{
background:none;
border:none;
color:var(--text);
cursor:pointer;
padding:0;
font-size:24px;
}
.mobile-controls{
display:flex;
gap:8px;
align-items:center;
}
.mobile-controls button{
background:var(--bg);
border:1px solid var(--border);
color:var(--text);
padding:6px 10px;
border-radius:6px;
cursor:pointer;
font-size:14px;
min-width:40px;
}
.download-btn {
    background: var(--accent);
    color: var(--panel);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.download-btn:hover {
    opacity: 0.9;
}
aside{
width:260px;
background:var(--panel);
border-right:1px solid var(--border);
padding:24px;
position:fixed;
height:100vh;
overflow-y:auto;
}
aside h1{
font-size:22px;
font-weight:800;
margin:0 0 24px 0;
}
.nav button{
display:block;
width:100%;
text-align:left;
background:none;
border:none;
color:var(--muted);
font-size:16px;
margin-bottom:10px;
cursor:pointer;
}
.nav button.active,
.nav button:hover{color:var(--accent)}
.subnav{
margin-left:12px;
margin-top:6px;
display:none;
}
.subnav button{
font-size:14px;
margin-bottom:8px;
}
.theme{margin-top:32px}
.theme button{
width:100%;
padding:10px;
border-radius:8px;
border:1px solid var(--border);
background:var(--bg);
color:var(--text);
cursor:pointer;
margin-bottom:8px;
}
main{
margin-left:260px;
padding:48px;
max-width:1000px;
flex:1;
}
section{display:none}
section.active{display:block}
h2{font-size:32px;margin-bottom:12px}
h3{margin-top:32px}
h4{margin-top:20px}
p{line-height:1.7;color:var(--muted)}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
pre,code{
background:var(--bg);
border:1px solid var(--border);
border-radius:8px;
}
pre{padding:16px;overflow:auto}
code{padding:2px 6px}
details{
border:1px solid var(--border);
border-radius:10px;
padding:14px;
margin-bottom:16px;
background:var(--panel);
}
summary{
cursor:pointer;
font-weight:600;
color:var(--accent);
}
table{
width:100%;
border-collapse:collapse;
margin-top:12px;
}
th,td{
border:1px solid var(--border);
padding:8px;
text-align:left;
}
th{background:var(--bg)}

.download-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.download-modal.active {
    display: flex;
}

.download-modal-content {
    background: var(--panel);
    border-radius: 16px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.download-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.download-modal-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.download-modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.download-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.download-option {
    margin-bottom: 32px;
}

.download-option:last-child {
    margin-bottom: 0;
}

.download-option h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
}

.download-select-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.download-select {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.download-select:focus {
    outline: none;
    border-color: var(--accent);
}

.download-files-list {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
}

.download-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.download-file-item:last-child {
    border-bottom: none;
}

.download-file-item:hover {
    background: rgba(124, 124, 255, 0.1);
    text-decoration: none;
}

.download-file-name {
    font-weight: 500;
    font-size: 14px;
}

.download-file-size {
    color: var(--muted);
    font-size: 13px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.github-link:hover {
    background: rgba(124, 124, 255, 0.1);
    border-color: var(--accent);
    text-decoration: none;
}

.back-button {
  position: fixed;
  left: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s;
  z-index: 9999;
}

.back-button:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  text-decoration: none;
}

@media (max-width:768px){
body{flex-direction:column}
.mobile-header{display:flex}
aside{
position:fixed;
top:0;
left:-100%;
width:280px;
height:100vh;
transition:left 0.3s ease;
z-index:900;
}
aside.mobile-visible{left:0}
.mobile-overlay{
display:none;
position:fixed;
top:0;left:0;right:0;bottom:0;
background:rgba(0,0,0,0.5);
z-index:850;
}
.mobile-overlay.visible{display:block}
.nav button{
padding:0;
margin-bottom:10px; 
font-size:16px;
border-bottom:none;
}
.subnav button{
padding:0;
margin-bottom:8px;
font-size:14px;
margin-left:12px;
border-bottom:none;
}
main{
margin-left:0;
margin-top:56px;
padding:20px;
width:100%;
max-width:none;
}
h2{font-size:28px;margin-top:8px}
h3{font-size:22px;margin-top:24px}
pre{padding:12px;font-size:14px}
table{display:block;overflow-x:auto}
.download-modal-content {
    width: 95%;
    max-height: 85vh;
}
.download-select-group {
    flex-direction: column;
}
.back-button {
  left: 12px;
  bottom: 12px;
  padding: 14px;
  border-radius: 10px;
}
img {
    max-width: 100%;
    height: auto;
}
}
@media (max-width:480px){
.mobile-header{padding:10px}
.mobile-header h1{font-size:16px}
main{padding:16px}
h2{font-size:24px}
h3{font-size:20px}
p{font-size:15px;line-height:1.6}
pre{padding:10px;font-size:13px}
details{padding:12px}
.download-modal-header {
    padding: 16px;
}
.download-modal-body {
    padding: 16px;
}
.back-button {
  left: 8px;
  bottom: 8px;
  padding: 12px;
}
img {
    max-width: 90%;
    height: auto;
    margin: 0 auto;
    display: block;
}
}