/* 搜索页面样式 */
.search-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f5f5f5;
    z-index: 9999;
    display: none;
    flex-direction: column;
    transition: transform 0.3s ease;
    transform: translateX(100%);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS 滑动优化 */
}

.search-page.active {
    display: flex;
    transform: translateX(0);
}

.search-page-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #8e44ad, #3498db);
    color: white;
    position: relative;
}

.search-page-header .back-btn {
    font-size: 20px;
    margin-right: 15px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.search-page-title {
    font-size: 18px;
    font-weight: bold;
    flex-grow: 1;
    text-align: center;
}

/* 搜索页面钱包信息显示 */
.search-wallet-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-balance-display {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.flyc-logo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.wallet-balance-display:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.wallet-balance-display i {
    color: #f1c40f;
    font-size: 12px;
}

.flyc-balance-text {
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.search-wallet-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-wallet-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.search-wallet-btn i {
    font-size: 16px;
}

.search-page-controls {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background-color: #f0f0f0;
    gap: 12px;
}

/* 控件行布局 */
.controls-row {
    display: flex;
    align-items: center;
    width: 100%;
}

/* 第一排：功能按钮行 */
.controls-row-buttons {
    justify-content: space-between;
    gap: 12px;
}

/* 第二排：搜索行 */
.controls-row-search {
    gap: 10px;
}

/* 统一的控制按钮样式 */
.control-button {
    background: linear-gradient(90deg, #8e44ad, #3498db);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    overflow: hidden;
}

.control-button:hover {
    background: linear-gradient(90deg, #9b59b6, #2980b9);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.control-button:active {
    transform: scale(0.98);
}

.control-button i {
    font-size: 14px;
    flex-shrink: 0;
}

.control-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.control-button:active::before {
    width: 200px;
    height: 200px;
}

/* AI音乐按钮特殊样式 */
.ai-music-btn.control-button {
    background: linear-gradient(90deg, #8e44ad, #3498db);
}

.ai-music-btn.control-button:hover {
    background: linear-gradient(90deg, #9b59b6, #2980b9);
    box-shadow: 0 3px 6px rgba(155, 89, 182, 0.3);
}

/* deepseek爆款歌词按钮特殊样式 */
.deepseek-lyrics-btn.control-button {
    background: linear-gradient(90deg, #ff6b6b, #ffd93d);
}

.deepseek-lyrics-btn.control-button:hover {
    background: linear-gradient(90deg, #ee5a52, #ffcd3c);
    box-shadow: 0 3px 6px rgba(255, 107, 107, 0.3);
}

/* 共享P2P按钮特殊样式 */
.share-p2p-btn.control-button {
    background: linear-gradient(90deg, #e74c3c, #f39c12);
}

.share-p2p-btn.control-button:hover {
    background: linear-gradient(90deg, #c0392b, #d68910);
    box-shadow: 0 3px 6px rgba(231, 76, 60, 0.3);
}

/* 按钮加载状态 */
.control-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.control-button.loading i {
    animation: spin 1s linear infinite;
}

.search-page-btn {
    background: linear-gradient(90deg, #8e44ad, #3498db);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    min-height: 42px;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-page-btn:hover {
    background: linear-gradient(90deg, #9b59b6, #2980b9);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.search-page-btn:active {
    transform: scale(0.98);
}

.search-page-input-container {
    flex-grow: 1;
    position: relative;
    background-color: white;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 42px;
}

.search-page-icon {
    color: #999;
    margin-right: 10px;
    font-size: 14px;
}

.search-page-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #333;
}

.search-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 5px 0;
}

.ad-container {
    padding: 10px 15px;
    background-color: #f8f8f8;
    position: relative;
}

.ad-content {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.ad-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 4px;
}

.ad-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.search-history {
    padding: 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
}

.section-action {
    color: #999;
    font-size: 16px;
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.history-tag {
    background-color: #f0f0f0;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    color: #333;
}

.search-discovery {
    padding: 15px;
}

.discovery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.discovery-tag {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    color: #333;
}

.discovery-tag img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

.search-lists {
    flex-grow: 1;
    display: flex;
    padding: 0 15px;
    overflow-y: auto;
    min-height: 0;
}

.search-column {
    width: 50%;
    padding: 0 5px;
}

.search-list-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.search-list-title {
    font-size: 16px;
    font-weight: bold;
    margin-right: 10px;
}

.search-list-count {
    font-size: 14px;
    color: #999;
}

.search-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.search-item-number {
    width: 25px;
    font-weight: bold;
    color: #999;
    font-size: 18px;
}

.search-item-number.top3 {
    color: #ff4d4f;
}

.search-item-content {
    flex-grow: 1;
}

.search-item-title {
    font-size: 14px;
    margin-bottom: 4px;
}

.search-item-tag {
    display: inline-block;
    background-color: #ff4d4f;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 2px;
    margin-left: 5px;
}

/* 共享音乐推荐和梵音音乐榜的样式 */
.recommendation-list, .rank-list {
    list-style-type: none;
    padding: 0;
}

.recommendation-list li, .rank-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
}

.item-number {
    width: 24px;
    text-align: center;
    font-weight: bold;
    color: #999;
}

.item-number.top3 {
    color: #ff4d4f;
}

.item-content {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-suffix {
    color: #999;
    font-size: 12px;
    margin-left: 5px;
}

/* 搜索结果部分样式 */
.search-results-section {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #fff;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    color: #666;
    font-size: 14px;
}

.search-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #8e44ad;
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    color: #999;
}

.no-results i {
    font-size: 36px;
    margin-bottom: 15px;
    color: #ddd;
}

.no-results p {
    margin: 5px 0;
}

.no-results .hint {
    font-size: 12px;
    color: #bbb;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.search-results-title {
    font-size: 16px;
    font-weight: bold;
}

.search-results-count {
    font-size: 14px;
    color: #999;
}

.search-results-list {
    display: flex;
    flex-direction: column;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-result-item:hover {
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.result-info {
    flex-grow: 1;
    overflow: hidden;
}

.result-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-details {
    display: flex;
    font-size: 12px;
    color: #999;
}

.result-artist {
    margin-right: 10px;
}

.result-size {
    margin-right: 10px;
}

.result-actions {
    display: flex;
    align-items: center;
}

.play-btn, .add-to-p2p-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid #8e44ad;
    color: #8e44ad;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.play-btn:hover, .add-to-p2p-btn:hover {
    background-color: #8e44ad;
    color: #fff;
}

.play-btn i, .add-to-p2p-btn i {
    font-size: 14px;
}

/* Toast消息样式 */
#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#toast.show {
    opacity: 1;
    visibility: visible;
}

/* P2P文件共享功能样式 */

/* P2P搜索结果容器 */
.p2p-search-results {
    background: white;
    border-radius: 10px;
    margin: 10px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    min-height: 200px; /* 确保最小高度 */
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    min-height: 60px;
    gap: 10px; /* 添加元素间距 */
}

.results-title {
    font-size: 16px;
    font-weight: bold;
    flex: 1; /* 标题占用剩余空间 */
}

.results-count {
    font-size: 14px;
    opacity: 0.9;
    white-space: nowrap; /* 防止换行 */
}

.search-results-header .button-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-results-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-results-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.search-results-list {
    overflow-y: auto;
    padding: 10px 0;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
    scrollbar-width: thin; /* Firefox 滚动条优化 */
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

/* 自定义滚动条样式（Webkit浏览器） */
.search-results-list::-webkit-scrollbar {
    width: 4px;
}

.search-results-list::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

.search-results-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* 搜索结果项 */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    cursor: pointer;
    position: relative;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-result-item:hover {
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-index {
    width: 30px;
    height: 30px;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.file-size {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
}

.file-source i {
    font-size: 14px;
}

.file-source i.fa-hdd {
    color: #28a745;
}

.file-source i.fa-globe {
    color: #007bff;
}

.shared-by {
    color: #6c757d;
    font-style: italic;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.add-to-playlist-btn,
.download-btn,
.add-to-favorites-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #007bff;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.add-to-playlist-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.download-btn {
    background: #28a745;
}

.download-btn:hover {
    background: #1e7e34;
    transform: scale(1.1);
}

.add-to-favorites-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.add-to-favorites-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.add-to-favorites-btn:disabled {
    background: #28a745;
    cursor: not-allowed;
    transform: none;
}

.add-to-favorites-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.3s, height 0.3s, top 0.3s, left 0.3s;
    transform: translate(-50%, -50%);
}

.add-to-favorites-btn:active::before {
    width: 40px;
    height: 40px;
    top: 50%;
    left: 50%;
}

/* 无结果状态 */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-results i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-results-tip {
    font-size: 12px;
    margin-top: 10px;
    opacity: 0.7;
}

/* 文件拖拽区域 */
.file-drop-zone {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.drop-zone-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.drop-zone-content i {
    font-size: 64px;
    color: #007bff;
    margin-bottom: 20px;
}

.drop-zone-text {
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

/* 拖拽悬停状态 */
.search-page.drag-over {
    background: rgba(0, 123, 255, 0.05);
}

/* P2P播放列表项 */
.playlist-item.p2p-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 5px;
    border-radius: 8px;
}

.playlist-item.p2p-item .song-info {
    color: white;
}

.playlist-item.p2p-item .song-meta {
    opacity: 0.8;
}

.p2p-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

/* P2P消息提示 */
.p2p-message {
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* 搜索按钮加载状态 */
.search-page-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.search-page-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 按钮特殊样式 */
.ai-music-btn.control-button {
    background: linear-gradient(90deg, #8e44ad, #3498db);
}

.ai-music-btn.control-button:hover {
    background: linear-gradient(90deg, #9b59b6, #2980b9);
    box-shadow: 0 3px 6px rgba(155, 89, 182, 0.3);
}

.share-p2p-btn.control-button {
    background: linear-gradient(90deg, #e74c3c, #f39c12);
}

.share-p2p-btn.control-button:hover {
    background: linear-gradient(90deg, #c0392b, #d68910);
    box-shadow: 0 3px 6px rgba(231, 76, 60, 0.3);
}

/* 按钮加载状态 */
.control-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.control-button.loading i {
    animation: spin 1s linear infinite;
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 搜索页面控件优化 */
    .search-page-controls {
        padding: 12px;
        gap: 10px;
    }
    
    /* 控制按钮移动端优化 */
    .control-button {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 38px;
        border-radius: 18px;
    }
    
    .control-button i {
        font-size: 12px;
        margin-right: 4px;
    }
    
    /* 第一排按钮在移动端可能需要更小的间距 */
    .controls-row-buttons {
        gap: 8px;
    }
    
    /* 搜索行在移动端的优化 */
    .controls-row-search {
        gap: 8px;
    }
    
    .search-page-btn {
        padding: 8px 16px;
        font-size: 12px;
        min-height: 38px;
        border-radius: 18px;
    }
    
    .search-page-input-container {
        padding: 6px 12px;
        border-radius: 18px;
        min-height: 38px;
    }
    
    .search-page-input {
        font-size: 13px;
    }
}
    
    /* 搜索结果项优化 */
    .search-result-item {
        padding: 10px 12px;
    }
    
    .result-index {
        width: 24px;
        height: 24px;
        font-size: 11px;
        margin-right: 8px;
    }
    
    .result-title {
        font-size: 13px;
    }
    
    .result-meta {
        font-size: 10px;
        gap: 6px;
    }
    
    .add-to-playlist-btn,
    .download-btn,
    .add-to-favorites-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .file-share-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .drop-zone-content {
        padding: 30px;
        margin: 20px;
    }
    
    .drop-zone-content i {
        font-size: 48px;
    }
    
    .drop-zone-text {
        font-size: 16px;
    }
  }

/* 移动端搜索结果优化 */
@media (max-width: 768px) {
    .p2p-search-results {
        margin: 8px 10px;
        max-height: 65vh;
        border-radius: 8px;
        min-height: 180px; /* 移动端最小高度 */
    }
    
    .search-results-header {
        padding: 10px 15px;
        min-height: 45px;
    }
    
    .results-title {
        font-size: 14px;
    }
    
    .results-count {
        font-size: 12px;
    }
    
    .clear-results-btn {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }
    
    .search-result-item {
        padding: 10px 12px;
        margin-bottom: 5px;
        border-radius: 6px;
    }
    
    .result-index {
        width: 20px;
        height: 20px;
        font-size: 10px;
        margin-right: 6px;
    }
    
    .result-title {
        font-size: 12px;
        line-height: 1.3;
        margin-bottom: 2px;
    }
    
    .result-meta {
        font-size: 9px;
        gap: 4px;
    }
    
    .result-actions {
        gap: 4px;
    }
    
    .play-btn, .add-to-p2p-btn {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .search-page-controls {
        padding: 10px;
        gap: 8px;
    }
    
    /* 在极小屏幕上，功能按钮可能需要堆叠 */
    .controls-row-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .control-button {
        padding: 8px 10px;
        font-size: 11px;
        min-height: 36px;
        border-radius: 16px;
    }
    
    .control-button i {
        font-size: 11px;
    }
    
    .search-page-btn {
        padding: 8px 12px;
        font-size: 11px;
        min-height: 36px;
        border-radius: 16px;
    }
    
    .search-page-input-container {
        padding: 6px 10px;
        border-radius: 16px;
        min-height: 36px;
    }
    
    .search-page-input {
        font-size: 12px;
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .search-page-controls {
        padding: 8px 15px;
    }
    
    .control-button {
        min-height: 36px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .search-page-btn {
        min-height: 36px;
        padding: 6px 16px;
    }
    
    .search-page-input-container {
        min-height: 36px;
    }
}

/* 搜索页面滚动优化 */
.search-page.has-results .search-lists {
    /* 当有搜索结果时，适当减少底部列表的高度 */
    max-height: 30vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 搜索结果动态高度调整 */
.p2p-search-results.expanded {
    max-height: 80vh;
    transition: max-height 0.3s ease-in-out;
}

/* 搜索结果状态指示器 */
.search-results-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.search-results-status i {
    font-size: 10px;
}

/* 搜索结果加载状态 */
.search-results-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #666;
}

.search-results-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #8e44ad;
    animation: spin 1s linear infinite;
}

.search-results-loading .loading-text {
    font-size: 14px;
    margin-top: 5px;
}

/* 搜索结果展开按钮 */
.expand-results-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.expand-results-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 展开提示样式 */
.expand-hint {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    animation: slideDown 0.3s ease-out;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.expand-hint.fade-out {
    opacity: 0;
}

.expand-hint i {
    margin-right: 4px;
    color: #ffa500;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 滚动到底部提示 */
.scroll-hint {
    position: absolute;
    bottom: 5px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.scroll-hint.show {
    opacity: 1;
}

.search-results-list.has-more-content + .scroll-hint {
    opacity: 1;
}

/* 智能高度调整 */
.p2p-search-results.auto-height {
    max-height: none;
    height: auto;
}

.p2p-search-results.compact {
    max-height: 45vh;
}

.p2p-search-results.tall {
    max-height: 85vh;
}

/* 搜索结果响应式布局 */
@media (max-height: 600px) {
    .p2p-search-results {
        max-height: 70vh;
    }
    
    .p2p-search-results.expanded {
        max-height: 85vh;
    }
}

@media (max-height: 500px) {
    .p2p-search-results {
        max-height: 75vh;
    }
    
    .p2p-search-results.expanded {
        max-height: 90vh;
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .p2p-search-results {
        max-height: 80vh;
    }
    
    .search-results-header {
        padding: 10px 15px;
        min-height: 45px;
    }
    
    .results-title {
        font-size: 14px;
    }
    
    .results-count {
        font-size: 12px;
    }
}

/* 虚拟滚动样式 */
.virtual-scroll-container {
    overflow: hidden;
}

.visible-area {
    will-change: transform;
}

.virtual-scroll-container .search-result-item {
    box-sizing: border-box;
    contain: layout style paint;
}

/* 性能优化 */
.search-results-list {
    contain: layout style paint;
    transform: translateZ(0); /* 启用硬件加速 */
}

.search-result-item {
    will-change: auto;
    backface-visibility: hidden;
}

/* 加载状态优化 */
.search-results-list.loading .search-result-item {
    opacity: 0.7;
    pointer-events: none;
}

.search-results-list.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* 搜索页面钱包信息响应式调整 */
@media (max-width: 480px) {
    .search-wallet-info {
        gap: 6px;
    }
    
    .wallet-balance-display {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .search-wallet-btn {
        width: 32px;
        height: 32px;
    }
    
    .search-wallet-btn i {
        font-size: 14px;
    }
    
    .flyc-balance-text {
        font-size: 11px;
    }
}

@media (max-width: 320px) {
    .wallet-balance-display {
        padding: 3px 6px;
        font-size: 11px;
        gap: 3px;
    }
    
    .search-wallet-btn {
        width: 28px;
        height: 28px;
    }
    
    .search-wallet-btn i {
        font-size: 12px;
    }
}
