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

/* iOS 觸摸高亮完全禁用 */
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-action: manipulation !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 20px;
}

/* 自定義滾動條 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 頂部導航欄 */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    -webkit-backdrop-filter: blur(20px);
}

.header-content {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 16px;
    min-height: 60px;
}

.back-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #007AFF;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.back-btn:hover {
    background: rgba(0, 122, 255, 0.1);
    transform: translateX(-1px);
}

.title {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    text-align: center;
    margin: 0 60px; /* 為返回鍵和操作按鈕留出空間 */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 排序選擇器樣式 */
.sort-container {
    position: relative;
    display: flex;
    align-items: center;
}

.sort-select {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.sort-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.sort-select:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #007AFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.15);
}

.sort-select:hover::before {
    left: 100%;
}

.sort-select:focus {
    outline: none;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15), 0 4px 20px rgba(0, 122, 255, 0.2);
    transform: translateY(-1px);
}

.sort-select:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

/* 自定義下拉框樣式 */
.sort-custom {
    position: relative;
    display: none; /* 隱藏排序選擇器 - 如需啟用，改為 display: flex; */
    align-items: center;
    min-width: 140px;
}

.sort-display {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.sort-display i:first-child {
    margin-right: 8px;
    font-size: 16px;
    color: #007AFF;
}

.sort-display span {
    flex: 1;
    margin: 0 8px;
}

.sort-display i:last-child {
    font-size: 12px;
    color: #8e8e93;
    transition: transform 0.3s ease;
}

.sort-custom:hover .sort-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #007AFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.15);
}

.sort-custom:hover .sort-display i:last-child {
    transform: rotate(180deg);
}

.sort-custom.active .sort-display i:last-child {
    transform: rotate(180deg);
}

.sort-select {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

/* 自定義下拉選項容器 */
.sort-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin-top: 4px;
}

.sort-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 自定義選項樣式 */
.sort-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
    position: relative;
    overflow: hidden;
}

.sort-option:last-child {
    border-bottom: none;
}

.sort-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #007AFF;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sort-option:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #007AFF;
    transform: translateX(4px);
}

.sort-option:hover::before {
    transform: scaleY(1);
}

.sort-option.active {
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
    color: #ffffff;
    font-weight: 600;
}

.sort-option.active::before {
    transform: scaleY(1);
    background: #ffffff;
}

/* 選項圖標 */
.sort-option i {
    margin-right: 8px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 選項文字 */
.sort-option span {
    flex: 1;
}

/* 選中標記 */
.sort-option.active::after {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
}

/* 選擇器動畫效果 */
@keyframes sortSelectPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 122, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0);
    }
}

.sort-select:focus {
    animation: sortSelectPulse 1.5s ease-out;
}

/* 選擇器標籤樣式（可選） */
.sort-container::before {
    content: '排序';
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #8e8e93;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    display: none; /* 隱藏排序標籤 */
}

.sort-container:hover::before {
    opacity: 0; /* 隱藏排序標籤 */
}

/* 桌面端顯示標籤 */
@media (min-width: 769px) {
    .sort-container::before {
        opacity: 0; /* 隱藏排序標籤 */
        left: -35px;
    }
}

.search-container {
    display: flex;
    align-items: center;
    background: #f2f2f7;
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 200px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.search-container:focus-within {
    background: #ffffff;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    padding: 4px 8px;
    font-size: 14px;
    color: #1d1d1f;
    font-family: inherit;
}

.search-input::placeholder {
    color: #8e8e93;
}

.search-btn {
    background: none;
    border: none;
    color: #8e8e93;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.search-btn:hover {
    color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
}

.view-toggle {
    background: none;
    border: none;
    font-size: 16px;
    color: #8e8e93;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.view-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #007AFF;
}

/* 麵包屑導航 */
.breadcrumb {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 16px;
    font-weight: 400;
}

/* 操作提示 */
.operation-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 13px;
    color: #1976d2;
    animation: slideDown 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.operation-tip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.operation-tip i {
    font-size: 14px;
    color: #1976d2;
}

.operation-tip span {
    flex: 1;
    font-weight: 500;
}

/* 手機端提示文字樣式 */
.tip-text-mobile {
    display: none;
}

/* 手機端顯示移動端提示文字 */
@media (max-width: 768px) {
    .tip-text {
        display: none;
    }
    
    .tip-text-mobile {
        display: block !important;
    }
}

.tip-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.tip-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.tip-close i {
    font-size: 12px;
}

.breadcrumb-item {
    color: #8e8e93;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.breadcrumb-item:hover {
    color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
}

.breadcrumb-item.active {
    color: #1d1d1f;
    font-weight: 500;
}

.breadcrumb-item:not(:last-child)::after {
    content: ' › ';
    margin: 0 6px;
    color: #c7c7cc;
    font-weight: 300;
}

/* 公告區域 */
.announcement-container {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 1px 20px;
}

.announcement-bar {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
    border: 1px solid #007AFF;
    border-radius: 4px;
    padding: 2px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 20px;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.1);
    transition: all 0.2s ease;
}

.announcement-bar:hover {
    border-color: #0056CC;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.15);
}

.announcement-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.announcement-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.announcement-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap;
}

.announcement-separator {
    color: #8e8e93;
    font-size: 14px;
    font-weight: 300;
}

.contact-label {
    font-size: 15px;
    color: #007AFF;
    font-weight: 600;
    white-space: nowrap;
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(0, 122, 255, 0.2);
    position: relative;
}

.contact-label::before {
    content: "💬";
    margin-right: 4px;
    font-size: 14px;
    -webkit-text-fill-color: #007AFF;
    background: none;
}

.wechat-id {
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #1aad19 0%, #07c160 100%);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
    letter-spacing: 0.8px;
    font-size: 14px;
    border: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(26, 173, 25, 0.3);
    position: relative;
    transition: all 0.2s ease;
}

.wechat-id::before {
    content: "📱";
    margin-right: 4px;
    font-size: 12px;
}

.wechat-id:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 173, 25, 0.4);
}

