
.search-container {
    width: 90%;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 15px;
    margin-top: 15px;
    transition: all 0.3s;
}

.search-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(244, 143, 177, 0.3);
}

.search-container i {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-right: 10px;
}

#search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 16px !important;
    width: 100%;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
}

body,
button,
.track-item,
input[type=range],
.progress-container {
    cursor: none !important;
}

#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 100000 !important;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: transform;
}
.confirm-modal, 
.confirm-btn, 
.toast-container {
    cursor: none !important; 
}

.paw-glow {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    filter: blur(15px);
    opacity: 0.5;
    border-radius: 50%;
    transition: all 0.3s;
}

.paw-icon {
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M5 2h2v2H5zM9 2h2v2H9zM2 5h2v2H2zM12 5h2v2h-2zM5 8h6v5H5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M5 2h2v2H5zM9 2h2v2H9zM2 5h2v2H2zM12 5h2v2h-2zM5 8h6v5H5z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    filter: drop-shadow(0 0 5px var(--primary-color));
    transition: all 0.2s;
}

#custom-cursor.hovering .paw-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

#custom-cursor.hovering .paw-glow {
    background: var(--primary-color);
    opacity: 0.8;
    transform: scale(1.2);
}

#custom-cursor.active .paw-icon {
    transform: scale(0.85);
    background-color: #ffffff !important;
    filter: drop-shadow(0 0 15px #ffffff) brightness(1.2) !important;
}

#custom-cursor.active .paw-glow {
    background: #ffffff !important;
    opacity: 1;
    transform: scale(1.6);
}

.mascot-container {
    position: absolute;
    top: -50px;
    left: 20px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    z-index: 5;
    pointer-events: auto;
}

#mascot {
    font-size: 40px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px var(--primary-color));
    transition: all 0.3s;
}

@keyframes mascotBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-15px) scale(1.1);
    }
}

.music-playing #mascot {
    animation: mascotBounce 0.8s infinite ease-in-out;
}

.speech-bubble {
    background: white;
    color: #333;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-family: 'Press Start 2P', cursive;
    opacity: 0;
    transition: 0.3s;
    transform: translateY(10px);
}

.music-playing .speech-bubble {
    opacity: 1;
    transform: translateY(0);
}

.theme-switcher {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    gap: 15px;
    z-index: 100;
}

.theme-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.theme-btn::after {
    content: attr(data-name);
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.6rem;
    font-family: 'Press Start 2P', cursive;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    border: 1px solid var(--secondary-color);
}

.theme-btn:hover::after {
    opacity: 1;
    bottom: 40px;
}

.theme-btn:hover {
    transform: scale(1.2);
}

.theme-btn.active {
    box-shadow: 0 0 10px #fff;
    transform: scale(1.2);
}

.theme-btn.default {
    background: #F48FB1;
}

.theme-btn.dark {
    background: #444;
}

.theme-btn.valorant {
    background: #FF4655;
}

:root {
    --primary-color: #F48FB1;
    --secondary-color: #7971E0;
    --bg-glass: rgba(30, 27, 50, 0.85);
    --text-color: #ffffff;
    --bg-color-1: #2A2548; /* 漸層色1 */
    --bg-color-2: #605788;
}

body {
    margin: 0;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(135deg, var(--bg-color-1), var(--bg-color-2));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    overflow: hidden;
    position: relative;
    perspective: 1000px;
    touch-action: manipulation;
    overscroll-behavior: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('https://grains-filter.com/noise.png'); /* 或是使用 base64 噪點 */
    opacity: 0.04;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: fixed;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    animation: starsBlink var(--duration, 5s) ease-in-out infinite;
    will-change: top, left, opacity;
}

@keyframes starsBlink {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0.5); 
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.2); 
    }
}

body.music-playing::before {
    animation-duration: 0.8s;
}


.app-container {
    width: 100vw;
    height: 100dvh !important;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 5;
    position: relative;
}

.side-panel-wrapper {
    position: fixed;
    right: 0;
    top: 48%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    z-index: 9999;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.side-panel-wrapper.collapsed {
    transform: translate(350px, -50%);
}

.side-content {
    width: 350px;
    height: 520px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: 25px 0 0 25px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--primary-color);
    width: 40px;
    height: 80px;
    border-radius: 20px 0 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    margin-right: -1px;
}

.toggle-btn:hover {
    background: var(--primary-color);
    color: white;
}

