:root {
    --bg-main: #0a0a0c;
    --bg-card: #141419;
    --bg-nav: rgba(18, 18, 24, 0.85);
    --accent: #ff2a5f;
    --accent-hover: #ff0040;
    --text-primary: #f0f0f5;
    --text-secondary: #8a8a9e;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    padding-bottom: 75px;
    -webkit-tap-highlight-color: transparent;
}

/* --- HEADER & DESKTOP NAV --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }

.desktop-nav {
    display: none;
    gap: 20px;
}
.desktop-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.desktop-nav a:hover, .desktop-nav a.active { color: var(--accent); }

/* --- SEARCH BAR --- */
.search-container { padding: 12px 16px; max-width: 1400px; margin: 0 auto; }
.search-form {
    display: flex;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.08);
}
.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}
.search-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* --- PAGE TITLE / TAXONOMY HEADER --- */
.page-title {
    padding: 10px 16px 20px;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-title span { color: var(--accent); }

/* --- GRID SYSTEM --- */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
    border: 1px solid rgba(255,255,255,0.03);
}
.card:active { transform: scale(0.97); }

.thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #1a1a22;
}
.thumb-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.badge-hd {
    position: absolute;
    top: 6px; right: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}
.duration {
    position: absolute;
    bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.75);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.card-info { padding: 10px; }
.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.card-code { font-size: 0.75rem; color: var(--accent); font-weight: 700; }

/* --- TAXONOMY ITEM CARDS (Grid view for Actresses, Categories, Studios) --- */
.taxonomy-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.taxonomy-card:hover { border-color: var(--accent); }

/* --- MOBILE BOTTOM NAV --- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
}
.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}
.nav-item.active { color: var(--accent); }

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (min-width: 640px) {
    .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0 20px; }
    body { padding-bottom: 0; }
    .bottom-nav { display: none; }
    .desktop-nav { display: flex; }
}

@media (min-width: 1024px) {
    .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1400px; margin: 0 auto; }
}

.card:focus, .taxonomy-card:focus, .search-btn:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}