* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-primary);
    transition: opacity var(--transition-normal), transform var(--transition-normal);
    background: #121212; /* 添加一个暗色背景作为最终备用 */
    will-change: opacity, transform;
    transform: translateZ(0);
}

/* 背景遮罩 - 默认透明 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    transition: opacity var(--transition-normal), backdrop-filter var(--transition-normal);
    z-index: -1;
    will-change: opacity, backdrop-filter;
    transform: translateZ(0);
}

/* 搜索框聚焦时的背景效果 */
body.search-focused::before {
    background: var(--bg-overlay);
    backdrop-filter: var(--glass-blur);
}

.home-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .home-content {
        margin-top: 100px;
        padding: 20px 25px;
        min-height: 110px;
    }
}

@media (max-width: 768px) {
    .home-content {
        margin-left: 0;
        padding: 15px;
        padding-bottom: 200px;
    }
}

.main-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* 时钟样式 */
.clock {
    margin: 80px 0 60px;
    text-align: center;
}

.time {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 5rem;
    font-weight: 500; /* 调整字体粗细为500 */
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: 5px; /* 增加字母间距，使数字更加清晰 */
    line-height: 1.3; /* 略微增加行高 */
    animation: fadeInDown 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.2s forwards;
    user-select: none;
    -webkit-user-select: none;
}


@media screen and (max-width: 768px) {
    .time {
        font-size: 110px;
    }
}

/* 搜索区域 */
.search-area {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    transition: all var(--transition-normal);
}

.search-box {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    padding: 12px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2), 
                inset 0 4px 20px rgba(255, 255, 255, 0.3) !important;
    transform: translateZ(0);
    will-change: transform, backdrop-filter;
    overflow: hidden;
}

.search-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    z-index: -1;
    border-radius: inherit;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.search-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25), 
                inset 0 4px 20px rgba(255, 255, 255, 0.4) !important;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.3), 
                inset 0 4px 20px rgba(255, 255, 255, 0.4),
                0 0 0 2px rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

/* 搜索框聚焦时，缩小时钟 */
body.search-focused .time {
    font-size: 80px;
    margin-bottom: -30px;
    opacity: 0.7;
}

.search-icon {
    color: var(--text-tertiary);
    font-size: 20px;
    margin-left: 20px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-btn {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* 水波纹效果 */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* 音质选择器 */
.quality-selector {
    position: relative;
    width: 100%;
    max-width: 200px;
    margin: 10px auto 0;
    z-index: 10;
}

.quality-selector .select-wrapper {
    position: relative;
    width: 100%;
}

.quality-selector .select-wrapper::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: white;
    font-size: 0.7rem;
    pointer-events: none;
    opacity: 0.8;
}

.quality-selector select {
    width: 100%;
    padding: 12px 40px 12px 20px;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(31, 38, 135, 0.15), 
                inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

.quality-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 28px rgba(31, 38, 135, 0.2), 
                inset 0 2px 10px rgba(255, 255, 255, 0.25);
}

.quality-selector select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 28px rgba(31, 38, 135, 0.25), 
                inset 0 2px 10px rgba(255, 255, 255, 0.3),
                0 0 0 2px rgba(255, 255, 255, 0.5);
}

.quality-selector select option {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border: none;
}

.quality-selector select option:checked {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.quality-buttons {
    display: flex;
    gap: 6px;
    padding: 0 16px;
    scrollbar-width: none; /* Firefox */
    justify-content: center; /* Center the buttons */
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    font-family: 'DouyinSansBold', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.quality-buttons::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.quality-btn {
    position: relative;
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
    box-shadow: 0 4px 20px rgba(31, 38, 135, 0.1), 
                inset 0 1px 4px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 1;
}

.quality-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.quality-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.06);
    border-radius: inherit;
    backdrop-filter: blur(1px);
    box-shadow: inset -6px -4px 0px -11px rgba(255, 255, 255, 0.8), 
                inset 0px -6px 0px -8px rgba(255, 255, 255, 0.5);
    opacity: 0.5;
    z-index: -1;
    filter: blur(0.5px) brightness(115%);
    transition: all 0.3s ease;
}

.quality-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 24px rgba(31, 38, 135, 0.2), 
                inset 0 2px 10px rgba(255, 255, 255, 0.15);
}

.quality-btn:hover::before {
    opacity: 0.9;
}

.quality-btn:hover::after {
    opacity: 0.7;
    box-shadow: inset -8px -6px 0px -11px rgba(255, 255, 255, 1), 
                inset 0px -6px 0px -8px rgba(255, 255, 255, 0.7);
}

