:root {
    --bg: #101018;
    --panel: rgba(24, 25, 33, 0.82);
    --panel-strong: rgba(32, 33, 43, 0.94);
    --line: rgba(255, 255, 255, 0.08);
    --text: #f1edf2;
    --muted: #a3a0ad;
    --quiet: #74717e;
    --teal: #26c8bd;
    --rose: #e48bb4;
    --gold: #e5c776;
    --blue: #65a6e8;
    --danger: #ff6d98;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(16, 16, 24, 0.78), rgba(16, 16, 24, 0.96)),
        linear-gradient(135deg, #0f1017 0%, #1d1b24 46%, #11161a 100%);
    font-family: "MiSans", "Microsoft YaHei", "Segoe UI", sans-serif;
    letter-spacing: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.055;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 42px 42px;
}

button,
input,
a {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid rgba(38, 200, 189, 0.66);
    outline-offset: 3px;
}

button {
    border: 0;
    color: var(--text);
    cursor: pointer;
}

.asmr-main {
    min-width: 0;
    padding: 18px 22px 130px;
}

.asmr-header {
    max-width: 1420px;
    margin: 0 auto 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.asmr-kicker {
    margin: 0;
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.asmr-header h1 {
    margin: 4px 0 0;
    font-size: clamp(28px, 3.8vw, 44px);
    line-height: 1;
}

.asmr-subtitle {
    max-width: 640px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
}

.asmr-detail-actions button,
.icon-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.asmr-detail-actions button:hover,
.icon-button:hover {
    transform: translateY(-1px);
    border-color: rgba(38, 200, 189, 0.42);
    background: rgba(38, 200, 189, 0.14);
}

.asmr-toolbar {
    max-width: 1420px;
    margin: 0 auto 10px;
    display: grid;
    grid-template-columns: minmax(240px, 520px) max-content;
    align-items: end;
    gap: 14px;
}

.asmr-search {
    display: grid;
    gap: 7px;
}

.asmr-search span {
    color: var(--muted);
    font-size: 12px;
}

.asmr-search input {
    width: 100%;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--text);
    background: rgba(8, 8, 12, 0.58);
    border: 1px solid var(--line);
    outline: none;
}

.asmr-search input::placeholder {
    color: rgba(241, 237, 242, 0.36);
}

.asmr-stats {
    min-height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 12px;
    color: var(--muted);
    background: rgba(8, 8, 12, 0.46);
    border: 1px solid var(--line);
    white-space: nowrap;
}

.asmr-content {
    max-width: 1420px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.55fr);
    gap: 12px;
    align-items: start;
}

.asmr-list-panel,
.asmr-detail-panel {
    min-height: 430px;
    border-radius: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.asmr-list-panel {
    padding: 10px;
}

.asmr-detail-panel {
    position: sticky;
    top: 18px;
    overflow: hidden;
}

.asmr-work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.asmr-work-group {
    width: 100%;
    min-height: 52px;
    padding: 0 12px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    text-align: left;
    border-radius: 8px;
    color: var(--text);
    background: rgba(38, 200, 189, 0.10);
    border: 1px solid rgba(38, 200, 189, 0.20);
}

.asmr-work-group:hover,
.asmr-work-group.is-active {
    background: rgba(38, 200, 189, 0.16);
    border-color: rgba(38, 200, 189, 0.36);
}

.asmr-work-group-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #101018;
    background: var(--gold);
    font-weight: 800;
}

.asmr-work-group-body {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.asmr-work-group-body strong,
.asmr-work-group-body small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asmr-work-group-body strong {
    font-size: 14px;
}

.asmr-work-group-body small {
    color: var(--muted);
    font-size: 11px;
}

.asmr-work-group-list {
    display: grid;
    gap: 7px;
    padding-left: 16px;
    border-left: 1px solid rgba(38, 200, 189, 0.18);
}

.asmr-work-group-list .asmr-work-card {
    grid-template-columns: 56px minmax(0, 1fr);
}

.asmr-work-group-list .asmr-work-cover {
    width: 56px;
    min-height: 56px;
}

.asmr-work-card {
    min-width: 0;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
    color: var(--text);
    background: rgba(10, 10, 15, 0.64);
    border: 1px solid var(--line);
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: stretch;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.asmr-work-card:hover,
.asmr-work-card.is-active {
    transform: translateY(-2px);
    border-color: rgba(38, 200, 189, 0.42);
    background: rgba(22, 36, 37, 0.76);
}

.asmr-work-cover {
    width: 64px;
    min-height: 64px;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(38, 200, 189, 0.22), rgba(228, 139, 180, 0.14)),
        rgba(255, 255, 255, 0.04);
}

.asmr-work-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.asmr-cover-placeholder {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.08);
    font-size: 24px;
}

.asmr-work-body {
    padding: 9px 10px;
    display: grid;
    gap: 8px;
}

.asmr-work-title {
    min-height: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.asmr-work-meta,
.asmr-work-desc,
.asmr-browser-head p,
#asmrDetailDesc,
.asmr-player-copy span {
    color: var(--muted);
}

.asmr-work-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 11px;
}

.asmr-work-meta span {
    min-width: 0;
    padding: 5px 7px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asmr-empty-detail {
    min-height: 148px;
    padding: 18px;
    display: grid;
    place-content: center;
    gap: 10px;
    text-align: center;
}

.asmr-empty-detail h2,
.asmr-detail h2,
.asmr-browser-head h3 {
    margin: 0;
}

.asmr-empty-detail p {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
}

.asmr-detail {
    display: grid;
}

.asmr-detail-top {
    padding: 12px;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.asmr-cover-wrap {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(38, 200, 189, 0.22), rgba(228, 139, 180, 0.14)),
        rgba(255, 255, 255, 0.04);
}

.asmr-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asmr-detail-copy {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 10px;
}

.asmr-detail h2 {
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.18;
    overflow-wrap: anywhere;
}

#asmrDetailDesc {
    margin: 0;
    line-height: 1.55;
    font-size: 13px;
}

.asmr-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.asmr-tags span {
    min-height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #d9f8f6;
    background: rgba(38, 200, 189, 0.12);
    border: 1px solid rgba(38, 200, 189, 0.22);
    font-size: 12px;
}

.asmr-tags span.is-voice {
    color: #fff4d5;
    background: rgba(229, 199, 118, 0.13);
    border-color: rgba(229, 199, 118, 0.26);
}

.asmr-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.asmr-detail-actions button {
    min-width: 96px;
    min-height: 36px;
    padding: 0 14px;
    background: rgba(38, 200, 189, 0.18);
    border-color: rgba(38, 200, 189, 0.26);
}

.asmr-detail-actions button.secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line);
}

