/* genre.php — extracted from $pageInlineStyle (2026-08-10). Loaded via $pageCss. */
/* ===== Genre Page ===== */
.genre-page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 80px;
}
.genre-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.genre-page-header h2 {
    font-weight: 800;
    font-size: 1.6rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}
.genre-page-header h2 i {
    color: var(--accent-light);
}
.genre-page-header .genre-total {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Search box */
.genre-search-box {
    position: relative;
    max-width: 360px;
    width: 100%;
    margin-bottom: 24px;
}
.genre-search-box input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px 12px 42px;
    color: #fff;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}
.genre-search-box input::placeholder { color: var(--text-muted); }
.genre-search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.genre-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}
.genre-search-box .search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: none;
    padding: 2px;
    line-height: 1;
}
.genre-search-box .search-clear:hover { color: #fff; }

/* Card grid */
.genre-page-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.gp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 14px 22px;
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    overflow: hidden;
    text-align: center;
    cursor: pointer;
}
.gp-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(145deg, var(--gc-from), var(--gc-to));
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 0;
}
.gp-card:hover::before { opacity: .18; }
.gp-card:hover {
    border-color: var(--gc-from);
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 0 24px color-mix(in srgb, var(--gc-from) 30%, transparent);
    text-decoration: none;
    color: #fff;
}
.gp-card-icon {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--gc-from), var(--gc-to));
    color: #fff;
    margin-bottom: 14px;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--gc-from) 40%, transparent);
}
.gp-card-name {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gp-card-count {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* No-results */
.genre-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.genre-no-results i { font-size: 2.5rem; margin-bottom: 12px; display: block; opacity: .4; }

/* Animation */
.gp-card { animation: gpFadeIn .4s ease both; }
@keyframes gpFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .genre-page-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .genre-page-wrap { padding: 16px 12px 60px; }
    .genre-page-header { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 18px; }
    .genre-page-header h2 { font-size: 1.2rem; }
    .genre-page-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .gp-card { padding: 20px 10px 16px; }
    .gp-card-icon { width: 44px; height: 44px; font-size: 1.15rem; margin-bottom: 10px; }
    .gp-card-name { font-size: 0.78rem; }
    .gp-card-count { font-size: 0.68rem; }
    .genre-search-box { max-width: 100%; }
    .genre-paging button { min-width: 34px; height: 34px; font-size: 0.78rem; }
}
@media (max-width: 480px) {
    .genre-page-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gp-card { padding: 16px 8px 12px; }
    .gp-card-icon { width: 38px; height: 38px; font-size: 1rem; margin-bottom: 8px; }
    .gp-card-name { font-size: 0.72rem; }
}

/* ===== Pagination ===== */
.genre-paging {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.genre-paging button {
    min-width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}
.genre-paging button:hover {
    background: rgba(108,92,231,0.15);
    border-color: var(--accent);
    color: #fff;
}
.genre-paging button.gp-active {
    background: var(--gradient-1);
    border-color: var(--accent-light);
    color: #fff;
    box-shadow: 0 3px 12px var(--accent-glow);
    pointer-events: none;
}
.genre-paging button:disabled {
    opacity: .35;
    pointer-events: none;
}
.genre-paging-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: center;
}

/* ===== LIGHT MODE ===== */
[data-theme="light"] .genre-page-header h2 { color: #1a1a2e; }
[data-theme="light"] .genre-search-box input {
    background: #ffffff;
    color: #1a1a2e;
    border-color: rgba(108,92,231,0.15);
}
[data-theme="light"] .genre-search-box input::placeholder { color: #8888a0; }
[data-theme="light"] .genre-search-box .search-clear:hover { color: #1a1a2e; }
[data-theme="light"] .gp-card {
    background: linear-gradient(145deg, rgba(108,92,231,0.03) 0%, #ffffff 100%);
    border-color: rgba(108,92,231,0.10);
    color: #555570;
}
[data-theme="light"] .gp-card:hover {
    color: #1a1a2e;
    box-shadow: 0 12px 32px rgba(108,92,231,0.12), 0 0 24px color-mix(in srgb, var(--gc-from) 15%, transparent);
}
[data-theme="light"] .gp-card-name { color: #1a1a2e; }
[data-theme="light"] .genre-paging button {
    background: #ffffff;
    border-color: rgba(108,92,231,0.12);
    color: #555570;
}
[data-theme="light"] .genre-paging button:hover {
    background: rgba(108,92,231,0.08);
    color: var(--accent);
}
[data-theme="light"] .genre-paging button.gp-active { color: #fff; }