.side-panel-wrapper.collapsed .toggle-btn i {
    transform: rotate(0deg);
}

.side-panel-wrapper:not(.collapsed) .toggle-btn i {
    transform: rotate(180deg);
}

.player-card {
    width: 380px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 30px;
    border: 1px solid var(--card-border);
    transition: all 0.5s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-style: preserve-3d;
}

.img-container,
.song-info,
.controls,
.playlist,
.search-container {
    transform: translateZ(20px);
}

.img-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(121, 113, 224, 0.3);
    animation: rotate 20s linear infinite;
    animation-play-state: paused;
    border: 4px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.star-particle {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 20005;
    color: var(--primary-color);
    animation: starFade 0.8s ease-out forwards;
}

body.story-mode .star {
    display: none !important;
}
body.story-mode .star-particle.blood-drop {
    color: #990000 !important;
    font-size: 15px;
    filter: drop-shadow(0 0 8px rgba(153, 0, 0, 0.8));
    animation: starFade 0.8s ease-out forwards;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
@keyframes bloodSplat {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.3);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(1.8);
    }
}

@keyframes starFade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.2) rotate(180deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 20px var(--secondary-color);
    }

    50% {
        box-shadow: 0 0 40px var(--secondary-color), 0 0 60px rgba(121, 113, 224, 0.4);
    }

    100% {
        box-shadow: 0 0 20px var(--secondary-color);
    }
}

.player-card.playing .album-art {
    animation-play-state: running;
    animation: rotate 20s linear infinite, pulseGlow 2s ease-in-out infinite;
}

.song-info {
    width: 100%;
    overflow: hidden;
    position: relative;
    text-align: center;
}

h2 {
    margin: 10px 0;
    font-family: 'Playfair Display', cursive;
    font-size: 1.5rem;
    line-height: 1.5;
    font-weight: 400;
    color: #fff;
    text-shadow: 2px 2px 0px rgba(121, 113, 224, 0.5);
    display: inline-block;
    white-space: nowrap;
}

.player-card.playing h2 {
    padding-left: 100%;
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: #ccc;
}

.progress-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin: 10px 0;
    height: 6px;
    width: 100%;
}
.img-container,
.song-info,
.controls,
.playlist,
.search-container,
.progress-container { /* ★ 加入這一行 */
    transform: translateZ(20px);
}

.progress {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(244, 143, 177, 0.7);
}

.time-box {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #ccc;
    margin-bottom: 10px;
    width: 100%;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 15px;
}

.controls .btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.2s;
    opacity: 0.5;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn:hover {
    opacity: 1;
    transform: scale(1.1);
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.btn.repeat-single::after {
    content: "1";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
    font-size: 0.55rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.btn.active {
    opacity: 1;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.btn-big {
    opacity: 1;
    font-size: 2.5rem;
    color: var(--secondary-color);
    filter: drop-shadow(0 0 5px rgba(121, 113, 224, 0.6));
}

.volume-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 80%;
    margin: 0 auto 20px;
}

#vol-icon {
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.volume-container::after {
    content: "";
    width: 24px;
    display: block;
    flex-shrink: 0;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.playlist {
    width: 100%;
    max-height: 450px;
    overflow-y: auto;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

.playlist::-webkit-scrollbar {
    width: 5px;
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.track-item {
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    margin-bottom: 5px;
    color: #ddd;
}

.track-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.track-item.active-track {
    background: rgba(121, 113, 224, 0.25);
    color: #fff;
    font-weight: bold;
}

.track-item i {
    margin-right: 10px;
    font-size: 0.8rem;
    opacity: 0;
}

.track-item.active-track i {
    opacity: 1;
    color: var(--primary-color);
}

@keyframes breathingGlow {

    0%,
    100% {
        box-shadow: 0 0 5px var(--primary-color);
        border-color: rgba(244, 143, 177, 0.3);
    }

    50% {
        box-shadow: 0 0 15px var(--primary-color), 0 0 25px rgba(244, 143, 177, 0.4);
        border-color: var(--primary-color);
    }
}

.side-panel-wrapper:not(.collapsed) .toggle-btn {
    animation: breathingGlow 2.5s infinite ease-in-out;
    color: #fff;
    background: rgba(244, 143, 177, 0.2);
}


#theme-moon {
    position: fixed;
    top: 100px;
    left: 100px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-150px) rotate(-30deg);
    transition: transform 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 1.0s ease-in;
}

body.dark-mode #theme-moon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

#theme-moon i {
    font-size: 50px;
    color: #f1c40f;
    display: block;
    filter: drop-shadow(0 0 20px rgba(241, 196, 15, 0.8));
    animation: moonBreathe 3s infinite ease-in-out;
}

@keyframes moonBreathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

#user-info-panel {
    top: 14.5% !important;
    z-index: 10000;
}

#user-info-panel .toggle-btn i {
    transform: none !important;
    transition: none !important;
    color: var(--primary-color);
}

