/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
    color: white;
}

/* 主容器 */
.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 毛玻璃背景 */
.glass-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/rainy-background.svg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.glass-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -2;
}

/* 雨滴效果 */
#raindrop-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    pointer-events: none;
}

/* 内容区域 */
.content {
    text-align: center;
    z-index: 1;
    padding: 20px;
    max-width: 600px;
    width: 100%;
}

/* Logo样式 */
.logo {
    margin-bottom: 80px;
}

.logo h1 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 4.2rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.registered {
    font-size: 1rem;
    vertical-align: super;
}

.tagline {
    font-family: 'Crimson Text', serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    opacity: 0.9;
    font-weight: 400;
    font-style: italic;
}

/* 播放控制区 */
.player-controls {
    margin: 30px 0;
}

.play-button {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.play-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.play-button {
    position: relative;
    overflow: visible;
}

.play-button::before,
.play-button::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
}



.play-button.playing::before,
.play-button.playing::after {
    animation: pulsate-fast 2s linear infinite;
    opacity: 1;
}

.play-button:not(.playing)::before,
.play-button:not(.playing)::after {
    animation: pulsate-slow 4s linear infinite;
}

.play-button:not(.playing)::after {
    animation-delay: 3s;
}

.play-button.playing::after {
    animation-delay: 0.7s;
}

@keyframes pulsate-slow {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

@keyframes pulsate-fast {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.play-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 25px 0 25px 40px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
    margin-left: 8px;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3));
}

.play-button.playing .play-icon {
    border: 0;
    width: 50px;
    height: 50px;
    position: relative;
    margin-left: 0;
}

.play-button.playing .play-icon::before,
.play-button.playing .play-icon::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    top: 0;
    border-radius: 8px;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3));
}

.play-button.playing .play-icon::before {
    left: 8px;
    margin-left: -3px;
}

.play-button.playing .play-icon::after {
    right: 8px;
    margin-right: -3px;
}

/* 音量条栏 */
.volume-bar {
    width: 300px;
    max-width: 100%;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.volume-bar .volume-display,
.volume-bar .timer-button {
    flex: 0 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.volume-bar .timer-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.volume-bar .timer-icon {
    height: 16px;
    width: 16px;
    vertical-align: middle;
    opacity: 0.9;
}

.volume-bar input[type="range"] {
    flex: 1 1 auto;
    min-width: 200px;
    margin: 0 10px;
}

@media (max-width: 600px) {
    .volume-bar {
        width: 200px;
    }
    .volume-bar .volume-display,
    .volume-bar .timer-button {
        flex: 0 0 50px;
        font-size: 1.1rem;
        padding: 7px 10px;
    }
    .volume-bar input[type="range"] {
        min-width: 150px;
        margin: 0 8px;
    }
    .volume-bar .timer-icon {
        width: 17px;
        height: 17px;
    }
}

/* @media (max-width: 480px) {
    .volume-bar {
        width: 100%;
        padding: 0 10px;
        justify-content: center;
    }
    .volume-bar .volume-display {
        width: 50px;
        font-size: 1rem;
        padding: 6px 8px;
    }
    .volume-bar .timer-button {
        width: 50px;
        padding: 6px 8px;
    }
    .volume-bar input[type="range"] {
        min-width: 120px;
        margin: 0 5px;
    }
    .volume-bar .timer-icon {
        width: 16px;
        height: 16px;
    }
} */

/* 音量滑块 */
.volume-slider {
    width: 300px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.volume-display,
.timer-button {
    flex: 0 0 60px;
}

input[type="range"] {
    flex: 1 1 auto;
    min-width: 200px;
    margin: 0 10px;
}

@media (max-width: 600px) {
    .volume-slider {
        width: 200px;
    }
    .volume-display,
    .timer-button {
        flex: 0 0 50px;
        font-size: 1.1rem;
        padding: 7px 10px;
    }
    input[type="range"] {
        min-width: 150px;
        margin: 0 8px;
    }
    .timer-icon {
        width: 17px;
        height: 17px;
    }
}

/* @media (max-width: 480px) {
    .volume-slider {
        width: 100%;
        padding: 0 10px;
        justify-content: center;
    }
    .volume-display {
        width: 50px;
        font-size: 1rem;
        padding: 6px 8px;
    }
    .timer-button {
        width: 50px;
        padding: 6px 8px;
    }
    input[type="range"] {
        min-width: 120px;
        margin: 0 5px;
    }
    .timer-icon {
        width: 16px;
        height: 16px;
    }
} */

.volume-display {
    flex: 0 0 60px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 1.2rem;
    color: white;
}

input[type="range"] {
    flex: 1;
    margin: 0 10px;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

/* 计时器控制 */
.timer-control {
    margin-top: 30px;
    position: relative;
    display: flex;
    justify-content: center;
}



/* 顶部按钮组 - i18n、分享、捐款按钮并排 */
.utility-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 2px; /* 按钮之间的间距 */
    z-index: 101;
}

.utility-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 36px; /* 与语言选择器高度一致 */
    width: 59px; /* 总宽度120px - 2px间距后除以2，确保总宽度与语言选择器对齐 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.utility-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.utility-icon {
    font-size: 14px;
    color: white;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

@media (max-width: 600px) {
    .utility-bar {
        top: 10px;
        right: 10px;
    }
    
    .utility-bar .utility-btn {
        width: 32px;
        height: 32px;
    }
    
    .utility-btn {
        height: 32px; /* 移动端与语言选择器高度一致 */
        width: 49px; /* 移动端总宽度100px - 2px间距后除以2 */
        font-size: 12px;
    }
}

.timer-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    width: 60px;
    text-align: center;
    margin: 0 auto 20px;
    display: block;
    margin-top: auto;
    margin-bottom: auto;
}

