body {
    font-family: 'Heebo', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body.playlist-player-active {
    overflow: hidden;
}

body.playlist-player-active .site-footer {
    display: none;
}

.site-footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

:root {
    --lyrics-line-height: 1.8;
    --lyrics-paragraph-spacing: 1em;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 20px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(212, 175, 55, 0.3);
}

.hidden-scrollbar::-webkit-scrollbar {
    display: none;
}

.hidden-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pl-item-active {
    border-right-width: 4px;
    background-color: rgba(23, 42, 88, 0.1);
}

.dark .pl-item-active {
    background-color: rgba(23, 42, 88, 0.5);
}

/* --- Active Navigation State (Glow Effect) --- */
.nav-btn.nav-active {
    color: #1a365d;
    filter: drop-shadow(0 0 6px rgba(26, 54, 93, 0.5));
    background: rgba(26, 54, 93, 0.08);
    box-shadow: none;
    transition: filter 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.dark .nav-btn.nav-active {
    color: #d4af37;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.7));
    background: rgba(212, 175, 55, 0.1);
    box-shadow: none;
}

/* --- Explore Buttons Active State --- */
.explore-btn.active {
    background-color: #1a365d !important;
    color: white !important;
    border-color: #1a365d !important;
}

.dark .explore-btn.active {
    background-color: #d4af37 !important;
    color: #0a1425 !important;
    border-color: #d4af37 !important;
}

/* Security & UX */
.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

input,
textarea {
    -webkit-user-select: text !important;
    user-select: text !important;
}

img {
    -webkit-user-drag: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Watermark & Font Sizing Container */
.watermark-container {
    position: relative;
    overflow: hidden;
    font-size: var(--lyrics-font-size, 1.125rem);
    /* Base size from settings */
}

.watermark-container::before {
    content: "אני בניב שפתי";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(128, 128, 128, 0.08);
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}

.dark .watermark-container::before {
    color: rgba(255, 255, 255, 0.05);
}

.lyrics-content {
    position: relative;
    z-index: 1;
    transition: font-size 0.2s ease, line-height 0.2s ease;
}

/* Styling */
.tox-tinymce {
    border-radius: 0.5rem !important;
}

.lyrics-display {
    line-height: var(--lyrics-line-height, 1.8) !important;
    font-family: var(--lyrics-font-family, 'Heebo') !important;
    /* font-size is now handled by parent + inline style percentage */
}

/* Force override of inline styles from editor */
.lyrics-display * {
    font-family: inherit !important;
}

.lyrics-display span {
    font-size: inherit !important;
    /* Forces spans to adhere to parent size, ignoring inline pixel sizes */
}

.lyrics-display p {
    margin-bottom: var(--lyrics-paragraph-spacing, 1em) !important;
    margin-top: 0 !important;
}

.lyrics-display strong {
    color: #152a4a;
    font-weight: 700;
}

.dark .lyrics-display strong {
    color: #d4af37;
}

/* Loader */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d4af37;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Player */
#floatingPlayer {
    bottom: 20px;
    left: 20px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
}

#videoNavOverlay {
    bottom: 300px;
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    will-change: transform, opacity;
}

#videoNavOverlay.video-nav-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#videoNavOverlay.video-nav-hiding {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    pointer-events: none;
}

@keyframes videoNavBtnIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#videoNavOverlay.video-nav-visible #videoNavPiyyut>button,
#videoNavOverlay.video-nav-visible #videoNavPlaylist>button {
    animation: videoNavBtnIn 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#videoNavOverlay.video-nav-visible #videoNavPiyyut>button:nth-child(2),
#videoNavOverlay.video-nav-visible #videoNavPlaylist>button:nth-child(2) {
    animation-delay: 0.04s;
}

#videoNavOverlay.video-nav-visible #videoNavPlaylist>button:nth-child(3) {
    animation-delay: 0.08s;
}

@media (min-width: 768px) {
    #plScrollControl {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: 1rem !important;
        top: auto !important;
    }

    #videoNavOverlay {
        display: none !important;
    }
}

body.video-player-open #scrollToTopBtn,
body.video-player-open #scrollToBottomBtn {
    opacity: 0;
    pointer-events: none;
}

#scrollToTopBtn,
#scrollToBottomBtn {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

#scrollToTopBtn.scroll-nav-visible,
#scrollToBottomBtn.scroll-nav-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scrollToTopBtn.scroll-nav-hiding,
#scrollToBottomBtn.scroll-nav-hiding {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {

    #scrollToTopBtn,
    #scrollToBottomBtn {
        transition: opacity 120ms linear, transform 120ms linear;
    }

    #scrollToTopBtn.scroll-nav-visible,
    #scrollToBottomBtn.scroll-nav-visible,
    #scrollToTopBtn.scroll-nav-hiding,
    #scrollToBottomBtn.scroll-nav-hiding {
        transform: none;
    }
}



@media (max-width: 767px) {
    #floatingPlayer {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        border-bottom: none;
    }

    body.video-player-open {
        padding-bottom: 250px;
    }

    #videoNavOverlay {
        bottom: calc(260px + max(env(safe-area-inset-bottom), 10px));
        left: auto !important;
        right: 1rem;
        transform-origin: bottom right;
    }

    #videoNavPiyyut,
    #videoNavPlaylist {
        flex-direction: column;
        align-items: center;
        gap: 0.55rem;
        padding: 0;
        border-radius: 0;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    #videoNavPiyyut>button,
    #videoNavPlaylist>button {
        width: 2.55rem;
        height: 2.55rem;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
    }

    body.video-player-open #mobilePlayerBar {
        transform: translateY(110%);
        pointer-events: none;
    }

    body.video-player-open #scrollControl {
        bottom: 260px !important;
    }
}