#user-info-panel.collapsed {
    transform: translate(350px, -50%) ;
}

#user-info-panel:not(.collapsed) .toggle-btn {
    animation: breathingGlow 2.5s infinite ease-in-out;
    background: rgba(244, 143, 177, 0.2);
}

#toggle-info {
    box-shadow: 0 0 10px rgba(244, 143, 177, 0.2);
    animation: infoBtnGlow 2s infinite ease-in-out;
}

@keyframes infoBtnGlow {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2);
    }
}

.info-content p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eee;
}

.hearts-decoration {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 10px;
}

.hearts-decoration i {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255, 70, 85, 0.4));
    transition: all 0.3s;
}

.heart-1 {
    color: #FF4655;
    animation: heartJump 1.2s infinite ease-in-out;
}

.heart-2 {
    color: var(--primary-color);
    animation: heartJump 1.2s infinite ease-in-out 0.2s;
}

.heart-3 {
    color: #7971E0;
    animation: heartJump 1.2s infinite ease-in-out 0.4s;
}

@keyframes heartJump {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

#lyrics-panel {
    left: 0;
    right: auto;
    position: fixed;
    top: 50%;
    z-index: 9998;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#lyrics-panel .side-content {
    width: 350px;
    height: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#lyrics-panel.collapsed {
    transform: translate(-500px, -50%) !important;
}

#lyrics-panel:not(.collapsed) {
    transform: translate(0, -50%) !important;
}
#full-lyrics {
    flex: 1;                 
    overflow-y: auto;      
    white-space: pre-wrap;   
    word-wrap: break-word;    
    margin-top: 15px;
    padding-right: 10px;     
    font-size: 0.95rem;
    line-height: 1.8;         
    color: #eee;
}

#full-lyrics::-webkit-scrollbar {
    width: 4px;
}

#full-lyrics::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/*愛貓故事模式專屬*/
body.story-mode {
    --primary-color: #FF4655;
    --secondary-color: #000000;
    background: radial-gradient(circle, #220000 0%, #000000 100%) !important;
    transition: background 1s ease;

}


body.story-mode .player-card {
    border: 1px solid rgba(255, 70, 85, 0.5);
    box-shadow: 0 0 40px rgba(255, 70, 85, 0.2);
    background: rgba(10, 0, 0, 0.9);

    transform: translateZ(0);
    will-change: transform, box-shadow;
    animation: horrorPulse 2s infinite ease-in-out;
    border: 2px solid #FF4655 !important;
}


body.story-mode #mascot {
    color: #FF4655;
    filter: drop-shadow(0 0 15px #FF4655);
}


body.story-mode .progress {
    background: linear-gradient(90deg, #FF4655, #9B0000);
    box-shadow: 0 0 15px #FF4655;
}


body.story-mode .heart-1,
body.story-mode .heart-2,
body.story-mode .heart-3 {
    color: #FF4655 !important;
}


body.story-mode::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 20000 !important;
}

@keyframes cinematicHorror {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    20% {
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    40% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

body.story-mode #title {
    font-family: 'Creepster', cursive !important;
    color: #FF0000 !important;
    font-size: 2rem !important;
    letter-spacing: 4px;

    text-shadow:
        0 0 10px #ff0000,
        3px 3px 0px #330000,
        -1px -1px 0 #000,
        1px -1px 0 #000;
    filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.7));
    transition: all 0.5s ease;
}


body.story-mode #artist {
    font-family: 'Creepster', cursive !important;
    color: #8B0000 !important;
    text-shadow: 1px 1px 2px #000;
}

.horror-transition-active {
    animation: cinematicHorror 0.8s ease-in-out forwards !important;
}


@keyframes horrorPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 70, 85, 0.3);
        border-color: rgba(255, 70, 85, 0.5);
    }

    50% {
        box-shadow: 0 0 50px rgba(255, 70, 85, 0.6);
        border-color: rgba(255, 70, 85, 1);
    }
}