/* 代理識別加載動畫 */
.wechat-id.loading {
    background: linear-gradient(135deg, #8e8e93 0%, #a8a8a8 100%);
    color: #ffffff;
    animation: pulse-loading 1.5s ease-in-out infinite;
}

@keyframes pulse-loading {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* 微信號顯示動畫 */
.wechat-id.fade-in {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.copy-btn {
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #0056CC;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn i {
    font-size: 12px;
}

/* 複製按鈕的tooltip樣式 */
.copy-btn {
    position: relative;
}

.copy-btn::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.copy-btn::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.copy-btn:hover::after,
.copy-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

.copy-btn:hover::before {
    transform: translateX(-50%) translateY(-4px);
}

.qr-code-container {
    position: relative;
}

.qr-code {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
    cursor: pointer;
}

.qr-code:hover {
    border-color: #007AFF;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

/* 主內容區域 */
.main-content {
    padding: 20px;
    min-height: calc(100vh - 140px);
    background: #ffffff;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    padding: 12px 0;
    align-items: start;
    overflow: hidden;
}

/* 桌面端網格視圖 */
@media (min-width: 768px) {
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 28px;
    }
}

/* 文件項目 */
.file-item {
    background: transparent;
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
    justify-content: flex-start;
    padding-top: 20px;
    /* 改善觸摸體驗 - 完全禁用高亮 */
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    touch-action: manipulation !important;
    /* 優化觸控響應 */
    transition: transform 0.1s ease, opacity 0.1s ease;
    /* 確保觸摸區域足夠大 */
    min-width: 44px;
    min-height: 44px;
}

.file-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(0, 122, 255, 0.05));
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 8px;
    z-index: -1;
}

.file-item:hover {
    transform: scale(1.02);
}

/* 當前播放歌曲的高亮效果 */
.file-item.playing {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.08), rgba(0, 122, 255, 0.04)) !important;
    border: 2px solid rgba(0, 122, 255, 0.4) !important;
    box-shadow: 
        0 0 0 1px rgba(0, 122, 255, 0.1),
        0 2px 8px rgba(0, 122, 255, 0.2),
        0 4px 16px rgba(0, 122, 255, 0.1) !important;
    transform: translateZ(0) !important;
    position: relative !important;
    /* 優化渲染性能 */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.file-item.playing::before {
    opacity: 1 !important;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.12), rgba(0, 122, 255, 0.06)) !important;
    border-radius: 10px !important;
}

/* 播放狀態指示器 */
.file-item.playing::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #007AFF;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 8px rgba(0, 122, 255, 0.6);
    animation: pulse-dot 2s infinite;
    z-index: 10;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.file-item.playing .file-icon {
    color: #007AFF !important;
}

.file-item.playing .file-name {
    color: #007AFF !important;
    font-weight: 600 !important;
}

.file-item:hover::before {
    opacity: 1;
}

.file-item.selected {
    background: rgba(0, 122, 255, 0.08);
    border: 1px solid rgba(0, 122, 255, 0.3);
}

/* 移除 file-item:active 樣式，避免頭像閃爍 */

.file-icon {
    font-size: 56px;
    margin-bottom: 12px;
    color: #8e8e93;
    transition: all 0.2s ease;
}

/* 確保音樂文件圖標顯示為紅色 */
.file-item[data-type="audio"] .file-icon {
    color: #FF3B30 !important;
}

.file-item:hover .file-icon {
    transform: scale(1.1);
}

/* 文件封面圖片樣式 */
.file-cover-container {
    position: relative;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: none; /* 默認隱藏，等待加載成功 */
}

.file-cover-fallback {
    font-size: 56px;
    color: #FF3B30;
    transition: all 0.2s ease;
    display: block; /* 默認顯示 */
}

/* 封面顯示控制類 */
.cover-show {
    display: block !important;
}

.cover-hide {
    display: none !important;
}

.file-item:hover .file-cover-image {
    transform: scale(1.1);
}

.file-item:hover .file-cover-fallback {
    transform: scale(1.1);
    color: #FF3B30;
}

.file-item[data-type="folder"] .file-icon {
    color: #FF9500;
}

.file-item[data-type="audio"] .file-icon {
    color: #FF3B30;
}

.file-item[data-type="image"] .file-icon {
    color: #34C759;
}

.file-item[data-type="video"] .file-icon {
    color: #AF52DE;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    word-break: break-word;
    line-height: 1.2;
    margin-bottom: 6px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 限制為2行 */
    line-clamp: 2; /* 標準屬性 */
    min-height: 33.6px; /* 2行的高度：14px * 1.2 * 2 */
    max-height: 33.6px; /* 限制為2行的高度 */
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.file-meta {
    font-size: 12px;
    color: #8e8e93;
    line-height: 1.2;
    text-align: center;
}

/* 文件夾統計信息樣式 */
.file-item[data-type="folder"] .file-meta {
    font-size: 11px;
    color: #007AFF;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(0, 122, 255, 0.05));
    padding: 5px 10px;
    border-radius: 15px;
    margin-top: 6px;
    display: inline-block;
    border: 1px solid rgba(0, 122, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 122, 255, 0.1);
    position: relative;
}

/* 文件夾統計信息圖標樣式 */
.file-item[data-type="folder"] .file-meta.homepage-stats::before {
    content: '📊';
    margin-right: 4px;
    font-size: 10px;
}

.file-item[data-type="folder"] .file-meta.song-count::before {
    content: '🎵';
    margin-right: 4px;
    font-size: 10px;
}

/* 首頁統計信息特殊樣式 */
.file-item[data-type="folder"] .file-meta.homepage-stats {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(52, 199, 89, 0.05));
    border: 1px solid rgba(52, 199, 89, 0.2);
    color: #34C759;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(52, 199, 89, 0.15);
}

.file-item[data-type="folder"] .file-meta.homepage-stats::before {
    content: '📊';
    margin-right: 6px;
    font-size: 11px;
}

.file-item[data-type="folder"]:hover .file-meta.homepage-stats {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.15), rgba(52, 199, 89, 0.08));
    border-color: rgba(52, 199, 89, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(52, 199, 89, 0.25);
}

.file-item[data-type="folder"]:hover .file-meta {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(0, 122, 255, 0.08));
    border-color: rgba(0, 122, 255, 0.3);
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(0, 122, 255, 0.2);
}

/* 列表視圖中的文件夾統計信息 */
.file-grid.list-view .file-item[data-type="folder"] .file-meta {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.08), rgba(0, 122, 255, 0.04));
    border: 1px solid rgba(0, 122, 255, 0.15);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    margin-top: 3px;
    display: inline-block;
    font-weight: 600;
}

.file-grid.list-view .file-item[data-type="folder"]:hover .file-meta {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.12), rgba(0, 122, 255, 0.06));
    border-color: rgba(0, 122, 255, 0.25);
    transform: scale(1.05);
}

/* 列表視圖 */
.file-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1px;
    background: #f2f2f7;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    margin-bottom: 20px; /* 添加底部間距 */
}

.file-grid.list-view .file-item {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 0;
    min-height: 60px;
    border-bottom: 1px solid #f2f2f7;
    flex-direction: row;
    justify-content: flex-start;
}

.file-grid.list-view .file-item:last-child {
    border-bottom: none;
}

.file-grid.list-view .file-item:hover {
    background: rgba(0, 122, 255, 0.08);
    transform: none;
}

.file-grid.list-view .file-icon {
    font-size: 24px;
    margin-right: 12px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.file-grid.list-view .file-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.file-grid.list-view .file-name {
    margin-bottom: 2px;
    text-align: left;
    -webkit-line-clamp: unset !important; /* 取消行數限制 */
    white-space: normal !important; /* 允許換行 */
    overflow: visible !important; /* 取消隱藏 */
    text-overflow: unset !important; /* 取消省略號 */
    max-width: none !important; /* 取消寬度限制 */
    max-height: none !important; /* 取消最大高度限制 */
    min-height: auto !important; /* 取消最小高度限制 */
    display: block !important; /* 取消flexbox限制 */
    -webkit-box-orient: unset !important; /* 取消flexbox方向限制 */
}

.file-grid.list-view .file-meta {
    text-align: left;
}

/* 列表視圖中的播放狀態樣式 */
.file-grid.list-view .file-item.playing {
    background: linear-gradient(90deg, rgba(0, 122, 255, 0.08), rgba(0, 122, 255, 0.04)) !important;
    border-left: 3px solid #007AFF !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(0, 122, 255, 0.2) !important;
    box-shadow: 
        0 2px 8px rgba(0, 122, 255, 0.1),
        0 1px 3px rgba(0, 122, 255, 0.05) !important;
    transform: none !important;
}

.file-grid.list-view .file-item.playing::after {
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #007AFF;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 6px rgba(0, 122, 255, 0.6);
    animation: pulse-dot 2s infinite;
}

/* 加載指示器 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #8e8e93;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(0, 122, 255, 0.2);
    border-top: 2px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8e8e93;
    font-size: 16px;
    font-weight: 500;
}

.empty-state::before {
    content: '📁';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 錯誤狀態 */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #FF3B30;
    font-size: 16px;
    font-weight: 500;
}

