/* ============================================
   WeaponSkin Documentation - Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-primary: #58a6ff;
    --accent-secondary: #1f6feb;
    --accent-success: #3fb950;
    --accent-warning: #d29922;
    --accent-danger: #f85149;
    --border-color: #30363d;
    --code-bg: #161b22;
    --sidebar-width: 280px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-logo-icon {
    font-size: 1.5rem;
}

.sidebar-logo-text {
    font-size: 1.25rem;
    font-weight: 600;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1rem;
}

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border-left-color: var(--accent-primary);
}

.nav-link.active {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border-left-color: var(--accent-primary);
}

.nav-link-icon {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
    max-width: 1200px;
}

/* Header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Code Blocks */
code {
    background-color: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
}

pre {
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Code Syntax Highlighting (Basic) */
.language-yaml .key { color: #79c0ff; }
.language-yaml .value { color: #a5d6ff; }
.language-yaml .comment { color: var(--text-secondary); }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-tertiary);
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

/* Cards */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-header {
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    transition: border-color 0.2s ease;
}

.feature-card:hover {
    border-color: var(--accent-primary);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.feature-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Alert/Callout */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-info {
    background-color: rgba(56, 139, 253, 0.15);
    border-left-color: var(--accent-primary);
}

.alert-warning {
    background-color: rgba(210, 153, 34, 0.15);
    border-left-color: var(--accent-warning);
}

.alert-success {
    background-color: rgba(63, 185, 80, 0.15);
    border-left-color: var(--accent-success);
}

.alert-danger {
    background-color: rgba(248, 81, 73, 0.15);
    border-left-color: var(--accent-danger);
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-primary);
    text-decoration: none;
}

/* Steps */
.steps {
    counter-reset: step;
    margin: 1.5rem 0;
}

.step {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background-color: var(--accent-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.step-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content {
    color: var(--text-secondary);
}

/* File Tree */
.file-tree {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
}

.file-tree-item {
    padding: 0.25rem 0;
}

.file-tree-folder {
    color: var(--accent-primary);
}

.file-tree-file {
    color: var(--text-secondary);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-required {
    background-color: rgba(248, 81, 73, 0.2);
    color: var(--accent-danger);
}

.badge-optional {
    background-color: rgba(63, 185, 80, 0.2);
    color: var(--accent-success);
}

.badge-default {
    background-color: rgba(56, 139, 253, 0.2);
    color: var(--accent-primary);
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
}

.footer a {
    color: var(--text-secondary);
}

.footer a:hover {
    color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Variable Highlighting for Documentation */
.var-namespace {
    color: #58a6ff;
    font-weight: 600;
    background-color: rgba(88, 166, 255, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.var-model {
    color: #3fb950;
    font-weight: 600;
    background-color: rgba(63, 185, 80, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.var-texture {
    color: #d29922;
    font-weight: 600;
    background-color: rgba(210, 153, 34, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.var-item-id {
    color: #a371f7;
    font-weight: 600;
    background-color: rgba(163, 113, 247, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.var-your-name {
    color: #f85149;
    font-weight: 600;
    background-color: rgba(248, 81, 73, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.var-skin-id {
    color: #ff7b72;
    font-weight: 600;
    background-color: rgba(255, 123, 114, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}