.flicker-transition {
    animation: lightFlicker 0.6s ease-in-out forwards;
}


body.story-mode::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 70, 85, 0.1) 0%, rgba(0, 0, 0, 0.4) 70%);
    animation: lightFlicker 4s infinite reverse;
    z-index: 1;

    transform: translateZ(0);
}

#horror-overlay {
    z-index: 20001 !important;
    pointer-events: none !important;
}

.track-item .add-btn:hover {
    color: var(--primary-color);
    opacity: 1 !important;
    transform: scale(1.2);
}

.playlist-controls input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

#playlist-selector:hover {
    background: #333;
}

#playlist-manager-panel {
    top: 78% !important;             
    bottom: 10% !important;        
    right: 0;
    transform: translateX(0) !important; 
    z-index: 9998;                    
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


#playlist-manager-panel.collapsed {
    transform: translateX(350px) !important;
}


#playlist-manager-panel .side-content {
    width: 350px;
    height: 350px;                   
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: 25px 0 0 25px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}


#playlist-manager-panel .toggle-btn {
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);      
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.playlist-manager-ui input,
.playlist-manager-ui select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important; 
    border-radius: 8px !important;
    color: white !important;
    padding: 10px !important;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}


.playlist-manager-ui select option {
    background: #2A2548; 
    color: white;
}


.playlist-manager-ui input:focus,
.playlist-manager-ui select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 10px rgba(244, 143, 177, 0.3); 
    background: rgba(255, 255, 255, 0.1) !important;
}