/* Toggle Switch */
.toggle-wrapper {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 9999px;
    padding: 4px;
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.dark .toggle-wrapper {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.toggle-bg {
    background-color: #ffffff;
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: calc(50% - 6px);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
    right: 4px;
    left: auto;
}

.dark .toggle-bg {
    background-color: #d4af37;
}

.toggle-wrapper[data-mode="metadata"] .toggle-bg {
    transform: translateX(0);
}

.toggle-wrapper[data-mode="lyrics"] .toggle-bg {
    transform: translateX(calc(-100% - 4px));
}

.toggle-option {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    text-align: center;
}

.toggle-wrapper[data-mode="metadata"] .opt-meta {
    color: #1a365d;
    font-weight: 700;
}

.dark .toggle-wrapper[data-mode="metadata"] .opt-meta {
    color: #0a1425;
}

.toggle-wrapper[data-mode="lyrics"] .opt-lyrics {
    color: #1a365d;
    font-weight: 700;
}

.dark .toggle-wrapper[data-mode="lyrics"] .opt-lyrics {
    color: #0a1425;
}

.toggle-wrapper[data-mode="metadata"] .opt-lyrics,
.toggle-wrapper[data-mode="lyrics"] .opt-meta {
    color: #6b7280;
}

.dark .toggle-wrapper[data-mode="metadata"] .opt-lyrics,
.dark .toggle-wrapper[data-mode="lyrics"] .opt-meta {
    color: #9ca3af;
}

/* Explore & Tags */
.explore-btn {
    transition: all 0.2s;
}

.explore-btn.active {
    background-color: #d4af37;
    color: #0a1425;
    border-color: #d4af37;
}

.tag-chip {
    transition: all 0.2s;
    cursor: pointer;
}

.tag-chip:hover {
    transform: translateY(-2px);
}

/* Autocomplete */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 100;
}

.highlight {
    color: #d4af37;
    font-weight: 600;
}

/* Video Cards */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.video-card {
    position: relative;
    cursor: pointer;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(21, 42, 74, 0.5);
}

.dark .video-card:hover {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
}

.video-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.video-card .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.video-card:hover .play-icon {
    opacity: 1;
}

.video-card .play-icon::after {
    content: '';
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #0a1425;
    margin-left: 4px;
}

.video-card .video-title {
    padding: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Admin & Inline Items */
.admin-video-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.admin-video-item img {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.admin-video-item .video-info {
    flex: 1;
    min-width: 0;
}

.yt-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.yt-search-item.selected {
    border: 2px solid #d4af37;
}

.yt-search-item img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.yt-search-item .yt-info {
    flex: 1;
    min-width: 0;
}

.yt-search-item .yt-checkbox {
    width: 24px;
    height: 24px;
    accent-color: #d4af37;
}

/* A11y Styles */
body.a11y-contrast {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.a11y-contrast * {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

body.a11y-contrast img,
body.a11y-contrast video,
body.a11y-contrast iframe {
    filter: grayscale(100%) !important;
}

body.a11y-contrast button {
    border: 2px solid #ffff00 !important;
    background: #000000 !important;
}

body.a11y-links a,
body.a11y-links button {
    text-decoration: underline !important;
    background-color: yellow !important;
    color: black !important;
}

/* Print Styles */
@media print {
    body {
        background-color: white !important;
        color: black !important;
        padding: 0 !important;
    }

    header,
    #searchPage,
    #adminPage,
    #loginPage,
    .video-grid,
    .admin-video-item,
    #floatingPlayer,
    #a11yWidget,
    footer,
    button,
    .toggle-wrapper,
    input,
    .explore-btn,
    #inlineEditBtn,
    #scrollControl {
        display: none !important;
    }

    #piyyutPage,
    #piyyutDisplay {
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .lyrics-content {
        font-size: 14pt !important;
        line-height: 1.5 !important;
        color: black !important;
    }

    h2 {
        font-size: 24pt !important;
        color: black !important;
        text-align: center !important;
    }

    .watermark-container::before {
        display: none !important;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1e3a5a 25%, #243f5f 50%, #1e3a5a 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Playlist Editor Item Animation */
.pl-editor-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.pl-item-moved {
    animation: itemMoveHighlight 0.3s ease;
}

@keyframes itemMoveHighlight {
    0% {
        transform: scale(1);
        background-color: rgba(212, 175, 55, 0.3);
    }

    50% {
        transform: scale(1.02);
        background-color: rgba(212, 175, 55, 0.2);
    }

    100% {
        transform: scale(1);
        background-color: transparent;
    }
}

/* Mobile - always show arrows in playlist editor */
@media (max-width: 767px) {
    .pl-editor-item .group-hover\:opacity-100 {
        opacity: 1 !important;
    }
}

/* Fullscreen Player Mode */
.player-fullscreen {
    overflow: hidden;
}

.player-fullscreen #playlistPlayerPage {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--bg-color, white);
}

.dark .player-fullscreen #playlistPlayerPage {
    background: #0a1425;
}

/* Safe area for mobile bottom bar */
.safe-area-top {
    padding-top: max(env(safe-area-inset-top), 0px);
}

.safe-area-bottom {
    padding-bottom: max(env(safe-area-inset-bottom), 12px);
}

/* Mobile Player Bar animation */
#mobilePlayerBar {
    transition: transform 0.3s ease;
}

#mobilePlayerBar.hidden {
    transform: translateY(100%);
}

/* Reposition accessibility widget when mobile player bar is visible */
@media (max-width: 767px) {
    #playerTopBar {
        max-height: 140px;
        overflow: hidden;
        transform-origin: top;
        transition: max-height 220ms ease, margin-bottom 220ms ease, padding-top 220ms ease, padding-bottom 220ms ease, border-width 180ms ease, opacity 180ms ease, transform 220ms ease;
    }

    #playerTopBar.player-topbar-collapsed {
        max-height: 0;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-width: 0 !important;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
    }

    body:has(#mobilePlayerBar:not(.hidden)) #a11yWidget {
        bottom: 80px;
    }

    body.mobile-player-visible #a11yWidget {
        bottom: 80px;
    }

    #scrollControl {
        bottom: max(env(safe-area-inset-bottom), 1rem) !important;
        top: auto !important;
        z-index: 25 !important;
        transition: bottom 0.3s ease;
    }

    body.video-player-open #scrollControl {
        bottom: 260px !important;
    }

    #plScrollControl {
        bottom: max(env(safe-area-inset-bottom), 1rem) !important;
        top: auto !important;
        z-index: 51 !important;
        transition: bottom 0.3s ease;
    }

    body.mobile-player-visible #plScrollControl {
        bottom: 6rem !important;
    }

    body.video-player-open #plScrollControl {
        bottom: 260px !important;
    }

    /* Tags on Mobile: vertical list with scroll */
    #tagsContent {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        max-height: 300px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    #tagsContent > button {
        width: 100% !important;
        justify-content: flex-start !important;
        border-radius: 0.75rem !important;
        padding-top: 1.1rem !important;
        padding-bottom: 1.1rem !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Extra-narrow phones (e.g. Fold front display): keep action bar in a single compact row */
