* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body, .body-dark { font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; background: #030712; color: #f9fafb; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.container { max-width: 80rem; margin: 0 auto; width: 100%; padding-left: 1.5rem; padding-right: 1.5rem; }
.main-spacing { padding-top: 2rem; padding-bottom: 2rem; }
.stack-4 > * + * { margin-top: 1rem; }
.stack-5 > * + * { margin-top: 1.25rem; }
.stack-6 > * + * { margin-top: 1.5rem; }
.stack-8 > * + * { margin-top: 2rem; }
.mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } .mb-5 { margin-bottom: 1.25rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; } .mt-1 { margin-top: .25rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.site-header { border-bottom: 1px solid #1f2937; background: #111827; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.title-xl { font-size: 1.875rem; line-height: 1.2; font-weight: 700; margin: 0; } .title-lg { font-size: 1.5rem; line-height: 1.3; font-weight: 600; margin: 0; } .title-md { font-size: 1.25rem; line-height: 1.35; font-weight: 600; }
.text-small { font-size: .875rem; line-height: 1.4; } .text-muted { color: #9ca3af; } .text-dim { color: #6b7280; } .eyebrow { font-size: .875rem; color: #6b7280; text-transform: uppercase; letter-spacing: .2em; }
.panel { background: #111827; border: 1px solid #1f2937; border-radius: 1rem; padding: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.intro-content > h1, .intro-content > h2, .intro-content > h3, .intro-content > p, .intro-content > ul, .intro-content > pre { max-width: 72ch; }
.project-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.project-card { display: flex; flex-direction: column; justify-content: space-between; }
.project-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.project-desc { min-height: 3rem; line-height: 1.6; }
.badge { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; background: #1f2937; border: 1px solid #374151; border-radius: .5rem; padding: .35rem .6rem; white-space: nowrap; }
.button-row { display: flex; gap: .75rem; align-items: center; } .button-row.wrap { flex-wrap: wrap; }
.btn { display: inline-block; border: 1px solid transparent; border-radius: .875rem; padding: .75rem 1rem; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.btn-small { padding: .5rem .875rem; font-size: .875rem; } .btn-block { width: 100%; text-align: center; }
.btn-primary { background: #2563eb; color: #fff; } .btn-primary:hover { background: #3b82f6; }
.btn-success { background: #16a34a; color: #fff; } .btn-success:hover { background: #22c55e; }
.btn-danger { background: #dc2626; color: #fff; } .btn-danger:hover { background: #ef4444; }
.btn-ghost { background: transparent; border-color: #374151; color: #f9fafb; } .btn-ghost:hover { background: #1f2937; }
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; } .auth-panel { width: 100%; max-width: 28rem; }
.form-label { display: block; margin-bottom: .5rem; font-size: .875rem; color: #d1d5db; }
.form-input, .form-textarea { width: 100%; background: #1f2937; border: 1px solid #374151; color: #f9fafb; border-radius: .875rem; padding: .75rem 1rem; outline: none; }
.form-textarea { resize: vertical; min-height: 100px; } .textarea-md { min-height: 110px; } .textarea-readme { min-height: 160px; } .textarea-lg { min-height: 220px; } .file-input { padding-top: .65rem; padding-bottom: .65rem; } .helper-text { font-size: .75rem; color: #6b7280; margin-top: .5rem; }
.alert { border-radius: .75rem; padding: .875rem 1rem; border: 1px solid; } .alert-error { border-color: #b91c1c; background: rgba(69,10,10,.5); color: #fca5a5; } .alert-success { border-color: #15803d; background: rgba(5,46,22,.5); color: #86efac; }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.project-editor { border: 1px solid #1f2937; border-radius: 1rem; padding: 1.25rem; } .editor-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.project-layout { min-height: 100vh; display: flex; flex-direction: column; } .sidebar { width: 100%; background: #111827; border-right: 1px solid #1f2937; padding: 1.25rem; } .content-area { flex: 1 1 0%; padding: 1.5rem; }
.file-box { border: 1px solid #1f2937; border-radius: 1rem; overflow: hidden; } .file-box-head { padding: .875rem 1rem; background: #1f2937; font-weight: 500; } .file-empty { padding: 1rem; color: #9ca3af; } .file-link { display: block; padding: .875rem 1rem; color: #e5e7eb; border-top: 1px solid #1f2937; } .file-link:hover, .file-link.active { background: #1f2937; } .file-link.active { color: #93c5fd; }
.code-panel { overflow: hidden; padding: 0; } .code-head { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1rem; background: #1f2937; border-bottom: 1px solid #374151; } .code-pre { margin: 0; } .markdown-wrap { padding: 1.5rem; }
.md-h1 { font-size: 1.875rem; font-weight: 700; margin: .5rem 0 1rem; } .md-h2 { font-size: 1.5rem; font-weight: 600; margin: 1.25rem 0 .75rem; } .md-h3 { font-size: 1.25rem; font-weight: 600; margin: 1rem 0 .5rem; } .md-p { margin: .5rem 0; line-height: 1.75; color: #e5e7eb; } .md-list { margin: .75rem 0 .75rem 1.5rem; color: #e5e7eb; } .md-list li + li { margin-top: .25rem; } .md-spacer { height: .5rem; } .md-inline-code { background: #1f2937; padding: .1rem .35rem; border-radius: .35rem; font-size: .92em; } .md-code-block { background: #030712; border: 1px solid #1f2937; border-radius: .875rem; padding: 1rem; overflow: auto; }
.empty-state { text-align: center; color: #d1d5db; }
.project-thumb-wrap { margin: -0.5rem -0.5rem 1rem; } .project-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 0.875rem; border: 1px solid #1f2937; background: #0b1220; }
.screenshot-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; } .screenshot-card { display: block; border: 1px solid #1f2937; border-radius: 1rem; overflow: hidden; background: #0b1220; } .screenshot-img { display: block; width: 100%; max-height: 28rem; object-fit: cover; }
.file-admin-list { border: 1px solid #1f2937; border-radius: 1rem; overflow: hidden; } .file-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.875rem 1rem; border-top: 1px solid #1f2937; } .file-admin-row:first-child { border-top: 0; } .file-admin-name { color: #e5e7eb; word-break: break-word; }

.tree-nav { padding: .25rem 0; }
.tree-dir, .tree-file { display: block; }
.tree-dir-toggle { width: 100%; background: transparent; border: 0; color: #e5e7eb; text-align: left; cursor: pointer; padding: .6rem 1rem; padding-left: calc(1rem + (var(--tree-level, 0) * 1rem)); display: flex; align-items: center; gap: .5rem; border-top: 1px solid #1f2937; }
.tree-dir-toggle:hover { background: #1f2937; }
.tree-dir:first-child > .tree-dir-toggle { border-top: 0; }
.tree-dir-label { font-weight: 600; color: #d1d5db; }
.tree-chevron { display: inline-block; transition: transform .18s ease; color: #9ca3af; width: .8rem; }
.tree-dir.open > .tree-dir-toggle .tree-chevron { transform: rotate(90deg); }
.tree-dir-children { display: none; }
.tree-dir.open > .tree-dir-children { display: block; }
.tree-file { padding-left: calc(2.2rem + (var(--tree-level, 0) * 1rem)); }

@media (min-width: 768px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .project-layout { flex-direction: row; } .sidebar { width: 20rem; } .content-area { padding: 2rem; } }
@media (min-width: 1280px) { .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .header-inner { display: block; } .header-inner .button-row { margin-top: 1rem; } .panel { padding: 1.5rem; } .main-spacing { padding-top: 1.5rem; padding-bottom: 1.5rem; } .project-card-top, .editor-head, .code-head { display: block; } .project-card-top .badge, .editor-head .text-small { display: inline-block; margin-top: .75rem; } .code-head .btn { margin-top: .75rem; } }
