:root {
    --bg: #0f1117;
    --sidebar: #151823;
    --panel: #1c1f2b;
    --panel-alt: #232737;
    --text: #f6f7fb;
    --text-dim: #9aa4c2;
    --accent: #f7c873;
    --radius: 20px;
    font-family: 'Space Grotesk', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.sidebar-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--sidebar);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.sidebar__brand a {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: radial-gradient(circle at top, #ffd184, #f14658);
    box-shadow: 0 15px 30px rgba(241, 70, 88, 0.35);
}

.brand-text strong {
    display: block;
    font-size: 1.1rem;
}

.brand-text small {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.sidebar__search {
    display: flex;
    gap: 0.5rem;
    border-radius: 999px;
    background: rgba(246, 247, 251, 0.04);
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar__search input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    color: var(--text);
}

.sidebar__search button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    cursor: pointer;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text-dim);
}

.sidebar__nav p {
    margin: 0 0 0.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text);
}

.sidebar__nav a {
    padding: 0.25rem 0.4rem;
    border-radius: 8px;
}

.sidebar__nav a:hover {
    background: rgba(247, 200, 115, 0.1);
    color: var(--accent);
}

.sidebar__toggle {
    display: none;
    position: absolute;
    top: 1.5rem;
    right: -52px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.sidebar__toggle span {
    width: 18px;
    height: 2px;
    background: #1d1f29;
}

.content {
    flex: 1;
    padding: 2rem clamp(1rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.board {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 60px rgba(5, 8, 15, 0.45);
}

.board__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.board__head p {
    margin: 0;
    font-size: 1.2rem;
}

.board__head span {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.board__head a {
    padding: 0.35rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(247, 200, 115, 0.3);
    color: var(--accent);
}

.board__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
}

.board__grid--list {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.card {
    background: var(--panel-alt);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card--row {
    flex-direction: row;
}

.card__cover {
    position: relative;
    flex: 0 0 160px;
}

.card__cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

.card--row .card__cover img {
    height: 100%;
    aspect-ratio: auto;
}

.card__cover span {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: rgba(0, 0, 0, 0.65);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.card__info {
    padding: 0.9rem 1rem 1.2rem;
}

.card__title {
    font-size: 1rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__info p {
    margin: 0.3rem 0 0;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.card__meta {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.card__meta span {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
}

.empty {
    text-align: center;
    color: var(--text-dim);
}

.pager {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.pager a {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pager .disabled {
    opacity: 0.3;
    pointer-events: none;
}

.board--detail .detail-top {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
}

.detail-top__cover {
    position: relative;
}

.detail-top__cover img {
    width: 100%;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-top__cover span {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.2rem 0.9rem;
    border-radius: 999px;
}

.detail-top__info h1 {
    margin: 0.4rem 0;
    font-size: 1.8rem;
}

.detail-cast {
    color: var(--text-dim);
    margin: 0;
}

.detail-meta {
    display: flex;
    gap: 0.4rem;
    margin: 0.8rem 0;
    flex-wrap: wrap;
}

.detail-meta span {
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
}

.detail-tags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.7rem;
}

.detail-tags label {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.detail-content {
    color: var(--text-dim);
    line-height: 1.8;
    white-space: pre-line;
}

.player-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-screen {
    border-radius: 18px;
    background: #000;
    overflow: hidden;
}

#artplayer-container {
    width: 100%;
    height: clamp(240px, 50vw, 520px);
}

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.control-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.control-row span {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.chip {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    padding: 0.25rem 0.9rem;
    cursor: pointer;
}

.chip.active,
.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    padding: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        transform: translateX(-100%);
        transition: 0.3s;
        z-index: 10;
    }
    .sidebar[data-open="true"] {
        transform: translateX(0);
    }
    .sidebar__toggle {
        display: flex;
    }
    .content {
        margin-left: 0;
        padding-top: 4rem;
    }
}

@media (max-width: 640px) {
    .board__grid--list {
        grid-template-columns: 1fr;
    }
    .card--row {
        flex-direction: column;
    }
    .board--detail .detail-top {
        grid-template-columns: 1fr;
    }
}