.timer-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.timer-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}

.countdown-display.hidden {
    visibility: hidden;
}

.countdown-text {
    font-size: 1rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.timer-picker {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    display: none;
}

.timer-picker.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.timer-picker-content {
    width: 250px;
}

.timer-header {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 15px;
    color: white;
}

.timer-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.time-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
}

.time-input input {
    width: 100%;
    padding: 8px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 5px;
    text-align: center;
    font-size: 1.2rem;
}

.time-input label {
    margin-top: 5px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.timer-actions {
    display: flex;
    justify-content: space-between;
}

.timer-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.timer-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.timer-btn-primary {
    background-color: rgba(78, 156, 255, 0.7);
}

.timer-btn-primary:hover {
    background-color: rgba(78, 156, 255, 0.9);
}

/* 播放列表 */
.playlist-container {
    margin-top: 30px;
}

.countdown-display {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: -20px;
    opacity: 0.9;
    color: white;
    height: 24px; /* 保持高度稳定 */
}

.playlist {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.playlist-item {
    width: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.playlist-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.playlist-item span {
    font-size: 0.8rem;
    text-align: center;
}

.playlist-item:hover {
    opacity: 0.9;
}

.playlist-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.playlist-item.active {
    border: 1px solid #fff;
    border-radius: 8px;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.playlist-item.active {
    opacity: 1;
}

.playlist-item.active img {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.platform-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.platform-links a:hover {
    opacity: 0.7;
}

.spotify::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('../img/spotify-icon.svg') no-repeat center center;
    background-size: contain;
    margin-right: 5px;
    vertical-align: middle;
}

.apple-music::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('../img/apple-music-icon.svg') no-repeat center center;
    background-size: contain;
    margin-right: 5px;
    vertical-align: middle;
}

/* 轻量级分享和捐款按钮 */
.utility-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.utility-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: relative;
}

.utility-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* 自定义tooltip样式 */
.utility-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: var(--tooltip-opacity, 0);
    visibility: var(--tooltip-visibility, hidden);
    transition: opacity 0.1s ease, visibility 0.1s ease;
    pointer-events: none;
    z-index: 1000;
}

.utility-btn:hover::after {
    opacity: var(--tooltip-opacity, 1);
    visibility: var(--tooltip-visibility, visible);
}

/* 防止tooltip被按钮遮挡 */
.utility-btn[data-tooltip] {
    overflow: visible;
}

.utility-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.utility-dropdown.show {
    opacity: 1;
    visibility: visible;
}

/* 二维码模态框样式 */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.qr-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding-top: 30px;
    max-width: 320px;
    width: 90%;
    position: relative;
    text-align: center;
}

.qr-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: color 0.3s ease;
}

.qr-close:hover {
    color: white;
}

.qr-content h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 600;
}

.qr-image-container {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: inline-block;
}

.qr-image-container img {
    max-width: 200px;
    max-height: 200px;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.qr-tip {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    margin-top: 15px;
    visibility: hidden;
}

@media (max-width: 480px) {
    .qr-modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .qr-image-container img {
        max-width: 180px;
        max-height: 180px;
    }
}

.utility-option {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 12px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-family: 'Crimson Text', serif;
    font-size: 0.85rem;
    display: block;
}

.utility-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .play-button {
        width: 120px;
        height: 120px;
    }
    
    .play-icon {
        border-width: 20px 0 20px 32px;
        filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3));
    }
    
    .play-button.playing .play-icon {
        width: 40px;
        height: 40px;
    }
    
    .play-button.playing .play-icon:before,
    .play-button.playing .play-icon:after {
        width: 12px;
        height: 40px;
        border-radius: 6px;
        filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3));
    }
    
    .play-button.playing .play-icon:before {
        left: 8px;
    }
    
    .play-button.playing .play-icon:after {
        right: 8px;
    }
    
    .volume-slider {
        width: 150px;
    }
    
    .playlist-item {
        width: 70px;
    }
    
    .playlist-container h3 {
        font-size: 1rem;
    }
    
    .timer-picker-content {
        width: 220px;
    }
    
    .infinity-icon {
        font-size: 1.3rem;
    }
    
    .action-links {
        gap: 20px;
        margin-top: 30px;
    }
    
    .action-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .share-dropdown,
    .donate-dropdown {
        min-width: 130px;
    }
    
    .share-option,
    .donate-option {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* @media (max-width: 480px) {
    .logo h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-icon {
        border-width: 10px 0 10px 16px;
    }
    
    .volume-slider {
        width: 120px;
    }
    
    .playlist {
        gap: 10px;
    }
    
    .playlist-item {
        width: 60px;
    }
    
    .playlist-item span {
        font-size: 0.7rem;
    }
    
    .timer-button {
        padding: 6px 12px;
    }
    
    .infinity-icon {
        font-size: 1.2rem;
    }
    
    .countdown-text {
        font-size: 0.9rem;
    }
    
    .timer-picker-content {
        width: 200px;
    }
    
    .timer-header {
        font-size: 0.9rem;
    }
    
    .time-input input {
        font-size: 1rem;
        padding: 6px;
    }
    
    .timer-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
} */