.error-state::before {
    content: '⚠️';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
}

/* 音樂播放器 */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px 20px;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    min-height: 80px;
}

.player-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    min-height: 48px;
}

/* 桌面端不顯示關閉按鈕 */
.close-player-btn {
    display: none;
}

.track-info {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 確保從左邊開始對齊 */
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.track-artwork {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff4757, #ff3838) !important;
    border-radius: 8px;
    display: flex;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.track-artwork:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
    overflow: hidden;
    position: relative;
}

/* 封面圖片樣式 */
.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cover-image:hover {
    transform: scale(1.05);
}

.track-details {
    min-width: 0;
}

.track-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 禁用觸控高亮效果 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #007AFF;
}

.play-btn {
    background: #007AFF;
    color: white;
    font-size: 1.4rem;
    width: 50px;
    height: 50px;
    /* 禁用觸控高亮效果 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.play-btn:hover {
    background: #0056CC;
    color: white;
}

/* 安卓手機觸控按鈕優化 */
.control-btn:active,
.play-btn:active {
    background: rgba(0, 122, 255, 0.8) !important;
    transform: scale(0.95);
    -webkit-tap-highlight-color: transparent !important;
}

/* 確保按鈕在觸控時沒有高亮方塊 */
.control-btn:focus,
.play-btn:focus {
    outline: none;
    -webkit-tap-highlight-color: transparent !important;
}

.music-player .progress-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.music-player .progress-container .time {
    align-self: center; /* 確保時間文字垂直居中 */
    line-height: 1; /* 統一行高 */
}

.time {
    font-size: 0.8rem;
    color: #666;
    font-variant-numeric: tabular-nums;
    min-width: 35px;
}

.music-player .progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    align-self: center; /* 確保進度條垂直居中 */
}

.music-player .progress {
    height: 100%;
    background: #007AFF;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.volume-container i {
    font-size: 0.9rem;
    color: #666;
}

.volume-slider {
    flex: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #007AFF;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #007AFF;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 提示消息 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    min-width: 280px;
}

.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    line-height: 1.4;
    flex: 1;
}

/* 不同類型的提示樣式 */
.toast-success {
    border-left: 4px solid #34C759;
}

.toast-success .toast-icon {
    color: #34C759;
}

.toast-error {
    border-left: 4px solid #FF3B30;
}

.toast-error .toast-icon {
    color: #FF3B30;
}

.toast-info {
    border-left: 4px solid #007AFF;
}

.toast-info .toast-icon {
    color: #007AFF;
}

.toast-warning {
    border-left: 4px solid #FF9500;
}

.toast-warning .toast-icon {
    color: #FF9500;
}

/* 手機端提示樣式 */
@media (max-width: 768px) {
    .toast {
        bottom: 16px;
        left: 16px;
        right: 16px;
        transform: translateY(100%);
        max-width: none;
        min-width: auto;
    }
    
    .toast-show {
        transform: translateY(0);
    }
    
    .toast-content {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .toast-icon {
        font-size: 18px;
    }
    
    .toast-message {
        font-size: 13px;
    }
}

/* 模態框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d1d1f;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow: auto;
}

/* 掃描面板樣式 */
.scan-panel {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.scan-header {
    text-align: center;
    margin-bottom: 2rem;
}

.scan-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.scan-header p {
    color: #666;
    font-size: 1rem;
}

.scan-controls {
    margin-bottom: 2rem;
}

.path-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.path-input-group label {
    font-weight: 500;
    color: #1d1d1f;
    min-width: 80px;
}

.path-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e5e7;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.path-input-group input:focus {
    outline: none;
    border-color: #007AFF;
}

.scan-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 按鈕樣式 */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    text-decoration: none;
    min-height: 36px;
}

.btn-primary {
    background: #007AFF;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.4);
}

.btn-secondary {
    background: #f2f2f7;
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #e5e5ea;
    transform: translateY(-1px);
}

.btn-danger {
    background: #FF3B30;
    color: white;
    box-shadow: 0 1px 3px rgba(255, 59, 48, 0.3);
}

.btn-danger:hover {
    background: #D70015;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
}

.btn-outline {
    background: transparent;
    color: #007AFF;
    border: 1px solid #007AFF;
}

.btn-outline:hover {
    background: #007AFF;
    color: white;
    transform: translateY(-1px);
}

/* 掃描進度 */
.scan-progress {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e5e7;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #34C759);
    width: 0%;
    transition: width 0.3s ease;
}

.scan-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d1d1f;
}

/* 掃描日誌 */
.scan-log {
    background: #1d1d1f;
    border-radius: 8px;
    padding: 1.5rem;
    color: white;
}

.scan-log h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.log-content {
    background: #000;
    border-radius: 4px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 300px;
    overflow-y: auto;
}

.log-entry {
    margin-bottom: 0.25rem;
}

.log-entry.success {
    color: #34C759;
}

.log-entry.error {
    color: #FF3B30;
}

.log-entry.info {
    color: #007AFF;
}

.log-entry.warning {
    color: #FF9500;
}


