:root {
    --bg: #121212;
    --surface: #1a1a1a;
    --border: #2a2a2a;
    --text: #e0e0e0;
    --muted: #888888;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
}

main {
    width: min(75ch, 100% - 2rem);
    margin-inline: auto;
    margin-top:40px;
    margin-bottom:48px;
}

/* Batasi lebar halaman detail viewer saja agar teks/gambar tidak melebar terlalu ekstrim */
body:has(.detail-layout) main {
    max-width: 800px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h1, h2, h3 {
    margin: 0;
    color: var(--text);
}

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

.btn-link {
    border: 1px solid var(--border);
    padding: 6px 12px;
    background: var(--surface);
    font-size: 0.9em;
}

.btn-link:hover {
    background: var(--border);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
}

input[type="text"] {
    width: 100%;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    box-sizing: border-box;
}

button {
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
}

.navigation-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.grid-layout, .gallery-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.creator-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 8px;
    min-height: 120px;
    background-size: cover;
    background-position: center;
    box-sizing: border-box;
}

.gallery-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.creator-card:hover, .gallery-card:hover {
    border-color: var(--text);
}

.service-badge {
    font-size: 0.75em;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    text-transform: uppercase;
    color: var(--text);
}

.card-title, .gallery-card-title {
    font-weight: bold;
    color: var(--text);
}

.gallery-card-title {
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumb-container {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
}

.thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.85em;
}

.detail-layout {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 20px;
}

.meta {
    font-size: 0.85em;
    color: var(--muted);
    margin: 5px 0 20px 0;
}

.media-container img {
    max-width: 100%;
    height: auto;
    margin-top: 15px;
    border: 1px solid var(--border);
}

.download-link {
    background: var(--bg);
    padding: 10px;
    margin: 10px 0;
    border-left: 2px solid var(--text);
}

.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
}