:root,
html[data-theme="dark"] {
    color-scheme: dark;
    --page-bg: #0d0b14;
    --surface-bg: #15121f;
    --surface-soft-bg: #1a1627;
    --surface-hover-bg: #211b31;
    --heading-color: #ffffff;
    --text-color: #d1cbdc;
    --muted-color: #9891aa;
    --line-color: #2b253a;
    --shadow-color: rgba(0, 0, 0, 0.28);
    --switch-aura: linear-gradient(110deg, rgba(126, 80, 255, 0.04), rgba(126, 80, 255, 0.32), rgba(35, 190, 255, 0.16), rgba(126, 80, 255, 0.04));
    --switch-spark: linear-gradient(90deg, transparent, rgba(164, 133, 255, 0.72), rgba(74, 202, 255, 0.5), transparent);
}

html[data-theme="dark"] .info-page,
html[data-theme="dark"] .legal-page {
    --static-page-body-color: #b9b3c4;
}

html[data-theme="dark"] .headgrid div:not(:last-child) a,
html[data-theme="dark"] .headgrid > div.theme-switch {
    border-color: #3b334f;
}

html[data-theme="dark"] .headgrid .app-header-account [data-header-user] {
    border: 0;
    background: transparent;
}

html[data-theme="dark"] .headgrid .app-header-account [data-header-user] button {
    border-color: #3b334f;
    background: #1d182a;
}

html[data-theme="dark"] .headgrid .app-header-account [data-header-user] a {
    border-color: #3b334f !important;
    background: #1d182a !important;
}

html[data-theme="dark"] .headgrid div:not(:last-child) a,
html[data-theme="dark"] .header-search {
    background: #1d182a;
}

html[data-theme="dark"] .single-artist h2:last-child a {
    color: #aaa4bd;
}

html[data-theme="dark"] .theme-switch {
    background: linear-gradient(120deg, #181325, #211832 52%, #14121f);
    border-color: #574473;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(50, 30, 93, 0.24);
}

html[data-theme="dark"] .header-search {
    background: #17131f;
    border-color: #3b334f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

html[data-theme="dark"] .header-search input {
    color: #f1edf9;
}

html[data-theme="dark"] .header-search input::placeholder {
    color: #8f899f;
}

html[data-theme="dark"] .header-search button {
    color: #c1b3ec;
}

html[data-theme="dark"] .header-search button:hover {
    color: #ffffff;
    background: #251d37;
}

html[data-theme="dark"] .sidebarbox {
    background: #15121f;
    border-color: #352d49;
    box-shadow: var(--box-shadow);
}

html[data-theme="dark"] .sidetitle {
    color: #f5f2fc;
    background: transparent;
}

html[data-theme="dark"] .sidetitle-icon {
    color: #a88cff;
}

html[data-theme="dark"] .app-comments-empty-icon {
    background: radial-gradient(circle, rgba(103, 77, 173, 0.4) 0%, rgba(58, 43, 93, 0.19) 64%, transparent 72%);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.38)) brightness(1.1);
}

html[data-theme="dark"] .single-tag {
    color: #c9b8ff;
    background: linear-gradient(135deg, #2b2042 0%, #211931 100%);
    border-color: #43335f;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .single-tag:hover,
html[data-theme="dark"] .single-tag:focus-visible {
    color: #e0d7ff;
    background: #35264f;
}

html[data-theme="dark"] .single-tags-empty {
    color: #a9a2b7;
}

html[data-theme="dark"] .download-item {
    color: #f2eefb;
    background: #181421;
    border-color: #352d49;
}

html[data-theme="dark"] .download-item:hover {
    background: #1e192a;
    border-color: #58467e;
}

html[data-theme="dark"] .download-item-size {
    color: #a9a2b7;
}

html[data-theme="dark"] .download-item-button {
    color: #b59cff;
    background: #211a31;
    border-color: #42355c;
}

html[data-theme="dark"] .download-item:hover .download-item-button {
    color: #ffffff;
    background: #7548ef;
    border-color: #7548ef;
    box-shadow: none;
}

html[data-theme="dark"] .theme-toggle {
    border-color: #4a3d68;
    background: #29213d;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25), 0 0 16px rgba(134, 97, 241, 0.14);
}

html[data-theme="dark"] .theme-toggle span {
    left: 24px;
    background: linear-gradient(145deg, #b99fff, #7548ef);
    box-shadow: 0 3px 10px rgba(117, 72, 239, 0.5);
}

html[data-theme="dark"] .theme-icon-moon {
    color: var(--primary-color);
    opacity: 1;
}

html[data-theme="dark"] .slider-shadow {
    /* Match light mode: solid at the right edge across the right-most 60%. */
    background: linear-gradient(90deg, rgba(8, 7, 13, 0) 0%, rgba(8, 7, 13, 0) 40%, rgba(8, 7, 13, .42) 65%, rgb(8, 7, 13) 100%);
}

html[data-theme="dark"] .slider-artist {
    color: #ffffff;
    border-color: transparent;
    background: transparent;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .slider-artist div {
    color: #c9c2d8;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] [id^="yan-yana-"] > .yan-yana-right,
html[data-theme="dark"] [id^="yan-yana-"] > .yan-yana-left {
    color: #c4b5ff;
    background: #2a2145;
    border: 1px solid #493a70;
    box-shadow: 0 5px 16px rgba(20, 14, 34, 0.4);
}

html[data-theme="dark"] .item-slider-playlist > div > a > div {
    border-color: rgba(202, 188, 236, 0.10);
}

html[data-theme="dark"] .item-slider-lastpost > div {
    border-color: #30273f;
    background: #18141f;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .item-slider-lastpost > div > a > div {
    color: #f4f0fb;
}

html[data-theme="dark"] .item-slider-lastpost > div > a > div > span {
    color: #b6adc7;
}

html[data-theme="dark"] .item-slider-lastpost > div:hover {
    border-color: #604996;
    background: #201a2b;
}

html[data-theme="dark"] .item-slider-studio .studio-tag-more {
    color: #9a78ff;
    border-color: #6145a9;
    background: #211936;
}

html[data-theme="dark"] .item-slider-studio > div > ul > li:nth-child(4) > a,
html[data-theme="dark"] .section-title-studio > div:last-child > a:first-child {
    color: #b9a4ff;
    border-color: #6145a9;
}

html[data-theme="dark"] .site-footer {
    background: var(--page-bg);
    border-color: var(--line-color);
}

html[data-theme="dark"] .footer-app {
    border-color: #392c5d;
    background: radial-gradient(circle at 78% 20%, rgba(134, 97, 241, 0.15), transparent 34%), linear-gradient(115deg, #151120 0%, #1b1529 55%, #12101b 100%);
}

html[data-theme="dark"] .footer-app-content h2 {
    color: var(--heading-color);
}

html[data-theme="dark"] .footer-app-content p,
html[data-theme="dark"] .footer-about > p,
html[data-theme="dark"] .footer-column a,
html[data-theme="dark"] .footer-bottom p,
html[data-theme="dark"] .footer-bottom a {
    color: var(--muted-color);
}

html[data-theme="dark"] .footer-column a:hover,
html[data-theme="dark"] .footer-bottom a:hover {
    color: #ffffff;
}

html[data-theme="dark"] .footer-wave,
html[data-theme="dark"] .footer-bottom {
    border-color: var(--line-color);
}

html[data-theme="dark"] .footer-social a {
    background: var(--surface-bg);
    border-color: #352b4d;
}

html[data-theme="dark"] .footer-social a:hover {
    color: #7548ef;
    background: #ffffff;
    border-color: #ffffff;
}