@media (max-width: 389px) {
    #piyyutActionBar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.35rem;
        padding: 0.45rem 0.55rem;
    }

    #piyyutActionBar > div:first-child {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.3rem;
        min-width: 0;
        flex: 1 1 auto;
    }

    #piyyutActionBar > div:first-child .w-px {
        display: none;
    }

    #piyyutActionBar > div:first-child > button {
        padding: 0.45rem;
        transform: none !important;
    }

    #autoScrollBtn {
        align-self: auto;
        justify-content: center;
        min-width: 2.35rem;
        padding: 0.4rem 0.65rem !important;
    }
}

/* iOS Safari: smooth scrolling for player and scrollable containers */
#playerSequenceContainer {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.scroll-pad-header {
    scroll-padding-top: 3.5rem;
}

.honeypot-trap {
    opacity: 0;
    height: 0;
    overflow: hidden;
    position: absolute;
}

.preview-lyrics-font {
    font-family: var(--lyrics-font-family, 'Heebo'), sans-serif;
}

/* Desktop dark-mode scrollbar theme */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    html.dark {
        --sb-track: rgba(15, 31, 56, 0.9);
        --sb-thumb: rgba(92, 120, 158, 0.78);
        --sb-thumb-hover: rgba(212, 175, 55, 0.78);
        --sb-thumb-active: rgba(212, 175, 55, 0.92);
        --sb-border: rgba(255, 255, 255, 0.1);
    }

    html.dark body,
    html.dark .custom-scrollbar,
    html.dark .playlist-video-scroll,
    html.dark #playerSequenceContainer {
        scrollbar-width: thin;
        scrollbar-color: var(--sb-thumb) var(--sb-track);
    }

    html.dark body::-webkit-scrollbar,
    html.dark .custom-scrollbar::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    html.dark .playlist-video-scroll::-webkit-scrollbar,
    html.dark #playerSequenceContainer::-webkit-scrollbar {
        width: 10px;
        height: 8px;
    }

    html.dark body::-webkit-scrollbar-track,
    html.dark .custom-scrollbar::-webkit-scrollbar-track,
    html.dark .playlist-video-scroll::-webkit-scrollbar-track,
    html.dark #playerSequenceContainer::-webkit-scrollbar-track {
        background: var(--sb-track);
        border-radius: 999px;
    }

    html.dark body::-webkit-scrollbar-thumb,
    html.dark .custom-scrollbar::-webkit-scrollbar-thumb,
    html.dark .playlist-video-scroll::-webkit-scrollbar-thumb,
    html.dark #playerSequenceContainer::-webkit-scrollbar-thumb {
        background: var(--sb-thumb);
        border: 2px solid var(--sb-border);
        border-radius: 999px;
    }

    html.dark body::-webkit-scrollbar-thumb:hover,
    html.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover,
    html.dark .playlist-video-scroll::-webkit-scrollbar-thumb:hover,
    html.dark #playerSequenceContainer::-webkit-scrollbar-thumb:hover {
        background: var(--sb-thumb-hover);
    }

    html.dark body::-webkit-scrollbar-thumb:active,
    html.dark .custom-scrollbar::-webkit-scrollbar-thumb:active,
    html.dark .playlist-video-scroll::-webkit-scrollbar-thumb:active,
    html.dark #playerSequenceContainer::-webkit-scrollbar-thumb:active {
        background: var(--sb-thumb-active);
    }
}

/* Tags container max-height with scroll on desktop */
@media (min-width: 768px) {
    #tagsContent {
        max-height: 200px;
        overflow-y: auto;
    }
}

/* Global Pop-in Animation */
@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pop-in {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

/* Playlist Video Scroll */
.playlist-video-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    display: flex;
    gap: 1rem;
    padding-bottom: 0.5rem;
}

.playlist-video-scroll::-webkit-scrollbar {
    height: 4px;
}

.playlist-video-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 4px;
}

.playlist-video-scroll .video-card {
    flex: 0 0 200px;
    margin: 0;
}

/* Toast Notification System */
#toastContainer {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;

    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    pointer-events: auto;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    direction: rtl;
    cursor: pointer;
}

.toast.toast-exit {
    animation: toastSlideOut 0.25s ease-in forwards;
}

.toast-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.toast-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #7f1d1d;
}

.toast-info {
    background-color: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e3a5f;
}

.toast-warning {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    color: #78350f;
}

.dark .toast-success {
    background-color: #065f46;
    border-color: #10b981;
    color: #d1fae5;
}

.dark .toast-error {
    background-color: #7f1d1d;
    border-color: #ef4444;
    color: #fee2e2;
}

.dark .toast-info {
    background-color: #1e3a5f;
    border-color: #60a5fa;
    color: #dbeafe;
}