.asmr-browser-head {
    padding: 10px 12px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.asmr-browser-head p {
    margin: 5px 0 0;
    font-size: 12px;
}

.icon-button {
    width: 34px;
    height: 34px;
    padding: 0;
    flex: 0 0 auto;
    font-size: 28px;
}

.asmr-breadcrumbs {
    padding: 0 12px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.asmr-breadcrumbs button {
    min-height: 28px;
    padding: 0 9px;
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.asmr-breadcrumbs button:hover,
.asmr-breadcrumbs button.is-active {
    color: var(--text);
    border-color: rgba(38, 200, 189, 0.25);
}

.asmr-browser-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.72fr);
    min-height: 280px;
    border-top: 1px solid var(--line);
}

.asmr-file-list {
    max-height: min(52vh, 620px);
    overflow-y: auto;
    border-top: 0;
    border-right: 1px solid var(--line);
    scrollbar-width: thin;
    scrollbar-color: rgba(38, 200, 189, 0.38) rgba(255, 255, 255, 0.04);
}

.asmr-file-row {
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: var(--text);
    background: transparent;
    border-bottom: 1px solid var(--line);
}

.asmr-file-row:hover,
.asmr-file-row.is-active,
.asmr-file-row.is-previewed {
    background: rgba(38, 200, 189, 0.12);
}

.asmr-file-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #101018;
    background: var(--blue);
}

