/* --- GLOBAL STYLES & VARIABLES --- */
:root {
    --bg-dark: #101010;
    --bg-darker: #141414;
    --surface-color: #1E1E1E;
    --primary-color: #f90;
    --text-primary: #ffffff;
    --text-secondary: #b6b6b6;
    --border-color: #2a2a2a;
    --font-family: 'Poppins', sans-serif;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    line-height: 1.7;
    background-color: var(--bg-dark);
}

.container {
    width: 90%;
    margin: 0 auto;
}

/* --- HEADER --- */
.page-header {
    background-color: var(--bg-darker);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.page-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}
.back-link:hover {
    color: var(--primary-color);
}
.logo-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* --- DOCUMENTATION LAYOUT --- */
.doc-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

/* --- SIDEBAR --- */
.doc-sidebar {
    width: 100%;
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
.doc-sidebar nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Membungkus link jika tidak muat */
    gap: 0.5rem;
}
.doc-sidebar nav a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.doc-sidebar nav a:hover {
    background-color: var(--bg-darker);
    color: var(--text-primary);
}
.doc-sidebar nav a.active {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

/* --- MAIN CONTENT --- */
.doc-content section {
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}
.doc-content section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.doc-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.doc-content h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}
.doc-content p, .doc-content li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.doc-content ul, .doc-content ol {
    padding-left: 25px;
}
.doc-content li {
    padding-left: 10px;
}
.doc-content strong {
    color: var(--primary-color);
    font-weight: 500;
}

/* --- UTILITY & DECORATIVE CLASSES --- */
pre {
    background-color: var(--bg-darker);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9rem;
    margin-top: 1rem;
    overflow-x: auto;
}
code {
    font-family: 'Courier New', Courier, monospace;
    color: #a6e22e;
}
.tech-stack-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}
.tech-item {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.tech-item h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1rem;
}
.tech-item ul {
    list-style: disc;
    padding-left: 20px;
}
.tech-item li {
    margin-bottom: 0.5rem;
}

/* STYLING BARU UNTUK DAFTAR TILESET */
.tileset-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.tileset-item {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.tileset-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tileset-item p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.tileset-item pre {
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding: 1rem;
    background-color: var(--bg-dark); /* Sedikit beda untuk kontras */
}

/* STYLING BARU UNTUK KREDIT TIM */
.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}
.credit-item {
    background-color: var(--surface-color);
    padding: 1.25rem;
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
    transition: border-left-color 0.3s ease;
}
.credit-item:hover {
    border-left-color: var(--primary-color);
}
.credit-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}
.credit-item span {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.acknowledgement {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
.acknowledgement h3 {
    border-left: none;
    padding-left: 0;
    margin-top: 0;
    color: var(--primary-color);
}
.acknowledgement p {
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --- FOOTER --- */
.page-footer {
    background-color: var(--bg-darker);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}
.page-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- MEDIA QUERIES FOR RESPONSIVENESS --- */
@media (min-width: 576px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .tech-stack-grid, .tileset-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .doc-wrapper {
        flex-direction: row;
        gap: 3rem;
        align-items: flex-start;
    }
    .doc-sidebar {
        width: 280px;
        flex-shrink: 0;
        position: sticky;
        top: 100px;
    }
    .doc-sidebar nav ul {
        flex-direction: column;
        gap: 0.25rem;
    }
    .doc-content {
        flex-grow: 1;
    }
    .doc-content h2 {
        font-size: 2rem;
    }
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}