.playlist-manager-ui .input-group button {
    border-radius: 8px !important;
    margin-left: 5px;
    background: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.playlist-manager-ui .del-btn {
    background: rgba(255, 70, 85, 0.1) !important;
    border: 1px solid rgba(255, 70, 85, 0.3) !important;
    color: #FF4655 !important;
    font-weight: 500;
    transition: all 0.3s;
}

.playlist-manager-ui .del-btn:hover {
    background: #FF4655 !important;
    color: white !important;
    box-shadow: 0 0 15px rgba(255, 70, 85, 0.4);
}

.context-menu {
    position: fixed;
    display: none;
    z-index: 10000 !important;
    width: 140px;
    background: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(244, 143, 177, 0.1);
    animation: menuBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: top right;
}

@keyframes menuBounce {
    from { opacity: 0; transform: scale(0.8) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.sub-menu {
    position: absolute;
    right: 100%; 
    top: -5px;
    width: 180px;
    background: rgba(50, 45, 85, 0.8);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: none;
    padding: 6px 0;
    box-shadow: -10px 10px 30px rgba(0,0,0,0.5);
    animation: subBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sub-menu::after {
    content: "";
    position: absolute;
    top: 0;
    right: -20px;
    width: 20px;
    height: 100%;
    background: transparent;
}

@keyframes subBounce {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

#ctx-add:hover #sub-playlist-menu {
    display: block;
}

.sub-item {
    padding: 10px 15px;
    font-size: 0.8rem;
    color: #eee;
    cursor: pointer;
    transition: 0.2s;
}

.sub-item:hover {
    background: rgba(244, 143, 177, 0.2); 
    color: #fff;
}


.playlist, .sub-menu {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.playlist::-webkit-scrollbar, .sub-menu::-webkit-scrollbar {
    display: none;
}

.custom-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 20010; align-items: center; justify-content: center;
}
.modal-content {
    background: rgba(30, 27, 50, 0.9); backdrop-filter: blur(20px);
    border: 1px solid var(--primary-color); border-radius: 20px;
    padding: 25px; width: 280px; box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.modal-list { margin: 15px 0; max-height: 200px; overflow-y: auto; }
.modal-item {
    padding: 12px; margin-bottom: 8px; background: rgba(255,255,255,0.05);
    border-radius: 10px; cursor: pointer; transition: 0.2s; color: #ddd; font-size: 0.85rem;
}
.modal-item:hover { background: var(--primary-color); color: white; transform: scale(1.05); }
.modal-close-btn {
    width: 100%; background: transparent; border: 1px solid #555; color: #aaa;
    padding: 8px; border-radius: 8px; cursor: pointer; font-size: 0.7rem;
}

.is-all-list #ctx-remove { display: none; }

.is-custom-list #ctx-add { display: none; }
.playlist-modal {
    position: fixed;      
    top: 0;
    left: 0;
    width: 100vw;         
    height: 100vh;       
    background: rgba(0, 0, 0, 0.6); 
    z-index: 20010;        
    display: none;       
    align-items: center;   
    justify-content: center; 
    pointer-events: auto; 
}


.modal-content {
    position: relative;
    z-index: 20011;
    
}

.playlist, .modal-list, #modal-list, .sub-menu {
    -ms-overflow-style: none;  
    scrollbar-width: none;     
}

.playlist::-webkit-scrollbar, 
.modal-list::-webkit-scrollbar,
#modal-list::-webkit-scrollbar {
    display: none;             
}

.menu-item {
    width: 100%;               
    padding: 12px 0;           
    display: flex;             
    justify-content: center;   
    align-items: center;        
    text-align: center;        
    cursor: none !important;   
    color: #eee;
    font-size: 0.9rem;
    transition: 0.2s;
    position: relative;       
}

.menu-item:hover {
    background: rgba(244, 143, 177, 0.2); 
    color: #fff;
}


.menu-item i {
    margin-right: 8px;        
}

/*Toast*/
.toast-container { position: fixed; top: 30px; left: 50%; transform: translateX(-50%); z-index: 200000; pointer-events: none; }
.toast {
    background: rgba(45, 40, 75, 0.7); backdrop-filter: blur(20px) saturate(200%);
    border: 1px solid rgba(244, 143, 177, 0.6); color: white;
    padding: 10px 20px; border-radius: 50px; margin-bottom: 10px;
    font-size: 0.85rem; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex; align-items: center; gap: 10px;
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/*確認彈窗*/
.confirm-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 50001;
    display: none; align-items: center; justify-content: center;
}
.confirm-content {
    background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(30px) saturate(180%);
    border: 2px solid var(--primary-color); border-radius: 20px;
    padding: 30px; width: 300px; text-align: center;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: menuBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.confirm-icon { font-size: 2rem; color: #FF4655; margin-bottom: 15px; }
.confirm-btns { display: flex; gap: 15px; margin-top: 20px; }
.confirm-btn {
    flex: 1; padding: 10px; border-radius: 8px; border: none; cursor: none !important;
    font-family: 'Poppins', sans-serif; transition: 0.2s;
}
.confirm-btn.yes { background: var(--primary-color); color: var(--secondary-color) }
.confirm-btn.no { background: rgba(255,255,255,0.1); color: #ccc; }
.confirm-btn:hover { transform: scale(1.05); filter: brightness(1.2); }
/* 備份按鈕樣式 */
.sync-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary-color);
    color: white;
    padding: 6px;
    border-radius: 6px;
    font-size: 0.65rem;
    cursor: none !important;
    transition: 0.2s;
    font-family: 'Press Start 2P', cursive;
}

.sync-btn:hover {
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}
.sync-group {
    display: flex;
    gap: 8px;
    margin-top: 5px;       
    margin-bottom: 10px;
}

/* 遮罩層 */
.prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    
}

/* 彈窗主體 */
.prompt-box {
    background: rgba(50, 45, 85, 0.8);
    padding: 24px;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid #333;
    color: white;
    font-family: sans-serif;
}

/* 輸入框 */
#prompt-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px;
    color: white;
    margin: 15px 0;
    outline: none;
    box-sizing: border-box;
}

/* 按鈕容器 */
.prompt-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 按鈕樣式 */
.prompt-buttons button {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer; 
    font-weight: bold;
}
/* 設定超連結顏色 */
.info-link {
    color: var(--primary-color);
    text-decoration: none;  
    transition: 0.3s;
    font-weight: 500;
}


.info-link:hover {
    text-decoration: underline;  
    filter: brightness(1.2);
}
#prompt-confirm { background: var(--primary-color); color: var(--secondary-color); }
#prompt-cancel { background: rgba(255,255,255,0.1); color: #ccc; }






#funding-bubble-trigger {
    position: fixed;
    bottom: 20px; 
    left: 140px;
    z-index: 2000;

    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;

    background: rgba(--secondary-color);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(176, 168, 224, 0.4);

    animation: floatAndGlow 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

#funding-bubble-trigger:hover {
    transform: scale(1.05) translateY(-2px);
    background: rgba(176, 168, 224, 0.2);
    border-color: var(--text-color); 
    box-shadow: 0 6px 20px rgba(255, 133, 162, 0.6);
}

.cat-icon {
    font-size: 1.2rem;
}

.notification-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation: pulseDot 1.5s infinite;
}