.quality-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(31, 38, 135, 0.1), 
                inset 0 1px 4px rgba(255, 255, 255, 0.1);
}

.quality-btn.active {
    /* Solid background for better visibility */
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 1), 
        rgba(var(--primary-rgb), 0.9)
    ) !important;
    color: white !important;
    /* Glowing border effect */
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 
        0 0 15px rgba(var(--primary-rgb), 0.7),
        0 0 30px rgba(var(--primary-rgb), 0.4),
        inset 0 2px 15px rgba(255, 255, 255, 0.5) !important;
    /* Slight scale and elevation */
    transform: translateY(-2px) scale(1.05) !important;
    /* Text styling */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    font-weight: 700;
    letter-spacing: 0.3px;
    /* Animation */
    animation: active-pulse 2s infinite alternate;
}

@keyframes active-pulse {
    0% {
        box-shadow: 
            0 0 15px rgba(var(--primary-rgb), 0.7),
            0 0 30px rgba(var(--primary-rgb), 0.4),
            inset 0 2px 15px rgba(255, 255, 255, 0.5) !important;
    }
    100% {
        box-shadow: 
            0 0 25px rgba(var(--primary-rgb), 0.9),
            0 0 40px rgba(var(--primary-rgb), 0.6),
            inset 0 2px 20px rgba(255, 255, 255, 0.7) !important;
    }
}

.quality-btn.active::before {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.4) 100%
    ) !important;
    opacity: 1 !important;
    mix-blend-mode: overlay;
}

.quality-btn.active::after {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.2) 100%
    ) !important;
    box-shadow: 
        inset -8px -6px 15px -5px rgba(255, 255, 255, 1),
        inset 0px -8px 15px -8px rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.3) !important;
    opacity: 1 !important;
    filter: blur(1px) brightness(130%) !important;
}

.quality-btn.active i {
    color: white !important;
    filter: 
        drop-shadow(0 0 5px rgba(255, 255, 255, 0.8))
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.quality-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.3);
}

.quality-btn i {
    font-size: 14px;
    margin-right: 4px;
}

/* 励志语录 */
.quote-container {
    margin: 150px auto 0;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15), 
                inset 0 2px 10px rgba(255, 255, 255, 0.2);
    text-align: center;
    width: 90%;
    max-width: 600px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transform: translateZ(0);
    will-change: transform, backdrop-filter;
}

.quote-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.quote-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: inherit;
    backdrop-filter: blur(1px);
    box-shadow: inset -8px -6px 0px -11px rgba(255, 255, 255, 0.8), 
                inset 0px -9px 0px -8px rgba(255, 255, 255, 0.6);
    opacity: 0.6;
    z-index: -1;
    filter: blur(0.5px) brightness(115%);
    transition: all 0.3s ease;
}

.quote-container:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 12px 32px rgba(31, 38, 135, 0.25), 
                inset 0 4px 15px rgba(255, 255, 255, 0.25) !important;
}

.quote-container:hover::before {
    opacity: 0.9;
}

.quote-container:hover::after {
    opacity: 0.8;
    box-shadow: inset -10px -8px 0px -11px rgba(255, 255, 255, 1), 
                inset 0px -9px 0px -8px rgba(255, 255, 255, 0.8);
}

.quote-container:active {
    transform: translateY(-2px) scale(0.99);
    transition: transform 0.1s;
}

.quote-icon {
    display: none;
}