.asmr-file-row[data-kind="folder"] .asmr-file-icon {
    background: var(--gold);
}

.asmr-file-row[data-kind="image"] .asmr-file-icon {
    background: var(--rose);
}

.asmr-file-row[data-kind="video"] .asmr-file-icon {
    background: var(--blue);
}

.asmr-file-row[data-kind="text"] .asmr-file-icon {
    background: var(--teal);
}

.asmr-file-name {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.asmr-file-name strong,
.asmr-player-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asmr-file-name small,
.asmr-file-size {
    color: var(--muted);
    font-size: 12px;
}

.asmr-file-size {
    white-space: nowrap;
}

.asmr-preview {
    min-width: 0;
    max-height: min(52vh, 620px);
    overflow: auto;
    background: rgba(8, 8, 12, 0.26);
}

.asmr-preview-empty {
    min-height: 100%;
    padding: 22px;
    display: grid;
    place-content: center;
    gap: 8px;
    color: var(--muted);
    text-align: center;
}

.asmr-preview-empty h3 {
    margin: 0;
    color: var(--text);
}

.asmr-preview-empty p {
    margin: 0;
    line-height: 1.6;
}

.asmr-preview-head {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
    background: rgba(18, 18, 25, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.asmr-preview-head strong,
.asmr-preview-head span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asmr-preview-head span {
    color: var(--muted);
    font-size: 12px;
}

.asmr-preview-image-link {
    padding: 12px;
    display: block;
}

.asmr-preview-image-link img {
    width: 100%;
    max-height: 460px;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.18);
}

.asmr-preview-video {
    width: calc(100% - 24px);
    max-height: 460px;
    margin: 12px;
    display: block;
    border-radius: 6px;
    background: #000;
}

.asmr-caption-preview,
.asmr-audio-caption-preview {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.asmr-video-caption-wrap {
    position: relative;
    display: grid;
}

.asmr-video-caption-wrap .asmr-preview-video {
    width: 100%;
    margin: 0;
}

.asmr-audio-caption-now {
    padding: 12px;
    border-radius: 6px;
    color: var(--text);
    background: rgba(38, 200, 189, 0.10);
    border: 1px solid rgba(38, 200, 189, 0.18);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.asmr-caption-panel {
    min-height: 0;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(8, 8, 12, 0.34);
    border: 1px solid var(--line);
}

.asmr-caption-status {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 10px;
    color: var(--muted);
    background: rgba(18, 18, 25, 0.94);
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.asmr-caption-list {
    min-height: 156px;
    display: grid;
    grid-template-rows: repeat(3, minmax(52px, auto));
    overflow: hidden;
}

.asmr-caption-cue {
    width: 100%;
    min-height: 52px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    text-align: left;
    color: var(--text);
    background: transparent;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
}

.asmr-caption-cue:hover {
    background: rgba(38, 200, 189, 0.13);
}

.asmr-caption-cue.is-active {
    background: rgba(38, 200, 189, 0.18);
    border-left-color: var(--teal);
}

.asmr-caption-cue span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.asmr-caption-cue strong {
    min-width: 0;
    font-weight: 600;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.asmr-preview-text {
    margin: 0;
    padding: 12px;
    color: #e8e6ec;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: 13px/1.7 "Microsoft YaHei", "Segoe UI", sans-serif;
}

.asmr-player {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: min(332px, calc(100vw - 36px));
    padding: 12px 14px 14px;
    display: grid;
    gap: 10px;
    border-radius: 8px;
    background: rgba(29, 29, 35, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
    z-index: 20;
}

.asmr-player-toggle-size {
    width: 100%;
    height: 18px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: transparent;
}

.asmr-player-toggle-size:hover {
    background: rgba(255, 255, 255, 0.06);
}

.asmr-player-grip {
    width: 76px;
    height: 5px;
    margin: 0 auto 4px;
    display: block;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.asmr-player-cover {
    aspect-ratio: 16 / 10;
    width: 100%;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 6px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(38, 200, 189, 0.22), rgba(228, 139, 180, 0.14)),
        rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.asmr-player-cover img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.asmr-player-cover-fallback {
    grid-area: 1 / 1;
    color: rgba(255, 255, 255, 0.58);
    font-size: 34px;
}

.asmr-player-cover img:not([hidden]) + .asmr-player-cover-fallback {
    display: none;
}

.asmr-player-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
    text-align: center;
}

.asmr-player-copy strong {
    display: block;
    font-size: 14px;
}

.asmr-player-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.asmr-range {
    width: 100%;
    accent-color: var(--teal);
}

.asmr-time {
    display: flex;
    justify-content: space-between;
    color: #d7d6df;
    font-size: 12px;
}

.asmr-controls {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    gap: 8px;
}

.asmr-controls button {
    height: 40px;
    border-radius: 999px;
    color: #f6f4f7;
    background: transparent;
}

.asmr-controls button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.asmr-controls .play-button {
    width: 48px;
    height: 48px;
    justify-self: center;
    color: #101018;
    background: #f3f0f4;
    font-size: 19px;
}

.asmr-controls .play-button:hover {
    background: #ffffff;
}

.asmr-volume {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: #d7d6df;
}

.asmr-player.is-collapsed {
    width: min(252px, calc(100vw - 36px));
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    padding: 9px 12px;
}

.asmr-player.is-collapsed .asmr-player-toggle-size {
    grid-column: 1 / -1;
    height: 12px;
}

.asmr-player.is-collapsed .asmr-player-grip {
    width: 52px;
    height: 4px;
    margin-bottom: 0;
}

.asmr-player.is-collapsed .asmr-player-cover,
.asmr-player.is-collapsed .asmr-range,
.asmr-player.is-collapsed .asmr-time,
.asmr-player.is-collapsed .asmr-volume,
.asmr-player.is-collapsed #asmrPrev,
.asmr-player.is-collapsed #asmrRewind,
.asmr-player.is-collapsed #asmrForward,
.asmr-player.is-collapsed #asmrNext {
    display: none;
}

.asmr-player.is-collapsed .asmr-player-copy {
    text-align: left;
}

.asmr-player.is-collapsed .asmr-controls {
    display: block;
}

.asmr-player.is-collapsed .asmr-controls .play-button {
    width: 42px;
    height: 42px;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    .asmr-content {
        grid-template-columns: 1fr;
    }

    .asmr-detail-panel {
        position: static;
    }

    .asmr-file-list {
        max-height: none;
    }

    .asmr-browser-grid {
        grid-template-columns: 1fr;
    }

    .asmr-file-list {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .asmr-preview {
        max-height: 420px;
    }
}

@media (max-width: 720px) {
    .asmr-main {
        padding: 22px 12px 310px;
    }

    .asmr-header,
    .asmr-toolbar {
        display: grid;
        gap: 14px;
    }

    .asmr-toolbar {
        grid-template-columns: 1fr;
    }

    .asmr-stats {
        justify-content: flex-start;
        white-space: normal;
    }

    .asmr-work-grid {
        grid-template-columns: 1fr;
    }

    .asmr-detail-top {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .asmr-cover-wrap {
        width: 72px;
    }

    .asmr-file-row {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .asmr-file-size {
        display: none;
    }

    .asmr-player {
        right: 10px;
        bottom: 70px;
        width: calc(100vw - 20px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