/* 桌面端樣式 */
@media (min-width: 769px) {
    /* 桌面端公告區域優化 */
    .announcement-container {
        padding: 10px 20px;
    }
    
    .announcement-bar {
        padding: 12px 20px;
        min-height: 48px;
        border-radius: 10px;
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .announcement-left {
        gap: 16px;
    }
    
    .announcement-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .announcement-text {
        gap: 10px;
    }
    
    .announcement-title {
        font-size: 15px;
    }
    
    .announcement-separator {
        font-size: 13px;
    }
    
    .contact-label {
        font-size: 14px;
    }
    
    .wechat-id {
        font-size: 13px;
        padding: 3px 8px;
        border-radius: 5px;
    }
    
    .announcement-right {
        gap: 16px;
    }
    
    .copy-btn {
        width: 28px;
        height: 28px;
        border-radius: 5px;
        font-size: 11px;
    }
    
    .copy-btn i {
        font-size: 11px;
    }
    
    .qr-code {
        width: 56px;
        height: 56px;
        border-radius: 8px;
        border-width: 2px;
    }
    
    .qr-code-container::after {
        font-size: 11px;
        bottom: -24px;
    }
}

/* 大屏幕設備優化 */
@media (min-width: 1200px) {
    .announcement-container {
        padding: 12px 24px;
    }
    
    .announcement-bar {
        padding: 14px 24px;
        min-height: 52px;
        border-radius: 12px;
        max-width: 1200px;
    }
    
    .announcement-left {
        gap: 18px;
    }
    
    .announcement-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .announcement-text {
        gap: 12px;
    }
    
    .announcement-title {
        font-size: 16px;
    }
    
    .announcement-separator {
        font-size: 14px;
    }
    
    .contact-label {
        font-size: 15px;
    }
    
    .wechat-id {
        font-size: 14px;
        padding: 4px 10px;
        border-radius: 6px;
    }
    
    .announcement-right {
        gap: 18px;
    }
    
    .copy-btn {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        font-size: 12px;
    }
    
    .copy-btn i {
        font-size: 12px;
    }
    
    .qr-code {
        width: 64px;
        height: 64px;
        border-radius: 10px;
        border-width: 2px;
    }
}

/* 超大屏幕設備優化 (4K等) */
@media (min-width: 1600px) {
    .announcement-container {
        padding: 14px 28px;
    }
    
    .announcement-bar {
        padding: 16px 28px;
        min-height: 56px;
        border-radius: 14px;
        max-width: 1400px;
    }
    
    .announcement-left {
        gap: 20px;
    }
    
    .announcement-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .announcement-text {
        gap: 14px;
    }
    
    .announcement-title {
        font-size: 17px;
    }
    
    .announcement-separator {
        font-size: 15px;
    }
    
    .contact-label {
        font-size: 16px;
    }
    
    .wechat-id {
        font-size: 15px;
        padding: 5px 12px;
        border-radius: 7px;
    }
    
    .announcement-right {
        gap: 20px;
    }
    
    .copy-btn {
        width: 36px;
        height: 36px;
        border-radius: 7px;
        font-size: 13px;
    }
    
    .copy-btn i {
        font-size: 13px;
    }
    
    .qr-code {
        width: 72px;
        height: 72px;
        border-radius: 12px;
        border-width: 2px;
    }
}

/* 桌面端樣式 */
@media (min-width: 769px) {
    .header-top {
        display: contents !important; /* 在桌面端不顯示這個容器 */
    }
    
    .title {
        text-align: left !important;
        margin: 0 !important;
        flex: 1 !important;
        font-size: 20px !important;
        font-weight: 600 !important;
        color: #1d1d1f !important;
        letter-spacing: -0.01em !important;
    }
    
    .search-container {
        order: unset !important;
        width: auto !important;
        min-width: 200px !important;
        max-width: 300px !important;
        background: #f2f2f7 !important;
        border-radius: 10px !important;
        padding: 8px 12px !important;
        border: 1px solid transparent !important;
        transition: all 0.2s ease !important;
        margin-top: 0 !important;
    }
    
    .search-container:focus-within {
        background: #ffffff !important;
        border-color: #007AFF !important;
        box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1) !important;
    }
    
    .header-actions {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .btn {
        padding: 10px 16px !important;
        font-size: 14px !important;
        min-height: 36px !important;
        border-radius: 8px !important;
        font-weight: 500 !important;
        box-shadow: none !important;
    }
    
    .btn-outline {
        background: transparent !important;
        color: #007AFF !important;
        border: 2px solid #007AFF !important;
    }
    
    .btn-outline:hover {
        background: #007AFF !important;
        color: white !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 6px rgba(0, 122, 255, 0.4) !important;
    }
    
    .view-toggle {
        background: none !important;
        border: none !important;
        font-size: 16px !important;
        color: #8e8e93 !important;
        cursor: pointer !important;
        padding: 8px !important;
        border-radius: 6px !important;
        transition: all 0.2s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
    }
    
    .view-toggle:hover {
        background: rgba(0, 0, 0, 0.1) !important;
        color: #007AFF !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .app-container {
        border-radius: 0;
        box-shadow: none;
    }
    
    .header {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .header-content {
        padding: 12px 16px;
        gap: 12px;
        min-height: 64px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
    }
    
    .title {
        font-size: 18px;
        font-weight: 600;
        text-align: center;
        flex: 1;
        margin: 0;
        color: #1d1d1f;
    }
    
    .header-actions {
        gap: 8px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }
    
    /* 手機端排序選擇器樣式 */
    .sort-container {
        order: -1; /* 排序選擇器放在最前面 */
        flex: 1;
        max-width: 120px;
    }
    
    .sort-custom {
        min-width: 100px;
    }
    
    .sort-display {
        font-size: 13px;
        font-weight: 600;
        padding: 8px 12px;
        border-radius: 10px;
        border-width: 1.5px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }
    
    .sort-display i:first-child {
        font-size: 14px;
        margin-right: 6px;
    }
    
    .sort-display span {
        margin: 0 6px;
        font-size: 13px;
    }
    
    .sort-display i:last-child {
        font-size: 10px;
    }
    
    .sort-custom:hover .sort-display {
        transform: translateY(-0.5px);
        box-shadow: 0 2px 8px rgba(0, 122, 255, 0.12);
    }
    
    .sort-dropdown {
        border-radius: 10px;
        margin-top: 2px;
    }
    
    .sort-option {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .sort-option i {
        font-size: 14px;
        margin-right: 6px;
        width: 16px;
    }
    
    .search-container {
        width: 100%;
        margin-top: 0;
        order: unset;
        min-width: unset;
        max-width: unset;
        background: #f2f2f7;
        border-radius: 12px;
        padding: 10px 16px;
        border: 1px solid transparent;
        transition: all 0.2s ease;
    }
    
    .search-container:focus-within {
        background: #ffffff;
        border-color: #007AFF;
        box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    }
    
    .view-toggle {
        order: unset;
        background: #f2f2f7;
        border: 1px solid rgba(0, 0, 0, 0.1);
        color: #8e8e93;
        font-size: 16px;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .view-toggle:hover {
        background: #e5e5ea;
        color: #007AFF;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
        min-height: 36px;
        border-radius: 8px;
        font-weight: 500;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .btn-outline {
        background: #ffffff;
        color: #007AFF;
        border: 1px solid #007AFF;
    }
    
    .btn-outline:hover {
        background: #007AFF;
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
    }
    
    .main-content {
        padding: 12px;
        padding-bottom: 100px; /* 為播放器預留空間 */
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 14px;
        padding-bottom: 20px; /* 額外的底部間距 */
        overflow: hidden;
    }
    
    .file-item {
        padding: 12px 6px;
        min-height: 100px;
        padding-top: 16px;
        border-radius: 8px;
        /* 手機端觸摸優化 */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        /* 優化觸控響應 */
        transition: transform 0.1s ease, opacity 0.1s ease;
        /* 確保觸摸區域足夠大 */
        min-width: 44px;
        min-height: 44px;
    }
    
    /* 觸摸反饋效果 */
    .file-item:active {
        transform: scale(0.98);
        opacity: 0.8;
        transition: transform 0.05s ease, opacity 0.05s ease;
    }
    
    .file-icon {
        font-size: 40px;
        margin-bottom: 8px;
    }
    
    /* 確保手機端音樂文件圖標顯示為紅色 */
    .file-item[data-type="audio"] .file-icon {
        color: #FF3B30 !important;
    }
    
    .file-name {
        font-size: 12px;
        line-height: 1.2;
        -webkit-line-clamp: 2; /* 限制為2行 */
    line-clamp: 2; /* 標準屬性 */
        min-height: 28.8px; /* 2行的高度：12px * 1.2 * 2 */
        max-height: 28.8px; /* 限制為2行的高度 */
    }
    
    .file-meta {
        font-size: 10px;
    }
    
    /* 手機端播放狀態優化 */
    .file-item.playing::after {
        top: 6px;
        right: 6px;
        width: 6px;
        height: 6px;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 4px rgba(0, 122, 255, 0.6);
    }
    
    /* 手機端滑動優化 */
    .file-item {
        /* 改善滑動體驗 */
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        /* 防止滑動時的誤觸 */
        touch-action: pan-y;
        /* 增加觸摸區域的穩定性 */
        -webkit-tap-highlight-color: transparent;
        /* 優化渲染性能 */
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    /* 滑動時的視覺反饋 - 減少動畫 */
    .file-item:active {
        transform: scale(0.99) translateZ(0);
        transition: none; /* 移除過渡動畫，減少卡頓 */
    }
    
    /* 防止滑動時的高亮閃爍 */
    .file-item.playing:active {
        transform: translateZ(0) !important;
        transition: none !important;
    }
    
    /* 防止頭像閃爍 */
    .file-cover-container {
        position: relative;
        overflow: hidden;
    }
    
    .file-cover-image {
        transition: opacity 0.1s ease;
        /* 防止閃爍 */
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    .file-cover-fallback {
        transition: opacity 0.1s ease;
        /* 防止閃爍 */
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    /* 防止觸摸時頭像閃爍 */
    .file-item:active .file-cover-image,
    .file-item:active .file-cover-fallback {
        transition: none;
    }
    
    /* 已加載的封面不應該被默認圖標覆蓋 - 只在圖片可見時隱藏 */
    .file-cover-container:has(.file-cover-image[style*="display: block"]) .file-cover-fallback {
        display: none !important;
    }
    
    /* 安卓設備性能優化 */
    .file-grid {
        /* 啟用硬件加速 */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        /* 優化重繪 */
        contain: layout style paint;
        /* 減少重排 */
        will-change: scroll-position;
        /* 優化滾動性能 */
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        /* 減少重繪 */
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    .file-item {
        /* 安卓設備優化 */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        /* 減少重繪 */
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        /* 優化動畫性能 */
        will-change: transform;
        /* 優化觸摸響應 */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        contain: layout style;
        /* 強力禁用選擇和長按 */
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        /* 禁用拖拽 */
        -webkit-user-drag: none !important;
        -khtml-user-drag: none !important;
        -moz-user-drag: none !important;
        -o-user-drag: none !important;
        /* 禁用長按高亮 */
        -webkit-tap-highlight-color: transparent !important;
        /* 禁用文本選擇 */
        -webkit-text-size-adjust: none;
        -moz-text-size-adjust: none;
        -ms-text-size-adjust: none;
        text-size-adjust: none;
    }
    
    /* 進一步優化安卓滾動性能 */
    .file-grid::-webkit-scrollbar {
        width: 0;
        background: transparent;
    }
    
    /* 優化文件項目的觸摸響應 */
    .file-item:active {
        transform: scale(0.98) translateZ(0);
        transition: none;
    }
    
    /* 優化安卓設備的動畫性能 */
    @media (max-width: 768px) {
        .file-item {
            /* 減少動畫複雜度 */
            transition: transform 0.1s ease;
        }
        
        .file-item.playing {
            /* 簡化播放狀態動畫 */
            animation: none;
        }
        
        .file-item.playing::after {
            /* 簡化播放指示器動畫 */
            animation: pulse 1.5s ease-in-out infinite;
        }
    }
    
    /* 全局禁用選擇和長按 */
    * {
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
        -webkit-tap-highlight-color: initial !important;
    }
    
    /* iOS 特定修復 - 完全禁用觸摸高亮 */
    @supports (-webkit-touch-callout: none) {
        .file-item,
        .file-item *,
        button,
        a,
        [role="button"] {
            -webkit-tap-highlight-color: transparent !important;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
            -webkit-touch-callout: none !important;
            -webkit-user-select: none !important;
            -webkit-touch-action: manipulation !important;
        }
    }
    
    /* 允許輸入框選擇文本 */
    input, textarea {
        -webkit-user-select: text !important;
        -moz-user-select: text !important;
        -ms-user-select: text !important;
        user-select: text !important;
    }
    
    .breadcrumb {
        padding: 6px 16px;
        font-size: 14px;
        background: #f8f9fa;
    }
    
    .breadcrumb-item {
        padding: 1px 3px;
    }
    
    /* 手機端操作提示 */
    .operation-tip {
        padding: 6px 16px;
        font-size: 12px;
    }
    
    .operation-tip span {
        font-size: 12px;
    }
    
    /* 手機端公告區域 */
    .announcement-container {
        padding: 6px 16px;
    }
    
    .announcement-bar {
        padding: 8px 12px;
        gap: 12px;
        min-height: 40px;
    }
    
    .announcement-left {
        gap: 8px;
    }
    
    .announcement-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .announcement-title {
        font-size: 12px;
    }
    
    .announcement-separator {
        font-size: 10px;
    }
    
    .contact-label {
        font-size: 11px;
    }
    
    .contact-label::before {
        font-size: 10px;
        margin-right: 3px;
    }
    
    .wechat-id {
        font-size: 11px;
        padding: 3px 8px;
        border-radius: 5px;
    }
    
    .wechat-id::before {
        font-size: 9px;
        margin-right: 3px;
    }
    
    .announcement-right {
        gap: 8px;
    }
    
    .copy-btn {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .copy-btn i {
        font-size: 10px;
    }
    
    .qr-code {
        width: 32px;
        height: 32px;
        border-radius: 4px;
    }
    
    /* 手機端tooltip樣式 */
    .copy-btn::after {
        font-size: 11px;
        padding: 6px 10px;
        border-radius: 6px;
    }
    
    .copy-btn::before {
        border-width: 4px;
    }
}

@media (max-width: 480px) {
    /* 小屏幕公告區域優化 */
    .announcement-container {
        padding: 4px 12px;
    }
    
    .announcement-bar {
        padding: 6px 10px;
        gap: 8px;
        min-height: 36px;
    }
    
    .announcement-left {
        gap: 6px;
    }
    
    .announcement-icon {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .announcement-title {
        font-size: 11px;
    }
    
    .announcement-separator {
        font-size: 9px;
    }
    
    .contact-label {
        font-size: 10px;
    }
    
    .contact-label::before {
        font-size: 9px;
        margin-right: 2px;
    }
    
    .wechat-id {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 4px;
    }
    
    .wechat-id::before {
        font-size: 8px;
        margin-right: 2px;
    }
    
    .announcement-right {
        gap: 6px;
    }
    
    .copy-btn {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
    
    .copy-btn i {
        font-size: 9px;
    }
    
    .qr-code {
        width: 28px;
        height: 28px;
        border-radius: 3px;
    }
    
    /* 小屏幕tooltip樣式 */
    .copy-btn::after {
        font-size: 10px;
        padding: 5px 8px;
        border-radius: 5px;
    }
    
    .copy-btn::before {
        border-width: 3px;
    }
}

@media (max-width: 360px) {
    /* 超小屏幕公告區域優化 */
    .announcement-container {
        padding: 3px 8px;
    }
    
    .announcement-bar {
        padding: 5px 8px;
        gap: 6px;
        min-height: 32px;
    }
    
    .announcement-left {
        gap: 4px;
    }
    
    .announcement-icon {
        width: 20px;
        height: 20px;
        font-size: 8px;
    }
    
    .announcement-title {
        font-size: 10px;
    }
    
    .announcement-separator {
        font-size: 8px;
    }
    
    .contact-label {
        font-size: 9px;
    }
    
    .contact-label::before {
        font-size: 8px;
        margin-right: 2px;
    }
    
    .wechat-id {
        font-size: 9px;
        padding: 2px 4px;
        border-radius: 3px;
    }
    
    .wechat-id::before {
        font-size: 7px;
        margin-right: 2px;
    }
    
    .announcement-right {
        gap: 4px;
    }
    
    .copy-btn {
        width: 20px;
        height: 20px;
        font-size: 8px;
    }
    
    .copy-btn i {
        font-size: 8px;
    }
    
    .qr-code {
        width: 24px;
        height: 24px;
        border-radius: 2px;
    }
    
    /* 超小屏幕排序選擇器優化 */
    .sort-container {
        max-width: 100px;
    }
    
    .sort-custom {
        min-width: 90px;
    }
    
    .sort-display {
        font-size: 12px;
        padding: 6px 10px;
        border-radius: 8px;
    }
    
    .sort-display i:first-child {
        font-size: 12px;
        margin-right: 4px;
    }
    
    .sort-display span {
        margin: 0 4px;
        font-size: 12px;
    }
    
    .sort-display i:last-child {
        font-size: 9px;
    }
    
    .sort-dropdown {
        border-radius: 8px;
    }
    
    .sort-option {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .sort-option i {
        font-size: 12px;
        margin-right: 4px;
        width: 14px;
    }
    
    /* 超小屏幕tooltip樣式 */
    .copy-btn::after {
        font-size: 9px;
        padding: 4px 6px;
        border-radius: 4px;
    }
    
    .copy-btn::before {
        border-width: 3px;
    }
    
    /* 手機端播放器優化 - 確保進度條正常顯示 */
    .music-player {
        padding: 12px 16px 12px 0 !important; /* 左邊不設padding，確保從最左邊開始 */
        min-height: 90px !important;
    }
    
    .player-content {
        display: flex !important;
        flex-direction: column;
        gap: 8px; /* 增加間距 */
        padding: 4px 4px 4px 0; /* 左邊不設padding，確保從最左邊開始 */
    }
    
    .track-info {
        width: 100%;
        max-width: calc(100vw - 80px); /* 限制最大寬度，避免超出屏幕 */
        padding-right: 40px; /* 為關閉按鈕預留空間 */
        padding-left: 0; /* 確保從最左邊開始 */
        display: flex;
        align-items: center;
        justify-content: flex-start; /* 確保從左邊開始對齊 */
        gap: 8px;
        min-height: 50px; /* 固定最小高度 */
        overflow: hidden; /* 防止內容溢出 */
    }
    
    /* 手機端封面圖片樣式 */
    .track-artwork {
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, #ff4757, #ff3838) !important;
        border-radius: 6px;
        display: flex;
        cursor: pointer;
        transition: all 0.2s ease;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1rem;
        flex-shrink: 0; /* 防止縮小 */
        order: 1; /* 固定位置 */
        overflow: hidden;
        position: relative;
    }
    
    .cover-image {
        border-radius: 6px;
    }
    
    .track-details {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 48px); /* 限制最大寬度，為頭像預留空間 */
        order: 2; /* 固定位置 */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start; /* 確保內容從左邊開始對齊 */
        text-align: left; /* 強制文字左對齊 */
        overflow: hidden; /* 防止內容溢出 */
    }
    
    .track-title {
        font-size: 0.85rem; /* 稍微減小字體 */
        width: 100%;
        max-width: 100%; /* 確保不超出容器 */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin: 0;
        line-height: 1.2;
        text-align: left; /* 強制標題左對齊 */
    }
    
    .track-artist {
        font-size: 0.75rem;
        color: #666;
        width: 100%;
        max-width: 100%; /* 確保不超出容器 */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin: 0;
        line-height: 1.2;
        text-align: left; /* 強制藝術家名稱左對齊 */
    }
    
    /* 橫向列表模式時歌名顯示全部，不省略 */
    .file-grid.list-view .file-name {
        max-width: none !important; /* 取消寬度限制 */
        white-space: normal !important; /* 允許換行 */
        overflow: visible !important; /* 取消隱藏 */
        text-overflow: unset !important; /* 取消省略號 */
        -webkit-line-clamp: unset !important; /* 取消行數限制 */
        min-height: auto !important; /* 取消最小高度限制 */
        max-height: none !important; /* 取消最大高度限制 */
        display: block !important; /* 取消flexbox限制 */
        -webkit-box-orient: unset !important; /* 取消flexbox方向限制 */
    }
    
    .player-controls {
        order: 2;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: -4px; /* 稍微往上移動 */
    }
    
    .progress-container {
        order: 3;
        width: 100% !important;
        display: flex !important;
        align-items: center;
        gap: 8px;
        margin-top: 4px;
    }
    
    .progress-container .time {
        font-size: 0.75rem;
        color: #666;
        min-width: 35px;
        text-align: center;
    }
    
    .music-player .progress-bar {
        flex: 1 !important;
        height: 8px !important;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        cursor: pointer;
        position: relative;
    }
    
    .music-player .progress {
        height: 100% !important;
        background: #007AFF;
        border-radius: 4px;
        width: 0%;
        transition: width 0.1s;
    }
    
    .volume-container {
        display: none; /* 隱藏手機端音量控制 */
    }
    
    .volume-container i {
        font-size: 0.9rem; /* 恢復圖標大小 */
        color: #666;
    }
    
    .volume-slider {
        height: 8px; /* 增加滑塊高度，更容易操作 */
        background: rgba(0, 0, 0, 0.15);
    }
    
    .volume-slider::-webkit-slider-thumb {
        width: 16px; /* 恢復滑塊大小 */
        height: 16px;
        background: #007AFF;
    }
    
    .volume-slider::-moz-range-thumb {
        width: 16px;
        height: 16px;
        background: #007AFF;
    }
    
    /* 手機端關閉按鈕樣式 */
    .close-player-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        background: rgba(0, 0, 0, 0.1);
        border: none;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #8e8e93;
        font-size: 12px;
        transition: all 0.2s ease;
        z-index: 10;
    }
    
    .close-player-btn:hover {
        background: rgba(0, 0, 0, 0.2);
        color: #1d1d1f;
        transform: scale(1.1);
    }
    
    /* 手機端播放器優化 - 調整底部間距 */
    .main-content {
        padding-bottom: 120px !important; /* 減少空間，因為播放器變小了 */
    }
    
    .file-grid {
        padding-bottom: 60px !important; /* 減少底部間距 */
    }
    
    /* 手機端列表視圖額外間距 */
    .file-grid.list-view {
        margin-bottom: 80px !important; /* 減少列表視圖間距 */
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 10px 12px;
        gap: 10px;
        min-height: 60px;
    }
    
    .header-top {
        gap: 8px;
    }
    
    .title {
        font-size: 16px;
        font-weight: 600;
        text-align: center;
        margin: 0;
    }
    
    .search-container {
        padding: 8px 12px;
        margin-top: 0;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 32px;
    }
    
    .view-toggle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .main-content {
        padding: 8px;
        padding-bottom: 100px; /* 為播放器預留空間 */
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 12px;
        padding-bottom: 20px; /* 額外的底部間距 */
        overflow: hidden;
    }
    
    .file-item {
        padding: 10px 4px;
        min-height: 90px;
        padding-top: 14px;
        /* 小屏幕觸摸優化 */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        /* 簡化觸控響應，避免卡頓 */
        transition: opacity 0.1s ease;
    }
    
    .file-icon {
        font-size: 36px;
        margin-bottom: 6px;
    }
    
    /* 確保小屏幕音樂文件圖標顯示為紅色 */
    .file-item[data-type="audio"] .file-icon {
        color: #FF3B30 !important;
    }
    
    .file-name {
        font-size: 11px;
        line-height: 1.2;
        -webkit-line-clamp: 2; /* 限制為2行 */
    line-clamp: 2; /* 標準屬性 */
        min-height: 26.4px; /* 2行的高度：11px * 1.2 * 2 */
        max-height: 26.4px; /* 限制為2行的高度 */
    }
    
    .file-meta {
        font-size: 9px;
    }
    
    .breadcrumb {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .breadcrumb-item {
        padding: 1px 2px;
    }
    
    /* 小屏幕公告區域 */
    .announcement-container {
        padding: 8px 12px;
    }
    
    .announcement-banner {
        min-height: 70px;
        border-radius: 8px;
    }
    
    .announcement-content {
        gap: 10px;
        padding: 10px 12px;
    }
    
    .announcement-title {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .announcement-description {
        font-size: 12px;
    }
    
    .wechat-id {
        font-size: 12px;
        padding: 2px 4px;
    }
    
    .announcement-actions {
        gap: 8px;
    }
    
    .copy-btn {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 32px;
        height: 32px;
    }
    
    .copy-btn i {
        font-size: 12px;
    }
    
    .qr-code {
        width: 40px;
        height: 40px;
        border-radius: 4px;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 28px;
    }
    
    .view-toggle {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    /* 小屏幕關閉按鈕樣式 */
    .close-player-btn {
        position: absolute;
        top: 6px;
        right: 6px;
        background: rgba(0, 0, 0, 0.1);
        border: none;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #8e8e93;
        font-size: 10px;
        transition: all 0.2s ease;
        z-index: 10;
    }
    
    .close-player-btn:hover {
        background: rgba(0, 0, 0, 0.2);
        color: #1d1d1f;
        transform: scale(1.1);
    }
    
    /* 小屏幕播放器優化 */
    .music-player {
        padding: 12px 12px 12px 0 !important; /* 左邊不設padding，確保從最左邊開始 */
        min-height: 90px !important;
    }
    
    .player-content {
        display: flex !important;
        flex-direction: column;
        gap: 8px; /* 增加間距 */
        padding: 4px 4px 4px 0; /* 左邊不設padding，確保從最左邊開始 */
    }
    
    .track-info {
        width: 100%;
        max-width: calc(100vw - 70px); /* 限制最大寬度，避免超出屏幕 */
        padding-right: 35px; /* 為關閉按鈕預留空間 */
        padding-left: 0; /* 確保從最左邊開始 */
        display: flex;
        align-items: center;
        justify-content: flex-start; /* 確保從左邊開始對齊 */
        gap: 8px;
        min-height: 45px; /* 固定最小高度 */
        overflow: hidden; /* 防止內容溢出 */
    }
    
    .track-title {
        font-size: 0.8rem; /* 更小的字體 */
        width: 100%;
        max-width: 100%; /* 確保不超出容器 */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin: 0;
        line-height: 1.2;
        text-align: left; /* 強制標題左對齊 */
    }
    
    /* 小屏幕封面圖片樣式 */
    .track-artwork {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        flex-shrink: 0; /* 防止縮小 */
        order: 1; /* 固定位置 */
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .cover-image {
        border-radius: 5px;
    }
    
    .track-details {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 43px); /* 限制最大寬度，為頭像預留空間 */
        order: 2; /* 固定位置 */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start; /* 確保內容從左邊開始對齊 */
        text-align: left; /* 強制文字左對齊 */
        overflow: hidden; /* 防止內容溢出 */
    }
    
    .track-artist {
        font-size: 0.7rem;
        color: #666;
        width: 100%;
        max-width: 100%; /* 確保不超出容器 */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin: 0;
        line-height: 1.2;
        text-align: left; /* 強制藝術家名稱左對齊 */
    }
    
    .player-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-top: -3px; /* 稍微往上移動 */
    }
    
    .progress-container {
        width: 100% !important;
        display: flex !important;
        align-items: center;
        gap: 6px;
        margin-top: 4px;
    }
    
    .progress-container .time {
        font-size: 0.7rem;
        color: #666;
        min-width: 30px;
        text-align: center;
    }
    
    .music-player .progress-bar {
        flex: 1 !important;
        height: 6px !important;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 3px;
        cursor: pointer;
        position: relative;
    }
    
    .music-player .progress {
        height: 100% !important;
        background: #007AFF;
        border-radius: 3px;
        width: 0%;
        transition: width 0.1s;
    }
    
    /* 小屏幕橫向列表模式時歌名顯示全部，不省略 */
    .file-grid.list-view .file-name {
        max-width: none !important; /* 取消寬度限制 */
        white-space: normal !important; /* 允許換行 */
        overflow: visible !important; /* 取消隱藏 */
        text-overflow: unset !important; /* 取消省略號 */
        -webkit-line-clamp: unset !important; /* 取消行數限制 */
        min-height: auto !important; /* 取消最小高度限制 */
        max-height: none !important; /* 取消最大高度限制 */
        display: block !important; /* 取消flexbox限制 */
        -webkit-box-orient: unset !important; /* 取消flexbox方向限制 */
    }
    
    /* 小屏幕播放器優化 - 移除音量控制後減少高度 */
    .music-player {
        padding: 6px 12px !important; /* 進一步減少高度 */
    }
    
    .player-content {
        gap: 3px; /* 減少間距 */
        padding: 3px;
    }
    
    .track-info {
        padding-right: 35px; /* 為關閉按鈕預留空間 */
    }
    
    .track-title {
        font-size: 0.8rem; /* 更小的字體 */
        max-width: calc(100% - 15px); /* 限制最大寬度 */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 小屏幕封面圖片樣式 */
    .track-artwork {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .cover-image {
        border-radius: 5px;
    }
    
    /* 小屏幕音量控制優化 */
    .volume-container {
        display: none; /* 隱藏小屏幕音量控制 */
    }
    
    .volume-container i {
        font-size: 0.8rem; /* 適中的圖標大小 */
    }
    
    .volume-slider {
        height: 6px; /* 適中的滑塊高度 */
    }
    
    .volume-slider::-webkit-slider-thumb {
        width: 14px; /* 適中的滑塊大小 */
        height: 14px;
    }
    
    .volume-slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }
    
    /* 小屏幕播放器優化 - 調整底部間距 */
    .main-content {
        padding-bottom: 100px !important; /* 為播放器預留足夠空間 */
    }
    
    .file-grid {
        padding-bottom: 50px !important; /* 減少底部間距 */
    }
    
    /* 小屏幕列表視圖額外間距 */
    .file-grid.list-view {
        margin-bottom: 70px !important; /* 減少列表視圖間距 */
    }
}

/* 返回文件夾高亮樣式 - 完全模擬鼠標懸停效果 */
.file-item.returned-folder-highlight {
    transform: scale(1.02);
}

.file-item.returned-folder-highlight::before {
    opacity: 1;
}

.file-item.returned-folder-highlight .file-icon {
    transform: scale(1.1);
}

/* 列表視圖中的返回文件夾高亮樣式 */
.file-grid.list-view .file-item.returned-folder-highlight {
    background: rgba(0, 122, 255, 0.08);
    transform: none;
}

/* 音樂加載提示樣式 */
.music-loading-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: musicLoadingFadeIn 0.3s ease-out;
}

.music-loading-toast .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #007AFF;
    border-radius: 50%;
    animation: musicLoadingSpin 1s linear infinite;
}

@keyframes musicLoadingFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes musicLoadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 手機端音樂加載提示樣式 */
@media (max-width: 768px) {
    .music-loading-toast {
        padding: 12px 20px;
        font-size: 13px;
        gap: 10px;
    }
    
    .music-loading-toast .loading-spinner {
        width: 18px;
        height: 18px;
        border-width: 1.5px;
    }
}

/* 文件操作按鈕樣式 */
.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.action-btn.btn-primary {
    background: #007AFF;
    color: white;
}

.action-btn.btn-primary:hover {
    background: #0056CC;
}

.action-btn.btn-danger {
    background: #FF3B30;
    color: white;
}

.action-btn.btn-danger:hover {
    background: #D70015;
}

.file-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 上下文菜單動畫 */
@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes contextMenuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes contextMenuSlideInUp {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 上下文菜單樣式 */
.context-menu {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

/* 手機端上下文菜單優化 */
@media (max-width: 768px) {
    .context-menu {
        min-width: 180px !important;
        max-width: calc(100vw - 32px);
        font-size: 16px;
    }
    
    .context-menu-item {
        padding: 18px 20px !important;
        gap: 16px !important;
    }
    
    .context-menu-item i {
        font-size: 18px !important;
        width: 20px !important;
    }
    
    .context-menu-item span {
        font-size: 16px !important;
        font-weight: 500 !important;
    }
}
.add-to-usb-fab {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 998;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.fab-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 122, 255, 0.5);
}

.fab-button:active {
    transform: translateY(0);
}

.fab-button i {
    font-size: 18px;
}

/* 手機端FAB樣式 */
@media (max-width: 768px) {
    .add-to-usb-fab {
        bottom: 170px; /* 為播放器預留足夠空間 */
        right: 16px;
    }
    
    .fab-button {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 48px;
    }
    
    .fab-button i {
        font-size: 14px;
    }
    
    .fab-text {
        display: none; /* 手機端只顯示圖標 */
    }
}

@media (max-width: 480px) {
    .add-to-usb-fab {
        bottom: 160px; /* 為播放器預留足夠空間 */
        right: 12px;
    }
    
    .fab-button {
        padding: 8px;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        justify-content: center;
    }
    
    .fab-button i {
        font-size: 16px;
    }
}

/* 首页引导蒙层样式 */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.onboarding-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.onboarding-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 进度指示器 */
.onboarding-progress {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.onboarding-progress .progress-bar {
    height: 4px;
    background: #e5e5ea;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.onboarding-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #34C759);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 33.33%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #8e8e93;
    transition: all 0.3s ease;
    position: relative;
}

.step-dot.active {
    background: linear-gradient(135deg, #007AFF, #34C759);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.step-dot.completed {
    background: #34C759;
    color: white;
}

/* 步骤内容 */
.onboarding-content {
    padding: 40px 30px;
    min-height: 300px;
    position: relative;
}

.onboarding-step {
    display: none;
    text-align: center;
    animation: fadeInSlide 0.4s ease;
}

.onboarding-step.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #007AFF, #34C759);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 36px;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.step-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.step-description strong {
    color: #007AFF;
    font-weight: 600;
}

.step-highlight {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f0f7ff;
    border-radius: 12px;
    color: #007AFF;
    font-size: 14px;
    margin-top: 16px;
}

.step-highlight i {
    font-size: 18px;
}

.step-demo {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 24px;
}

.demo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    flex: 1;
    max-width: 180px;
}

.demo-item i {
    font-size: 32px;
    color: #007AFF;
}

.demo-item span {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.step-notice {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #fff5e6;
    border-radius: 12px;
    margin-top: 24px;
    text-align: left;
}

.step-notice i {
    color: #ff9500;
    font-size: 24px;
    flex-shrink: 0;
}

.step-notice p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #8e8e93;
}

.step-notice p:last-child {
    margin-bottom: 0;
}

.step-notice ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.step-notice li {
    margin-bottom: 4px;
    font-size: 14px;
    color: #666;
}

/* 引导按钮 */
.onboarding-actions {
    display: flex;
    gap: 12px;
    padding: 20px 30px 30px;
    border-top: 1px solid #f0f0f0;
}

.onboarding-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.skip-btn {
    background: #f5f5f7;
    color: #666;
}

.skip-btn:hover {
    background: #e5e5ea;
    color: #000;
}

.next-btn {
    background: linear-gradient(135deg, #007AFF, #34C759);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.next-btn:active {
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .onboarding-container {
        border-radius: 16px;
        max-height: 95vh;
    }
    
    .onboarding-progress {
        padding: 24px 20px 16px;
    }
    
    .progress-steps {
        padding: 0 10px;
    }
    
    .step-dot {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .onboarding-content {
        padding: 32px 20px;
    }
    
    .step-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    .step-description {
        font-size: 15px;
    }
    
    .step-demo {
        flex-direction: column;
        align-items: stretch;
    }
    
    .demo-item {
        max-width: none;
    }
    
    .onboarding-actions {
        flex-direction: column;
        padding: 20px;
    }
    
    .onboarding-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .onboarding-container {
        border-radius: 12px;
    }
    
    .onboarding-progress {
        padding: 20px 16px 12px;
    }
    
    .step-dot {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .onboarding-content {
        padding: 24px 16px;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .step-title {
        font-size: 18px;
    }
    
    .step-description {
        font-size: 14px;
    }
    
    .onboarding-actions {
        padding: 16px;
    }
}