/*彈出視窗樣式*/
#funding-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}


#funding-modal.modal-show {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#funding-modal.modal-show .modal-container {
    transform: scale(1);
}

.modal-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    border: 3px solid #B0A8E0;
    box-shadow: 0 0 30px rgba(176, 168, 224, 0.5);
}



.modal-hint {
    color: rgba(255,255,255,0.6);
    margin-top: 15px;
    font-size: 0.9rem;
}


@keyframes floatAndGlow {
    0%, 100% { transform: translateY(0); box-shadow: 0 4px 15px rgba(176, 168, 224, 0.4); }
    50% { transform: translateY(-6px); box-shadow: 0 8px 25px rgba(176, 168, 224, 0.6); }
}
@keyframes pulseDot {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}
/* 彈窗指引箭頭樣式 */
.pointing-arrow-container {
    position: absolute;
    top: 14%; 
    right: 150px;
    transform: translateY(-50%);
    
    display: flex;
    align-items: center;
    gap: 10px;
    
    opacity: 0;
    pointer-events: none;
    z-index: 10001;
    transition: opacity 0.5s ease 0.3s; 
}

#funding-modal.modal-show .pointing-arrow-container {
    opacity: 1;
    animation: pointRightAnim 1.5s ease-in-out infinite;
}


.arrow-shape {
    width: 50px;
    height: 4px;
    background-color: var(--primary-color); 
    position: relative;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-color); 
}

.arrow-shape::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid var(--primary-color);
    filter: drop-shadow(0 0 5px var(--primary-color)); 
}


/*箭頭旁的提示文字*/
.arrow-text {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    white-space: nowrap;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}



@keyframes pointRightAnim {
    0%, 100% {

        transform: translateY(-50%) translateX(0); 
    }
    50% {
        transform: translateY(-50%) translateX(20px); 
    }
}