.dark .toast-warning {
    background-color: #78350f;
    border-color: #f59e0b;
    color: #fef3c7;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* Item added highlight animation */
.pl-item-added {
    animation: itemAddHighlight 0.5s ease;
}

@keyframes itemAddHighlight {
    0% {
        transform: scale(0.95);
        background-color: rgba(16, 185, 129, 0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.02);
        background-color: rgba(16, 185, 129, 0.15);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        background-color: transparent;
        opacity: 1;
    }
}

/* Mobile Touch Drag & Drop */
.pl-editor-item.touch-dragging {
    z-index: 100;
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    transition: none !important;
}

.dark .pl-editor-item.touch-dragging {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.pl-editor-item.touch-drag-over {
    border-color: #d4af37 !important;
    background-color: rgba(212, 175, 55, 0.1);
}

@media (max-width: 767px) {
    .pl-editor-item .pl-arrow-btn {
        width: 2.25rem !important;
        height: 2.25rem !important;
    }

    .pl-editor-item .pl-arrow-btn svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}

.pl-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    color: #9ca3af;
    cursor: grab;
    touch-action: none;
    font-size: 1.1rem;
}



/* --- Animated Hamburger Menu --- */
.hamburger-lines {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    gap: 5px;
    cursor: pointer;
}

.hamburger-lines span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6),
        opacity 0.2s ease;
    transform-origin: center;
}

.hamburger-lines.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-lines.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-lines.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Floating Glass Bar Menu (Mobile) --- */
@media (max-width: 767px) {
    .nav-icons-row {
        display: flex;
        /* Start hidden (but will be toggled open by JS default) */
        max-height: 0;
        opacity: 0;
        overflow: hidden;

        /* Push Content (Relative Flow) */
        position: relative;
        z-index: 40;

        /* Full width breakout */
        width: calc(100% + 2rem);
        margin-left: -1rem;
        margin-right: -1rem;
        margin-bottom: -0.75rem;
        /* Remove bottom spacing */

        /* Glassmorphism & Styling */
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        /* Softer shadow */

        /* Layout */
        flex-direction: row;
        justify-content: center;
        padding: 0;
        /* margin-top handles gap? Parent has gap-3. Leaving as is creates slight separation from logo which is usually good. */

        /* Transition */
        /* Animate max-height for push effect, opacity for visibility */
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease-in-out,
            padding 0.4s ease;
    }

    .dark .nav-icons-row {
        background: rgba(15, 31, 56, 0.95);
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    }

    .nav-icons-row.nav-open {
        max-height: 56px;
        /* Reduced for compactness */
        opacity: 1;
        padding: 0.5rem 0;
        overflow: visible;
        /* No transform logic to avoid "icons flying" visual artifact */
    }

    .nav-icons-row.nav-open.user-menu-open {
        max-height: 280px;
        padding-bottom: 0.75rem;
    }
}

/* ===== Cinematic Tutorial ===== */

/* Overlay */
.ct-overlay {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: radial-gradient(ellipse at 50% 30%, #152a4a 0%, #0a1425 70%, #060d1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.ct-overlay:not(.hidden) {
    opacity: 1;
}
.ct-overlay.hidden {
    pointer-events: none;
}

/* Particles */
.ct-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ct-particle {
    position: absolute;
    left: var(--ct-x);
    top: var(--ct-y);
    width: 4px;
    height: 4px;
    background: #d4af37;
    border-radius: 50%;
    opacity: 0;
    animation: ct-float var(--ct-d) ease-in-out var(--ct-del) infinite;
}

.ct-particle-1 { --ct-x: 10%; --ct-y: 20%; --ct-d: 6s; --ct-del: 0s; }
.ct-particle-2 { --ct-x: 80%; --ct-y: 15%; --ct-d: 8s; --ct-del: 1s; }
.ct-particle-3 { --ct-x: 25%; --ct-y: 70%; --ct-d: 7s; --ct-del: 2s; }
.ct-particle-4 { --ct-x: 65%; --ct-y: 80%; --ct-d: 5s; --ct-del: 0.5s; }
.ct-particle-5 { --ct-x: 45%; --ct-y: 40%; --ct-d: 9s; --ct-del: 1.5s; }
.ct-particle-6 { --ct-x: 90%; --ct-y: 60%; --ct-d: 6.5s; --ct-del: 3s; }

/* Scene Title */
.ct-scene-title {
    position: absolute;
    top: calc(50% - min(35vh, 250px) - clamp(2.4rem, 4vw, 3rem));
    left: 50%;
    transform: translateX(-50%) translateY(-12px) scale(0.92);
    font-size: clamp(1.7rem, 4.9vw, 3.1rem);
    line-height: 1.08;
    font-weight: 900;
    color: transparent;
    background: linear-gradient(
        90deg,
        #fff5cf 0%,
        #d4af37 24%,
        #ffe8a3 50%,
        #d4af37 76%,
        #b88917 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 22px rgba(212, 175, 55, 0.52), 0 6px 20px rgba(6, 13, 26, 0.68);
    letter-spacing: 0.035em;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2;
    padding: 0 0.5rem;
    max-width: min(92vw, 760px);
}
.ct-scene-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%) scaleX(0.3);
    width: min(320px, 72vw);
    height: 3px;
    border-radius: 999px;
    opacity: 0;
    background: linear-gradient(90deg, transparent 0%, #ffe29a 50%, transparent 100%);
    box-shadow: 0 0 12px rgba(255, 226, 154, 0.7);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.ct-scene-title.ct-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    animation: ct-title-pop 0.65s cubic-bezier(0.16, 1, 0.3, 1), ct-title-shimmer 2.8s linear infinite;
}
.ct-scene-title.ct-visible::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

/* Scene Container */
.ct-scene-container {
    position: relative;
    width: min(90vw, 600px);
    height: min(70vh, 500px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Individual Scenes */
.ct-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.ct-scene.ct-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.ct-scene.ct-exit {
    opacity: 0;
    transform: translateY(-20px);
}

/* Scene Description */
.ct-scene-desc {
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(1.02rem, 2.15vw, 1.28rem);
    line-height: 1.55;
    margin-top: 1.2rem;
    opacity: 0;
    transition: opacity 0.5s ease 0.8s;
}
.ct-scene.ct-active .ct-scene-desc {
    opacity: 1;
}

/* ---- Scene 1: Welcome ---- */
.ct-welcome-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.ct-welcome-logo {
    width: min(55vw, 240px);
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.4));
}
.ct-scene.ct-active .ct-welcome-logo {
    opacity: 1;
    transform: scale(1);
}
.ct-welcome-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    opacity: 0;
    transition: opacity 0.6s ease 0.4s;
}
.ct-scene.ct-active .ct-welcome-title {
    opacity: 1;
}
.ct-welcome-subtitle {
    font-size: 1.1rem;
    color: rgba(212, 175, 55, 0.8);
    opacity: 0;
    transition: opacity 0.6s ease 0.8s;
}
.ct-scene.ct-active .ct-welcome-subtitle {
    opacity: 1;
}
.ct-welcome-line {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    transition: width 0.8s ease 1.2s;
}
.ct-scene.ct-active .ct-welcome-line {
    width: 200px;
}

