/* ============================================================
   CSS custom properties — change palette here only
   ============================================================ */
:root {
    --bg:           #111827;
    --bg-card:      #1f2937;
    --bg-hover:     #374151;
    --text:         #f9fafb;
    --text-muted:   #9ca3af;
    --blue:         #3b82f6;
    --blue-dark:    #2563eb;
    --yellow:       #f59e0b;
    --yellow-dark:  #d97706;
    --border:       #374151;
    --header-bg:    #0f172a;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.container { flex: 1; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.3; font-weight: 700; }

/* ============================================================
   Layout utilities
   ============================================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.container--narrow {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.layout__main { min-width: 0; }

@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .layout__sidebar { order: -1; }
}

/* ============================================================
   Header & navigation
   ============================================================ */
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--border); }

.nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--yellow);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.nav-logo:hover { color: var(--yellow-dark); text-decoration: none; }

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-auth { margin-left: auto; flex-shrink: 0; }
.nav-auth a { color: var(--text-muted); font-size: 0.9rem; }

/* ============================================================
   Alphabetical nav
   ============================================================ */
.alpha-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    max-width: 100%;
}

.alpha-nav a {
    color: var(--text-muted);
    padding: 0.3rem 0.55rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.15s, color 0.15s;
}

.alpha-nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.alpha-nav a.active { background: var(--blue); color: #fff; }

/* ============================================================
   Page headings
   ============================================================ */
.page-title {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text);
    border-bottom: 2px solid var(--yellow);
    padding-bottom: 0.4rem;
    display: inline-block;
}

/* ============================================================
   Model card grid
   ============================================================ */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    color: var(--text);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    text-decoration: none;
    display: block;
}

.model-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    border-color: var(--blue);
    text-decoration: none;
    color: var(--text);
}

.model-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.model-card__no-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.model-card__body { padding: 0.65rem 0.75rem; }

.model-card__name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-card__people {
    font-size: 0.6rem;
    font-weight: normal;
    color: var(--text-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-card__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ============================================================
   Image grid (gallery detail)
   ============================================================ */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.image-grid__item { display: flex; flex-direction: column; }

.image-grid__item a { display: block; line-height: 0; }

.image-grid__item img {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 4px 4px 0 0;
    object-fit: cover;
    cursor: pointer;
}

.image-info {
    background: var(--bg-card);
    border-radius: 0 0 4px 4px;
    padding: 0.4rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.image-info__desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin: 0;
}


/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox.is-open { display: flex; }

.lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 2px;
    display: block;
}

.lightbox__btn {
    position: fixed;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 1rem;
    opacity: 0.6;
    transition: opacity 0.15s;
    line-height: 1;
    font-size: 3rem;
}
.lightbox__btn:hover { opacity: 1; }

.lightbox__close {
    top: 0.75rem;
    right: 1rem;
    font-size: 2.5rem;
}
.lightbox__prev {
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}
.lightbox__next {
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.image-info .tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    line-height: 1;
}

/* ============================================================
   Explicit content placeholder
   ============================================================ */
.explicit-placeholder {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    aspect-ratio: 4 / 5;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.explicit-placeholder__icon {
    width: 50%;
    aspect-ratio: 1;
    background-color: var(--text-muted);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

/* ============================================================
   Profile (person detail)
   ============================================================ */
.profile {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    align-items: flex-start;
}

@media (max-width: 600px) { .profile { flex-direction: column; } }

.profile__info { flex: 1; min-width: 0; }

.profile__photo img {
    border-radius: 8px;
    width: 260px;
    object-fit: cover;
    flex-shrink: 0;
}

.profile__name-box {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
}

.profile__social-box {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.profile__social-heading {
    width: 100%;
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-muted);
    margin: 0 0 0.25rem;
}

.profile__tags-box {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.profile__tags-heading {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}

.profile__social-link img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
    transition: opacity 0.15s;
}

.profile__social-link:hover img { opacity: 0.75; }

.profile__name { font-size: 2rem; margin: 0; }

.profile__aliases {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.3rem 0 0;
}

.profile__meta { color: var(--text-muted); margin-bottom: 1rem; }
.profile__bio { margin-bottom: 1rem; line-height: 1.7; }

.profile__tags, .profile__links { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ============================================================
   Gallery detail extras
   ============================================================ */
.gallery-cast { color: var(--text-muted); margin-bottom: 0.5rem; }
.gallery-cast a { color: var(--blue); }
.gallery-description { color: var(--text-muted); margin-bottom: 1.25rem; }

/* ============================================================
   Tags
   ============================================================ */
.tag {
    display: inline-block;
    background: var(--bg-hover);
    color: var(--text-muted);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.tag:hover {
    background: var(--yellow);
    color: #111;
    text-decoration: none;
}

.tag--large {
    font-size: 0.9rem;
    padding: 0.35rem 0.8rem;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* ============================================================
   Birthday page
   ============================================================ */
.birthday-group { margin-bottom: 2.5rem; }

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--blue);
    color: #fff;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}
.btn-primary:hover { background: var(--blue-dark); color: #fff; text-decoration: none; }

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }

.btn-secondary {
    display: inline-block;
    padding: 0.45rem 1rem;
    background: var(--yellow);
    color: #111;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}
.btn-secondary:hover { background: var(--yellow-dark); color: #111; text-decoration: none; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.4rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.page-link:hover { background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none; }
.page-link--current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ============================================================
   Ad slots
   ============================================================ */
.ad-leaderboard {
    text-align: center;
    padding: 0.5rem 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-leaderboard--bottom {
    border-bottom: none;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.ad-sidebar {
    min-height: 252px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

@media (max-width: 480px) {
    .ad-leaderboard { min-height: 52px; }
}

/* ============================================================
   Misc
   ============================================================ */
.empty-state { color: var(--text-muted); padding: 2rem 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: var(--header-bg);
    border-top: 1px solid var(--border);
    padding: 1.75rem 1rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