/*海報自定義文字樣式*/
.poster-description {
    margin-top: 20px;

    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(176, 168, 224, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.poster-title {
    color: #F48FB1 !important;
    font-size: 1.4rem !important;
    margin-bottom: 10px !important;
    text-shadow: 0 0 8px rgba(244, 143, 177, 0.5);
    font-family: 'Poppins', sans-serif;
}
.poster-text {
    color: #eee !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.poster-text strong {
    color: #B0A8E0;
    text-decoration: underline;
}

.mobile-menu-bar { display: none; }


@media (display-mode: standalone) {
    .mobile-nav-bar {
        bottom: calc(30px + env(safe-area-inset-bottom)) !important;
    }
    
    .comment-list {
        padding-bottom: calc(160px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 600px) {
    #announcement-text {
        font-size: 0.9rem;
    }
    .nav-container {
        display: none !important;
    }
    .side-panel-wrapper:not(.collapsed) ~ .nav-container,
    #lyrics-panel:not(.collapsed) ~ .nav-container {
        opacity: 0;
        pointer-events: none;
        transition: 0.3s;
    }
    #funding-bubble-trigger {
        position: fixed;

        bottom: calc(90px + env(safe-area-inset-bottom)) !important;
        margin-left: 0px !important;
        left: 5% !important;
        z-index: 2000;
        transition: all 0.4s ease;
        top: auto !important;
    }


    #announcement-bar.collapsed {
        position: fixed;
        bottom: calc(90px + env(safe-area-inset-bottom)) !important;
        left: 82% !important;
        z-index: 9999 !important;
        animation: floatAndGlow 3s ease-in-out infinite;
        overflow: visible !important;
        transition: all 0.4s ease;
    }
    
    .announcement-bar.collapsed .notification-dot {
        top: 0 !important;
        right: 0 !important;
    }

    .pointing-arrow-container {
        position: absolute;
        top: 14%; 
        right: 80px;
        transform: translateY(-50%);
    }

    .info-link {
        padding: 5px 0;
        display: inline-block;
    }
    .theme-switcher {
        top: 25px;       
        bottom: auto;    
        left: 20px;
        z-index: 10002;  
        flex-direction: column; 
        gap: 10px;
    }

    
    .theme-btn::after {
        left: 45px;     
        bottom: 50%;
        transform: translateY(50%);
    }

    .theme-btn:hover::after {
        left: 50px;
        bottom: 50%;
    }

    #user-info-panel.collapsed {
        transform: translate(80vw, -50%) !important;
    }

    #lyrics-panel .side-content {
        width: 100vw !important;
        height: 100dvh !important;
        background: rgba(10, 10, 20, 0.95);
        padding: 50px 20px !important;
        z-index: 10000;
    }

    #lyrics-panel.collapsed { transform: translate(-200vw, -50%) !important; }

    .side-content { width: 70vw !important; z-index: 10000; }
    .side-panel-wrapper.collapsed { transform: translate(100vw, -50%) !important; }

    .player-card { width: 80vw !important; padding: 12px 10px !important; }
    .img-container { width: 100px !important; height: 100px !important; }
    h2 { font-size: 0.85rem !important; }
    #custom-cursor { display: none !important; }
    
    body, 
    button, 
    .track-item, 
    .confirm-modal, 
    .confirm-btn,
    input,
    textarea { 
        cursor: default !important; 
    }
    /*手機版歌單面板調整*/
    #playlist-manager-panel {
        position: fixed !important;
        top: 20px !important;            
        left: auto !important;           
        right: auto !important;          
        bottom: auto !important;         
        transform: translate(0, 0) !important;      
        width: 85vw !important;          
        max-height: 70vh;                
        z-index: 10005 !important;     
        transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }

    
    #playlist-manager-panel.collapsed {
        transform: translate(100vw, 100vh) !important; 
    }


    #playlist-manager-panel .side-content {
        width: 100% !important;
        border-radius: 20px !important;
        padding: 20px !important;
    }
    #playlist-manager-panel .toggle-btn {
        left: -1000px !important; 
    }


   
    .playlist-manager-ui .input-group {
        margin-bottom: 20px !important;
    }
    .nav-item {
        background: transparent ;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        font-size: 0.65rem;
        flex: 1;
    }
    /* 底部導航欄*/
    .mobile-nav-bar {
        display: flex;
        position: fixed;
        bottom: calc(12px + env(safe-area-inset-bottom)) !important;
        padding-bottom: env(safe-area-inset-bottom);
        height: 50px;
        left: 50%;
        transform: translateX(-50%);
        width: 94vw;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 35px;
        padding: 5px 5px 0 5px !important;
        justify-content: space-evenly;
        z-index: 10001;
        box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    }
    
    .mobile-nav-extended {
        display: flex;
        position: fixed;
        bottom: calc(84px + env(safe-area-inset-bottom)) !important;
        left: 50% !important;
        right: auto;
        transform: translateX(-50%) translateY(20px);
        width: auto; 
        min-width: 220px;
        background: rgba(255, 255, 255, 0.05); 
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50px;
        padding: 10px 0;
        justify-content: space-evenly;
        z-index: 10000;       
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    }


    .mobile-nav-extended.active {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .mobile-nav-extended .nav-item {
        text-decoration: none;
        color: white;
    }
    .bubble-hidden {
        opacity: 0 !important;
        transform: scale(0.8) translateY(20px) !important;
        pointer-events: none !important;
    }

    .nav-item i {
        color: var(--primary-color);
        font-size: 1.1rem;
    }

    .nav-item span {
        color: var(--primary-color);
        font-size: 0.65rem;
        font-family: 'Poppins', sans-serif;
    }

    .nav-item:active i, 
    .nav-item:active span {
        color: var(--secondary-color) !important;
    }
    .pointing-arrow-container {
        position: absolute;
        top: 14.5%; 
        right: 13%;
        position: fixed
    }

    #funding-modal{
        width: auto;
        height: auto;
        top: auto;
        left: auto;
        padding: 50%;
    }  
}
/* 非手機版隱藏底欄 */
@media (min-width: 601px) {
    .mobile-nav-bar { 
        display: none !important; 
    }
    
    .mobile-nav-extended { 
        display: none !important; 
    }
}
/*debug*/
.side-panel-wrapper, 
#playlist-manager-panel {
    pointer-events: none !important;
}

.side-content, 
.toggle-btn {
    pointer-events: auto !important;
}
.toggle-btn {
    z-index: 10020 !important;
}


body.default {
    --primary-color: #F48FB1;
    --secondary-color: #7971E0;
    --bg-color-1: #0e0b22ff;
    --bg-color-2: #3f3869ff;
    --bg-glass: rgba(30, 27, 50, 0.85);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
}

/*dark*/
body.dark {
    --primary-color: #ffffff;
    --secondary-color: #444444; 
    --bg-color-1: #000000;
    --bg-color-2: #222121ff;
    --bg-glass: rgba(15, 15, 15, 0.95);
    --card-border: rgba(255, 255, 255, 0.1);
}