.quote-text {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 800;
    font-style: italic;
    max-height: 60px; /* 限制最大高度 */
    overflow: hidden; /* 防止溢出 */
    text-overflow: ellipsis; /* 溢出显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制显示行数 */
    -webkit-box-orient: vertical;
    font-family: 'DouyinSansBold', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.quote-author {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 800;
    font-family: 'DouyinSansBold', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.quote-container:hover .quote-text {
    color: white;
}

.quote-container:hover .quote-author {
    color: rgba(255, 255, 255, 1);
}

/* 搜索结果 */
.results {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.loading {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    display: none;
    font-size: 15px;
    letter-spacing: 0.3px;
    background: var(--glass-effect-medium);
    backdrop-filter: blur(8px);
}

.error-message {
    text-align: center;
    padding: 16px 24px;
    background: rgba(239, 68, 68, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    color: #FF3B30;
    margin: 20px 0;
    display: none;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* Dynamic Island Style Toast Notification */
.toast {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    min-width: 120px;
    max-width: 90%;
    height: 36px;
    border-radius: 18px;
    transition: all 0.5s cubic-bezier(0.2, 0, 0, 1), 
                height 0.4s cubic-bezier(0.2, 0, 0, 1),
                border-radius 0.4s cubic-bezier(0.2, 0, 0, 1);
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    padding: 0 16px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

/* Expanded state for longer content */
.toast.expanded {
    height: auto;
    min-height: 36px;
    max-height: 80vh;
    padding: 12px 16px;
    border-radius: 18px;
}

/* Content container */
.toast-content {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    letter-spacing: -0.1px;
    line-height: 1.3;
    z-index: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: all 0.3s ease;
}

.toast.expanded .toast-content {
    white-space: normal;
    text-overflow: clip;
}

/* Show/hide animation */
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Status indicators */
.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
    border-radius: inherit;
    transition: background 0.3s ease;
}

/* Success state */
.toast.success {
    border-color: rgba(50, 215, 75, 0.3);
}

.toast.success::before {
    background: linear-gradient(90deg, 
        rgba(50, 215, 75, 0.08) 0%, 
        rgba(40, 205, 65, 0.15) 100%);
}

/* Error state */
.toast.error {
    border-color: rgba(255, 69, 58, 0.3);
}

.toast.error::before {
    background: linear-gradient(90deg, 
        rgba(255, 69, 58, 0.08) 0%, 
        rgba(255, 59, 48, 0.15) 100%);
}

/* Warning state */
.toast.warning {
    border-color: rgba(255, 159, 10, 0.3);
}

.toast.warning::before {
    background: linear-gradient(90deg, 
        rgba(255, 159, 10, 0.08) 0%, 
        rgba(255, 149, 0, 0.15) 100%);
}

/* Info state */
.toast.info {
    border-color: rgba(10, 132, 255, 0.3);
}

.toast.info::before {
    background: linear-gradient(90deg, 
        rgba(10, 132, 255, 0.08) 0%, 
        rgba(0, 122, 255, 0.15) 100%);
}

/* Icon styles */
.toast-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
    fill: currentColor;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.toast.show .toast-icon {
    opacity: 1;
    transform: scale(1);
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.1s linear;
    border-radius: 0 0 18px 18px;
}

/* Hover effect */
@media (hover: hover) {
    .toast:hover {
        background: rgba(44, 44, 46, 0.9);
        transform: translateX(-50%) translateY(0) scale(1.01);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    }
    
    .toast:hover .toast-progress {
        opacity: 0.7;
    }
}

/* Active/pressed effect */
.toast:active {
    transform: translateX(-50%) translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

/* Animation for new message */
@keyframes toastPulse {
    0% { transform: translateX(-50%) translateY(0) scale(1); }
    50% { transform: translateX(-50%) translateY(0) scale(1.02); }
    100% { transform: translateX(-50%) translateY(0) scale(1); }
}

.toast.new-message {
    animation: toastPulse 0.3s ease-out;
}

@keyframes flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animation for dynamic island effect */
@keyframes toastIn {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.song-card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.2rem;
    padding: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 6px 24px rgba(31, 38, 135, 0.15), 
                inset 0 2px 10px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
}

.song-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.song-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: inherit;
    backdrop-filter: blur(1px);
    box-shadow: inset -8px -6px 0px -11px rgba(255, 255, 255, 0.8), 
                inset 0px -9px 0px -8px rgba(255, 255, 255, 0.6);
    opacity: 0.6;
    z-index: -1;
    filter: blur(0.5px) brightness(115%);
    transition: all 0.3s ease;
}

.song-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 32px rgba(31, 38, 135, 0.25), 
                inset 0 4px 15px rgba(255, 255, 255, 0.25);
}

.song-card:hover::before {
    opacity: 0.9;
}

.song-card:hover::after {
    opacity: 0.8;
    box-shadow: inset -10px -8px 0px -11px rgba(255, 255, 255, 1), 
                inset 0px -9px 0px -8px rgba(255, 255, 255, 0.8);
}

.song-info {
    flex: 1;
}

.song-controls {
    display: flex;
    gap: 12px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.song-card:hover .song-controls {
    opacity: 1;
}

/* 按钮交互 */
.play-btn, .download-btn, .quality-btn, .search-btn {
    position: relative;
    overflow: hidden;
}

.play-btn:active, .download-btn:active, .quality-btn:active, .search-btn:active {
    transform: scale(0.95);
}

/* 涟漪效果 */
.play-btn::after, .download-btn::after, .quality-btn::after, .search-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.play-btn:active::after, .download-btn:active::after, 
.quality-btn:active::after, .search-btn:active::after {
    animation: ripple 0.5s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.song-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.singer-name {
    font-size: 14px;
    color: var(--text-secondary);
}

.play-btn, .download-btn {
    padding: 8px 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.play-btn {
    background: var(--accent-gradient);
    color: white;
    flex: 1;
}

.download-btn {
    background: var(--glass-effect-light);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

.download-btn:hover {
    background: var(--glass-effect-medium);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* 页面容器 */
.page-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* 主页 */
.home-page,
.results-page {
    width: 100%;
    height: 100%;
    position: absolute;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-page {
    left: 0;
    transform: translateX(0);
}

.results-page {
    left: 0;
    transform: translateX(100%);
}

.show-results .home-page {
    transform: translateX(-15%);  /* 主页不完全移出 */
    opacity: 0.8;
}

.show-results .results-page {
    transform: translateX(0);
}

/* 搜索结果页头部 */
.results-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.back-btn:hover {
    background: var(--bg-card-hover);
    transform: scale(1.05);
}

.search-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: -8px;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.1);
}

.search-btn:hover::before {
    opacity: 1;
}

.search-btn i {
    font-size: 1.2rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* 音质选择器样式 */
.quality-select {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quality-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

/* 暗色模式下的下拉箭头颜色 */
[data-theme="dark"] .quality-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.quality-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 149, 255, 0.1);
}

.quality-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 149, 255, 0.2);
}

/* 暗色模式下的选择器样式 */
@media (prefers-color-scheme: dark) {
    .quality-select {
        background-color: var(--bg-card);
        color: var(--text-primary);
    }
    
    .quality-select option {
        background-color: var(--bg-primary);
        color: var(--text-primary);
    }
}

.search-term {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 搜索结果容器 */
.results-container {
    height: calc(100vh - 81px);
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
}

/* 左侧列表 */
.results-list {
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid var(--glass-border);
}

/* 右侧播放器和歌词 */
.player-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lyrics-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}

/* 搜索结果卡片 */
.song-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    will-change: transform, box-shadow, border-color, background;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0.1, 1),
                box-shadow 0.3s cubic-bezier(0.2, 0, 0.1, 1),
                border-color 0.3s cubic-bezier(0.2, 0, 0.1, 1),
                background 0.3s cubic-bezier(0.2, 0, 0.1, 1);
}

.song-card:hover {
    transform: translateX(4px);
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
}

.song-card.active {
    position: relative;
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.5);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
    transform: translate3d(8px, 0, 0) scale3d(1.01, 1.01, 1);
    z-index: 1;
    overflow: hidden;
    will-change: transform, box-shadow, border-color, background;
    backface-visibility: hidden;
    perspective: 1000px;
}

.song-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(96, 165, 250, 0.1) 0%, 
        rgba(129, 140, 248, 0.2) 50%,
        rgba(96, 165, 250, 0.1) 100%);
    z-index: -1;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform, background-position;
    animation: shimmer 3s infinite linear;
    background-size: 200% 100%;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
}

.song-card.active::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    opacity: 0.3;
    transform: translate3d(0, 0, 0) rotate(30deg);
    z-index: -1;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0) rotate(30deg);
    animation: highlight 6s infinite;
}

.song-card.active .song-name,
.song-card.active .singer-name {
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
}

.song-card.active .song-name {
    font-weight: 600;
    color: #fff;
}

.song-card.active .singer-name {
    color: rgba(255, 255, 255, 0.9);
}

@keyframes shimmer {
    0% { 
        background-position: 200% 0;
        transform: translateZ(0);
    }
    100% { 
        background-position: -200% 0;
        transform: translateZ(0);
    }
}

@keyframes highlight {
    0% { 
        transform: translate3d(-100%, 0, 0) rotate(30deg);
        opacity: 0.3;
    }
    50% { 
        transform: translate3d(0%, 0, 0) rotate(30deg);
        opacity: 0.2;
    }
    100% { 
        transform: translate3d(100%, 0, 0) rotate(30deg);
        opacity: 0.3;
    }
}

/* Hardware acceleration for hover states */
.song-card:hover {
    transform: translate3d(4px, 0, 0);
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, background, border-color;
}

/* 修改输入框本身的样式 */
#searchInput {
    flex: 1;
    border: none;
    background: transparent;
    color: white;
    font-size: 1.1rem;
    padding: 4px 12px;
    outline: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    caret-color: white;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}