/* ---- Scene 2: Search ---- */
.ct-mock-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    direction: rtl;
}
.ct-mock-searchbar {
    width: min(85%, 380px);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.ct-scene.ct-active .ct-mock-searchbar {
    opacity: 1;
    transform: translateY(0);
}
.ct-mock-search-icon {
    width: 20px;
    height: 20px;
    color: #d4af37;
    flex-shrink: 0;
}
.ct-typing-text {
    color: #fff;
    font-size: 1rem;
}
.ct-cursor {
    color: #d4af37;
    animation: ct-blink 0.8s step-end infinite;
}
.ct-mock-dropdown {
    width: min(85%, 380px);
    background: rgba(26, 54, 93, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    margin-top: -2px;
}
.ct-mock-dropdown.ct-anim-active {
    max-height: 160px;
    opacity: 1;
}
.ct-mock-dropdown-item {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s;
}
.ct-mock-dropdown.ct-anim-active .ct-mock-dropdown-item {
    opacity: 1;
    transform: translateX(0);
}
.ct-mock-dropdown-item:nth-child(2) { transition-delay: 0.1s; }
.ct-mock-dropdown-item:nth-child(3) { transition-delay: 0.2s; }
.ct-mock-dropdown-item:hover {
    background: rgba(212, 175, 55, 0.1);
}
.ct-mock-results {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.ct-mock-card {
    width: 140px;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 10px;
    text-align: center;
    opacity: 0;
    transform: scale(0.8) translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ct-mock-card.ct-anim-active {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.ct-mock-card:nth-child(2) { transition-delay: 0.15s; }
.ct-mock-card:nth-child(3) { transition-delay: 0.3s; }
.ct-mock-card-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.ct-mock-card-sub {
    color: rgba(212, 175, 55, 0.6);
    font-size: 0.75rem;
}

/* ---- Scene 3: Piyyut View ---- */
.ct-mock-piyyut-card {
    width: min(90%, 400px);
    max-height: 340px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 14px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: relative;
}
.ct-scene.ct-active .ct-mock-piyyut-card {
    opacity: 1;
    transform: scale(1);
}
.ct-mock-piyyut-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #141e30;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 3;
}
.ct-mock-piyyut-title {
    color: #d4af37;
    font-weight: 700;
    font-size: 1rem;
}
.ct-mock-font-btns {
    display: flex;
    gap: 6px;
}
.ct-mock-font-btn {
    padding: 2px 8px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
}
.ct-mock-font-btn.ct-font-active {
    color: #d4af37;
    border-color: #d4af37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}
.ct-mock-lyrics {
    padding: 16px;
    max-height: 180px;
    overflow: hidden;
    position: relative;
}
.ct-lyrics-inner p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 2;
    text-align: center;
    margin: 0;
}
.ct-mock-lyrics.ct-scrolling .ct-lyrics-inner {
    animation: ct-scroll-up 4s linear forwards;
}
.ct-mock-scroll-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    color: rgba(212, 175, 55, 0.6);
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.ct-mock-scroll-indicator.ct-anim-active {
    opacity: 1;
}
.ct-scroll-arrow {
    width: 18px;
    height: 18px;
    animation: ct-bounce-arrow 1.5s ease-in-out infinite;
}

/* Mock YouTube Video */
.ct-mock-video {
    padding: 0 16px;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
    position: relative;
    z-index: 1;
}
.ct-scene.ct-active .ct-mock-video {
    opacity: 1;
    transform: translateY(0);
}
.ct-mock-video-thumb {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.ct-play-btn-icon {
    width: 48px;
    height: 34px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.ct-video-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

/* ---- Scene 4: Browse by Maqam & Author ---- */
.ct-browse-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}
.ct-explore-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.ct-explore-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    cursor: default;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease, background 0.3s, border-color 0.3s, color 0.3s;
}
.ct-explore-btn.ct-anim-active {
    opacity: 1;
    transform: translateY(0);
}
.ct-explore-btn:nth-child(2) { transition-delay: 0.1s; }
.ct-explore-btn:nth-child(3) { transition-delay: 0.2s; }
.ct-explore-btn.ct-btn-selected {
    background: rgba(212, 175, 55, 0.15);
    border-color: #d4af37;
    color: #d4af37;
}
.ct-explore-tags {
    width: min(90%, 420px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    padding: 12px;
    min-height: 60px;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.ct-explore-tags.ct-anim-active {
    opacity: 1;
}
.ct-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.ct-tag-group.hidden { display: none; }
.ct-tag-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ct-tag-chip.ct-anim-active {
    opacity: 1;
    transform: scale(1);
}
.ct-tag-chip:nth-child(2) { transition-delay: 0.08s; }
.ct-tag-chip:nth-child(3) { transition-delay: 0.16s; }
.ct-tag-chip:nth-child(4) { transition-delay: 0.24s; }
.ct-tag-chip:nth-child(5) { transition-delay: 0.32s; }
.ct-tag-count {
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}
.ct-tag-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
}

/* ---- Scene 5: Favorites ---- */
.ct-favorites-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.ct-mock-heart-container {
    position: relative;
}
.ct-mock-heart {
    width: 64px;
    height: 64px;
    fill: transparent;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1.5;
    transition: fill 0.5s ease, stroke 0.5s ease, transform 0.3s ease;
}
.ct-mock-heart.ct-heart-active {
    fill: #ef4444;
    stroke: #ef4444;
    animation: ct-pulse-heart 0.6s ease;
}
.ct-favorites-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.ct-fav-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(15px) scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ct-fav-card.ct-anim-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.ct-fav-card:nth-child(2) { transition-delay: 0.2s; }
.ct-fav-card:nth-child(3) { transition-delay: 0.4s; }
.ct-fav-mini-heart {
    width: 16px;
    height: 16px;
    fill: #ef4444;
}

/* ---- Scene 6: Playlists ---- */
.ct-playlist-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.ct-mock-playlist-card {
    width: min(85%, 350px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.ct-scene.ct-active .ct-mock-playlist-card {
    opacity: 1;
    transform: translateY(0);
}
.ct-mock-playlist-header {
    padding: 12px 16px;
    color: #d4af37;
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(212, 175, 55, 0.08);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}
.ct-mock-pl-item {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.ct-mock-pl-item.ct-anim-active {
    opacity: 1;
    transform: translateX(0);
}
.ct-mock-pl-item:nth-child(2) { transition-delay: 0.15s; }
.ct-mock-pl-item:nth-child(3) { transition-delay: 0.3s; }
.ct-pl-num {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 50%;
    font-size: 0.7rem;
    color: #d4af37;
    flex-shrink: 0;
}
.ct-mock-modes {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.4s ease 0.6s;
}
.ct-scene.ct-active .ct-mock-modes {
    opacity: 1;
}
.ct-mode-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}
.ct-mode-btn.ct-mode-active {
    color: #d4af37;
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

/* Playlist Mode Previews */
.ct-mode-preview {
    width: min(85%, 300px);
    min-height: 120px;
    position: relative;
    margin-top: 8px;
}
.ct-mode-view {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.ct-mode-view.ct-anim-active {
    opacity: 1;
    transform: scale(1);
}
.ct-mode-view.hidden { display: none; }
.ct-mode-lyrics-view .ct-mode-view-content {
    padding: 16px;
    text-align: center;
}
.ct-mode-lyrics-view .ct-mode-view-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 2;
    margin: 0;
}
.ct-mode-video-view .ct-mode-view-video {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}
.ct-mode-yt-icon {
    width: 52px;
    height: 37px;
}
.ct-mode-yt-icon-sm {
    width: 36px;
    height: 26px;
}
.ct-mode-split-view {
    display: flex;
    flex-direction: column;
}
.ct-mode-split-view.hidden { display: none; }
.ct-mode-split-top {
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}
.ct-mode-split-bottom {
    padding: 10px;
    text-align: center;
}
.ct-mode-split-bottom p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    line-height: 1.8;
    margin: 0;
}
.ct-playlist-share-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    opacity: 0;
    transform: translateY(12px) scale(0.95);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.ct-playlist-share-cta.ct-anim-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.ct-mock-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, #18b858 0%, #25d366 55%, #42db7b 100%);
    color: #fff;
    font-size: clamp(0.9rem, 1.7vw, 1.05rem);
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(6, 13, 26, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.ct-mock-wa-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.ct-playlist-share-cta.ct-pulse .ct-mock-wa-btn {
    animation: ct-wa-pulse 0.9s ease-in-out 2;
}
.ct-share-tip {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.ct-share-tip.ct-visible {
    opacity: 1;
    transform: translateY(0);
}
.ct-scene[data-ct-scene="5"] .ct-mock-ui {
    margin-top: -8px;
}
.ct-scene[data-ct-scene="5"] .ct-playlist-demo {
    gap: 12px;
}
.ct-scene[data-ct-scene="5"] .ct-mode-preview {
    min-height: 104px;
    margin-top: 4px;
}
.ct-scene[data-ct-scene="5"] .ct-playlist-share-cta {
    margin-top: 0;
    margin-bottom: 2px;
}
.ct-scene[data-ct-scene="5"] .ct-scene-desc {
    margin-top: 0.7rem;
    max-width: min(92vw, 560px);
}
@media (min-width: 768px) {
    .ct-scene[data-ct-scene="5"] .ct-mock-ui {
        margin-top: 6px;
    }
    .ct-scene[data-ct-scene="5"] .ct-playlist-demo {
        gap: 10px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-preview {
        min-height: 94px;
        margin-top: 2px;
    }
    .ct-scene[data-ct-scene="5"] .ct-playlist-share-cta {
        margin-top: -2px;
    }
    .ct-scene[data-ct-scene="5"] .ct-share-tip {
        white-space: nowrap;
        font-size: 0.78rem;
    }
    .ct-scene[data-ct-scene="5"] .ct-scene-desc {
        margin-top: 1rem;
        font-size: clamp(0.96rem, 1.35vw, 1.1rem);
        line-height: 1.4;
    }
}
@media (min-width: 1024px) {
    .ct-scene[data-ct-scene="5"] .ct-mock-ui {
        margin-top: 18px;
    }
    .ct-scene[data-ct-scene="5"] .ct-playlist-demo {
        gap: 8px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-preview {
        min-height: 86px;
        margin-top: 0;
    }
    .ct-scene[data-ct-scene="5"] .ct-scene-desc {
        margin-top: 0.8rem;
    }
}

/* ---- Scene 7: Share ---- */
.ct-share-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.ct-mock-share-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.ct-share-line {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    padding: 4px 12px;
    border-radius: 4px;
    transition: background 0.4s ease, color 0.4s ease;
}
.ct-share-line.ct-line-highlight.ct-anim-active {
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
}
.ct-mock-share-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ct-mock-share-preview.ct-anim-active {
    opacity: 1;
    transform: scale(1);
}
.ct-share-card {
    padding: 20px;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.9), rgba(10, 20, 37, 0.95));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    text-align: center;
    min-width: 200px;
}
.ct-share-card p {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0;
}
.ct-share-watermark {
    margin-top: 12px;
    color: rgba(212, 175, 55, 0.4);
    font-size: 0.7rem;
}
.ct-share-icon {
    width: 32px;
    height: 32px;
    color: #d4af37;
    opacity: 0;
    transition: opacity 0.4s ease 0.3s;
}
.ct-mock-share-preview.ct-anim-active .ct-share-icon {
    opacity: 1;
    animation: ct-bounce-share 0.6s ease 0.5s both;
}

/* ---- Scene 8: Extras ---- */
.ct-extras-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.ct-mock-theme-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.ct-scene.ct-active .ct-mock-theme-toggle {
    opacity: 1;
}
.ct-theme-card {
    width: 120px;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    position: relative;
    transition: transform 0.3s ease;
}
.ct-theme-card:hover {
    transform: scale(1.03);
}
.ct-theme-light {
    background: #f0f0f0;
    border: 1px solid #ddd;
}
.ct-theme-dark {
    background: #0a1425;
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.ct-theme-header-mock {
    width: 80%;
    height: 8px;
    border-radius: 4px;
}
.ct-theme-light .ct-theme-header-mock { background: #1a365d; }
.ct-theme-dark .ct-theme-header-mock { background: #d4af37; }
.ct-theme-line-mock {
    width: 70%;
    height: 5px;
    border-radius: 3px;
}
.ct-theme-line-mock.short { width: 45%; }
.ct-theme-light .ct-theme-line-mock { background: #ccc; }
.ct-theme-dark .ct-theme-line-mock { background: rgba(255, 255, 255, 0.15); }
.ct-sun-icon, .ct-moon-icon {
    width: 24px;
    height: 24px;
    margin-top: 4px;
}
.ct-sun-icon { color: #f59e0b; }
.ct-moon-icon { color: #d4af37; }
.ct-theme-arrow {
    font-size: 1.5rem;
    color: rgba(212, 175, 55, 0.5);
    opacity: 0;
    transition: opacity 0.4s ease 0.4s;
}
.ct-scene.ct-active .ct-theme-arrow {
    opacity: 1;
}
.ct-a11y-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.ct-a11y-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.ct-a11y-badge.ct-anim-active {
    opacity: 1;
    transform: translateY(0);
}
.ct-a11y-badge:nth-child(2) { transition-delay: 0.15s; }
.ct-a11y-badge:nth-child(3) { transition-delay: 0.3s; }
.ct-a11y-badge svg {
    width: 28px;
    height: 28px;
    color: #d4af37;
}
.ct-a11y-badge span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

/* ---- Controls Bar ---- */
.ct-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 20, 37, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 2;
}
.ct-progress-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
}
.ct-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f0d060);
    transition: width 0.5s ease;
    width: 0%;
}
.ct-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
}
.ct-ctrl-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.25);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    color: rgba(255, 255, 255, 0.8);
}
.ct-ctrl-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: #d4af37;
}
.ct-ctrl-btn:active {
    transform: scale(0.93);
}
.ct-close-btn {
    margin-right: auto;
    margin-left: 0;
}
.ct-ctrl-icon {
    width: 20px;
    height: 20px;
}
.ct-scene-counter {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    min-width: 40px;
    text-align: center;
    direction: ltr;
}

/* Speed Control */
.ct-speed-control {
    display: flex;
    align-items: center;
}
.ct-speed-btn {
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    background: rgba(255, 255, 255, 0.05);
    color: #d4af37;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    direction: ltr;
    min-width: 36px;
    text-align: center;
}
.ct-speed-btn:hover {
    background: rgba(212, 175, 55, 0.15);
}
.ct-speed-btn:active {
    transform: scale(0.93);
}

/* ---- Keyframes ---- */
@keyframes ct-float {
    0%, 100% { opacity: 0; transform: translateY(0); }
    10% { opacity: 0.6; }
    50% { opacity: 0.3; transform: translateY(-40px); }
    90% { opacity: 0.6; }
}
@keyframes ct-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
@keyframes ct-pulse-heart {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
@keyframes ct-scroll-up {
    0% { transform: translateY(0); }
    100% { transform: translateY(-60px); }
}
@keyframes ct-bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}
@keyframes ct-bounce-share {
    0% { transform: scale(0.5) rotate(-10deg); }
    60% { transform: scale(1.15) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}
@keyframes ct-wa-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(6, 13, 26, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.45);
    }
    55% {
        transform: scale(1.06);
        box-shadow: 0 12px 26px rgba(6, 13, 26, 0.42), 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(6, 13, 26, 0.35), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}
@keyframes ct-title-pop {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-16px) scale(0.88);
    }
    65% {
        opacity: 1;
        transform: translateX(-50%) translateY(2px) scale(1.04);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}
@keyframes ct-title-shimmer {
    0% {
        background-position: 0% 50%;
        text-shadow: 0 0 14px rgba(212, 175, 55, 0.35), 0 4px 16px rgba(6, 13, 26, 0.65);
    }
    50% {
        background-position: 100% 50%;
        text-shadow: 0 0 22px rgba(255, 226, 154, 0.55), 0 4px 16px rgba(6, 13, 26, 0.65);
    }
    100% {
        background-position: 0% 50%;
        text-shadow: 0 0 14px rgba(212, 175, 55, 0.35), 0 4px 16px rgba(6, 13, 26, 0.65);
    }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .ct-scene-container {
        width: 95vw;
        height: 60vh;
    }
    .ct-scene-title {
        top: calc(50% - 30vh - 2rem);
        font-size: clamp(1.45rem, 7vw, 2.2rem);
        letter-spacing: 0.025em;
    }
    .ct-playlist-share-cta {
        width: min(92%, 320px);
    }
    .ct-mock-wa-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mock-ui {
        margin-top: -4px;
        width: 100%;
    }
    .ct-scene[data-ct-scene="5"] .ct-playlist-demo {
        gap: 6px;
        width: 100%;
    }
    .ct-scene[data-ct-scene="5"] .ct-mock-playlist-card {
        width: min(92%, 330px);
    }
    .ct-scene[data-ct-scene="5"] .ct-mock-playlist-header {
        padding: 9px 12px;
        font-size: 0.88rem;
    }
    .ct-scene[data-ct-scene="5"] .ct-mock-pl-item {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 8px;
    }
    .ct-scene[data-ct-scene="5"] .ct-pl-num {
        width: 20px;
        height: 20px;
        font-size: 0.68rem;
    }
    .ct-scene[data-ct-scene="5"] .ct-mock-modes {
        gap: 6px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-btn {
        padding: 5px 12px;
        font-size: 0.74rem;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-preview {
        min-height: 74px;
        margin-top: 2px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-lyrics-view .ct-mode-view-content {
        padding: 10px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-lyrics-view .ct-mode-view-content p {
        font-size: 0.8rem;
        line-height: 1.75;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-video-view .ct-mode-view-video {
        padding: 16px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-split-top {
        padding: 10px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-split-bottom {
        padding: 8px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mode-split-bottom p {
        font-size: 0.76rem;
        line-height: 1.55;
    }
    .ct-scene[data-ct-scene="5"] .ct-playlist-share-cta {
        gap: 4px;
    }
    .ct-scene[data-ct-scene="5"] .ct-mock-wa-btn {
        padding: 8px 12px;
        font-size: 0.88rem;
    }
    .ct-scene[data-ct-scene="5"] .ct-share-tip {
        display: none;
    }
    .ct-scene[data-ct-scene="5"] .ct-scene-desc {
        margin-top: 0.3rem;
        max-width: min(94vw, 360px);
        font-size: clamp(0.86rem, 3.7vw, 0.98rem);
        line-height: 1.35;
    }
    .ct-scene-desc {
        font-size: clamp(0.98rem, 4.4vw, 1.14rem);
    }
    .ct-welcome-title { font-size: 1.6rem; }
    .ct-mock-card { width: 110px; padding: 10px 8px; }
    .ct-theme-card { width: 100px; padding: 12px; }
    .ct-controls-row { gap: 8px; padding: 8px 12px; }
    .ct-ctrl-btn { width: 36px; height: 36px; }
    .ct-welcome-logo { width: min(50vw, 160px); }
    .ct-explore-btn { padding: 6px 12px; font-size: 0.8rem; }
    .ct-tag-chip { padding: 4px 10px 4px 6px; }
    .ct-mode-preview { width: 90%; }
}

/* ===== Accessibility: Reduced Motion (WCAG 2.1 AA - Criterion 2.3.3) ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Accessibility: Focus Visible (WCAG 2.1 AA - Criterion 2.4.7) ===== */
:focus-visible {
    outline: 3px solid #d4af37;
    outline-offset: 2px;
    border-radius: 4px;
}

.dark :focus-visible {
    outline-color: #d4af37;
}

/* Remove outline on mouse click (only show on keyboard navigation) */
:focus:not(:focus-visible) {
    outline: none;
}

/* Enhanced focus for buttons and interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[role="switch"]:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #d4af37;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.15);
}

/* Skip to main content link (visually hidden until focused) */
.skip-to-content {
    position: absolute;
    top: -100%;
    right: 0;
    z-index: 999;
    padding: 0.75rem 1.5rem;
    background: #1a365d;
    color: white;
    font-weight: 700;
    border-radius: 0 0 0 8px;
    transition: top 0.2s;
}

.skip-to-content:focus {
    top: 0;
}

/* --- User Auth Menu --- */
#userAvatar {
    transition: border-color 0.3s ease;
}

#userAvatarBtn:hover #userAvatar {
    border-color: #d4af37;
}

#userDropdownMenu {
    animation: userMenuFadeIn 0.15s ease-out;
}

@keyframes userMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback avatar initial */
.user-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a365d 0%, #2563eb 100%);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid #e5e7eb;
}

.dark .user-avatar-fallback {
    background: linear-gradient(135deg, #d4af37 0%, #f59e0b 100%);
    color: #1a365d;
    border-color: rgba(212, 175, 55, 0.3);
}

/* --- Legal Documents --- */
.legal-document {
    line-height: 1.6;
}

.legal-document h3 {
    color: #1a365d;
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 1.05em;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 4px;
}

.legal-document h4 {
    color: #4164a5;
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 0.95em;
}

.legal-document ul,
.legal-document ol {
    margin: 6px 0 10px 20px;
}

.legal-document li {
    margin: 4px 0;
}

.legal-document p {
    margin: 6px 0;
}

.legal-intro {
    background: linear-gradient(135deg, #fff9e6 0%, #fef3c7 100%);
    padding: 12px;
    border-radius: 6px;
    border-right: 4px solid #d4af37;
    margin-bottom: 15px;
}

.legal-important {
    background: #fef2f2;
    padding: 10px;
    border-radius: 6px;
    border-right: 4px solid #ef4444;
    margin: 10px 0;
}

.legal-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.85em;
    text-align: center;
    font-style: italic;
}

.legal-email-block {
    text-align: center;
    font-size: 1.2em;
    margin: 20px 0;
}

.legal-email-link {
    display: inline-block;
    background: linear-gradient(135deg, #1a365d 0%, #2563eb 100%);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
}

.legal-email-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.dark .legal-document h3 {
    color: #d4af37;
    border-bottom-color: #374151;
}

.dark .legal-document h4 {
    color: #fbbf24;
}

.dark .legal-intro {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    border-right-color: #d4af37;
}

.dark .legal-important {
    background: #1f2937;
    border-right-color: #f87171;
}

.dark .legal-footer {
    border-top-color: #374151;
    color: #9ca3af;
}