/*valorant*/
body.valorant {
    --primary-color: #FF4655;
    --secondary-color: #030000ff;
    --bg-color-1: #0F1923;
    --bg-color-2: #364049;
    --bg-glass: rgba(15, 25, 35, 0.95);
    --card-border: rgba(255, 70, 85, 0.3); 
}


/* 左上角導覽列容器 */
.nav-container {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    gap: 15px;
    z-index: 100;
}


.nav-link-btn {
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 30px; 
    display: flex;
    align-items: center;
    gap: 8px; 
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-link-btn:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(244, 143, 177, 0.4);
    border-color: var(--primary-color);
}

.nav-link-btn i {
    font-size: 1.1rem;
}

.announcement-bar {
    position: fixed;
    top: calc(36px + env(safe-area-inset-top)); 
    left: 0; right: 0; margin: 0 auto;
    width: 85vw;           
    max-width: 450px;
    height: 40px;
    background: rgba(--secondary-color);
    backdrop-filter: blur(15px);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 12px;
    
    z-index: 11000;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    cursor: pointer;
    animation: floatAndGlow 3s ease-in-out infinite;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); 
}
.announcement-bar.collapsed {
    top: auto !important;
    right: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    bottom: 20px !important;  
    left: 300px !important;   
    width: 50px !important;
    height: 50px;
    padding: 0 !important;
    gap: 0 !important;
    border-color: var(--primary-color);
    background: rgba(--secondary-color);
    position: fixed !important; 
    z-index: 9990;
    box-shadow: 0 0 15px var(--primary-color);
}

.announcement-bar.collapsed:hover{
    transform: scale(1.05) translateY(-2px);
    background: rgba(176, 168, 224, 0.2);
    border-color: var(--text-color); 
    box-shadow: 0 6px 20px rgba(255, 133, 162, 0.6);
}

.announcement-bar.collapsed .announcement-content {
    max-width: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    visibility: hidden;
}
.announcement-bar i {
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.3s;
}
.announcement-bar.collapsed i {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}


.announcement-bar.collapsed:hover i {
    transform: scale(1.2) rotate(-10deg);

}

.announcement-content {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    max-width: 400px;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}


#announcement-text {
    white-space: nowrap;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.5px;
    width: 100%;
    text-align: center;
}

.scroll-active {
    width: auto !important;
    text-align: left !important;
    display: inline-block !important;
    padding-left: 100%;
    animation: marquee-pause linear infinite;
}

@keyframes marquee-pause {
    0%, 10% { transform: translateX(0); } 
    90%, 100% { transform: translateX(-100%); }
}

@keyframes announcementPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.announcement-bar .notification-dot {
    opacity: 0;
    transition: opacity 0.3s;
}

.announcement-bar.collapsed .notification-dot {
    opacity: 1;
    position: absolute;
    top: 0; 
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #fff; 
    border-radius: 50%;  
    box-shadow: 0 0 5px #fff; 
    z-index: 20002;
    animation: pulseDot 2s infinite; 
}

@keyframes pulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

body.music-playing #mascot {
    cursor: pointer !important;
}


#admin-announcement-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 20000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.admin-panel-content {
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    animation: modalPopIn 0.3s ease-out;
}
/* 彈出動畫定義 */
@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.admin-panel-content h3 {
    margin-top: 0;
    color: var(--primary-color, );
    font-size: 1.5rem;
}

.admin-hint {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 25px;
}


.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ddd;
}

#admin-msg-input,
#admin-expiry-select {
    width: 100% !important; 
    box-sizing: border-box; 
    padding: 15px !important;
    margin: 0 !important;     
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    resize: none;
    
}

#admin-msg-input {
    height: 100px;
    resize: none;
}

#admin-expiry-select option {
    background: #333;
    color: #fff;
}

#admin-msg-input:focus,
#admin-expiry-select:focus {
    border-color: var(--primary-color, #ff69b4);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.3);
}

.admin-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.admin-btn {
    flex: 1; 
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn.close {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.admin-btn.close:hover { background: rgba(255, 255, 255, 0.2); }


.admin-btn.publish {
    background: var(--primary-color);
    color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
}
.admin-btn.publish:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.6);
    filter: brightness(1.1);
}
.admin-btn:active { transform: scale(0.98); 

}
