/* 公开VPS展示页面样式 */

/* 全局页面样式 - 确保无边距 */
body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

.main-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* VPS页面包装器 */
.vps-page-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* 主题切换按钮 */
.theme-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(20deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 深色主题 */
body[data-theme="dark"] {
    background: rgba(40, 44, 52, 0.95);
    color: #f0f0f0;
}

body[data-theme="dark"] .search-bar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

body[data-theme="dark"] .form-control {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
    border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .vps-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .vps-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .empty-state {
    color: #f0f0f0;
}

/* 浅色主题 */
body[data-theme="light"] {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

body[data-theme="light"] .search-bar {
    background: white;
}

body[data-theme="light"] .form-control {
    background: white;
    color: #333;
    border-color: #ddd;
}

body[data-theme="light"] .vps-card {
    background: white;
    border-color: #e0e0e0;
}

/* 左侧搜索面板包装器 */
.search-panel-wrapper {
    width: 340px;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    position: relative;
    flex-shrink: 0;
}

.search-panel-wrapper.collapsed {
    width: 60px;
}

.search-panel {
    width: 340px;
    height: calc(100vh - 40px); /* 减去页脚高度，留出空间 */
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

body[data-theme="dark"] .search-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-right-color: rgba(255, 255, 255, 0.2);
}

.search-panel-wrapper.collapsed .search-panel {
    transform: translateX(-340px);
}

.search-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

body[data-theme="dark"] .search-panel-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.search-panel-header .header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-panel-header .header-icon {
    font-size: 1.1rem;
    color: #667eea;
    opacity: 0.8;
}

body[data-theme="dark"] .search-panel-header .header-icon {
    color: #a5b4d4;
}

.search-panel-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-panel-header h5 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

body[data-theme="dark"] .search-panel-header h5 {
    color: #f0f0f0;
}

.collapse-btn {
    padding: 5px 10px;
    color: #667eea;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.collapse-btn:hover {
    color: #764ba2;
    text-decoration: none !important;
}

.collapse-btn:focus {
    text-decoration: none !important;
    outline: none;
}

/* 独立的折叠切换按钮 */
.collapse-toggle-btn {
    position: fixed;
    left: 0;
    top: 20px;
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 10px 10px 0;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1002;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
}

.collapse-toggle-btn.show {
    display: flex;
}

.collapse-toggle-btn:hover {
    transform: translateX(3px);
    box-shadow: 3px 3px 15px rgba(102, 126, 234, 0.4);
}

.collapse-toggle-btn:focus {
    outline: none;
}

.search-panel-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.search-panel-body .form-group {
    margin-bottom: 25px;
}

.search-panel-body .row {
    margin-bottom: 25px;
}

/* 搜索面板底部按钮区 */
.search-panel-footer {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

body[data-theme="dark"] .search-panel-footer {
    background: rgba(40, 44, 52, 0.98);
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* 自动完成样式 */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

body[data-theme="dark"] .autocomplete-suggestions {
    background: #2d3748;
    border-color: #4a5568;
}

.autocomplete-suggestions.show {
    display: block;
}

.autocomplete-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    color: #333;
}

body[data-theme="dark"] .autocomplete-suggestion-item {
    color: #f0f0f0;
}

.autocomplete-suggestion-item:hover,
.autocomplete-suggestion-item.active {
    background: rgba(102, 126, 234, 0.1);
}

body[data-theme="dark"] .autocomplete-suggestion-item:hover,
body[data-theme="dark"] .autocomplete-suggestion-item.active {
    background: rgba(102, 126, 234, 0.2);
}

.autocomplete-suggestion-item:last-child {
    border-radius: 0 0 10px 10px;
}

/* 右侧内容区域 */
.content-area {
    padding: 20px;
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    scroll-behavior: smooth;
}

/* 折叠按钮样式调整 */
.search-panel-wrapper.collapsed {
    overflow: visible;
}

.search-panel-wrapper.collapsed .search-panel {
    overflow: visible;
}

.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    height: 45px;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

select.form-control {
    height: 45px;
}

/* VPS卡片样式 */
.vps-card {
    border-radius: 15px;
    padding: 0;
    border: 1px solid;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.vps-card:hover {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6), 0 0 40px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

body[data-theme="dark"] .vps-card:hover {
    box-shadow: 0 0 20px rgba(139, 157, 195, 0.6), 0 0 40px rgba(139, 157, 195, 0.3);
    border-color: rgba(139, 157, 195, 0.5);
}

.vps-card.vps-hot {
    border: 2px solid #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.vps-card.vps-hot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 200% 100%;
    animation: gradient-slide 3s ease infinite;
}

@keyframes gradient-slide {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* HOT徽章 */
.hot-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.4);
    z-index: 10;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* VPS卡片头部 */
.vps-header {
    padding: 12px 15px 8px 15px;
    border-bottom: 1px solid;
    text-align: center;
}

.vps-header h5 {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vps-header h5 i {
    color: #667eea;
    margin-right: 8px;
}

.provider-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 5px;
    justify-content: center;
}

/* 卡片商家标签 - 统一淡灰色（只应用在卡片区域） */
.vps-card .provider-name {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 850;
    background: rgba(102, 126, 234, 0.08);
    color: #888;
}

.vps-card .provider-name i {
    font-size: 0.7rem;
    margin-right: 4px;
    opacity: 0.7;
}

/* 深色主题下的卡片商家标签 - 统一淡灰色 */
body[data-theme="dark"] .vps-card .provider-name {
    background: rgba(139, 157, 195, 0.15);
    color: #aaa;
}

/* 侧边栏标签内的provider-name - 移除背景，继承颜色 */
.provider-tag .provider-name {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    font-weight: inherit !important;
}

.note-tag {
    font-size: 0.75rem;
    color: #888;
    padding: 4px 8px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 4px;
    display: inline-block;
}

body[data-theme="dark"] .note-tag {
    color: #aaa;
    background: rgba(139, 157, 195, 0.15);
}

/* VPS卡片主体 */
.vps-body {
    padding: 2px 20px 2px 20px;
    flex: 1;
}

.vps-spec {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.05);
}

.vps-spec i {
    width: 30px;
    text-align: center;
    color: #667eea;
    font-size: 1.1rem;
}

.vps-spec div {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 10px;
}

.spec-label {
    font-size: 0.85rem;
    color: #888;
}

.spec-value {
    font-weight: 600;
    color: #333;
}

body[data-theme="dark"] .spec-value {
    color: #f0f0f0;
}

body[data-theme="dark"] .spec-label {
    color: #aaa;
}

/* VPS价格按钮 */
.vps-price-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 13px !important;
    gap: 6px;
    min-height: 61px !important;
}

.vps-price-btn .price-display {
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.vps-price-btn .price-symbol {
    font-size: 1.1rem;
    font-weight: bold;
    align-self: flex-start;
    margin-top: 2px;
}

.vps-price-btn .price-integer {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.vps-price-btn .price-decimal {
    font-size: 1rem;
    font-weight: 600;
    align-self: flex-start;
    margin-top: 3px;
    margin-left: 1px;
}

.vps-price-btn .price-period {
    font-size: 1.1rem;
    font-weight: 500;
    align-self: flex-end;
    margin-bottom: 3px;
}

.vps-price-btn .price-text {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}

/* 售罄按钮样式 - 与价格按钮一致的高度 */
.vps-price-btn .price-display {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 售罄按钮中的文字特殊处理 */
.vps-footer .vps-price-btn[disabled] .price-display .price-integer {
    font-size: 1.3rem !important;
    font-weight: bold !important;
}

.vps-price-btn i {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* VPS卡片底部 */
.vps-footer {
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body[data-theme="dark"] .vps-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.vps-footer .btn {
    border-radius: 10px;
    padding: 15px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.vps-footer .btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border: none;
}

.vps-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.vps-footer .btn-secondary {
    background: #6c757d;
    border: none;
    opacity: 0.7;
    cursor: not-allowed;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state i {
    color: #ddd;
}

/* 加载状态 */
.loading-state {
    padding: 60px 0;
}

/* 分页样式 */
.pagination-wrapper {
    margin-top: 30px;
    padding: 20px 0;
}

.pagination {
    margin-bottom: 10px;
}

.page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: none;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #667eea;
    color: white;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.page-item.disabled .page-link {
    background: rgba(0, 0, 0, 0.05);
    color: #ccc;
}

/* 内联按钮通用样式 */
.theme-toggle-btn-inline,
.lang-toggle-btn-inline {
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
}

.theme-toggle-btn-inline {
    width: 32px;
    padding: 0;
}

.lang-toggle-btn-inline {
    min-width: 80px;
}

.theme-toggle-btn-inline:hover,
.lang-toggle-btn-inline:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: scale(1.05);
}

body[data-theme="dark"] .theme-toggle-btn-inline,
body[data-theme="dark"] .lang-toggle-btn-inline {
    background: rgba(139, 157, 195, 0.15);
    border-color: rgba(139, 157, 195, 0.3);
    color: #a5b4d4;
}

body[data-theme="dark"] .theme-toggle-btn-inline:hover,
body[data-theme="dark"] .lang-toggle-btn-inline:hover {
    background: rgba(139, 157, 195, 0.25);
    border-color: rgba(139, 157, 195, 0.5);
}

/* 旧的固定位置语言按钮样式（如果还需要保留） */
.lang-toggle-btn {
    position: fixed;
    top: 20px;
    right: 80px;
    min-width: 120px;
    height: 50px;
    border-radius: 25px;
    border: none;
    background: #282c34;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
}

.lang-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.lang-toggle-btn-inline .lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-toggle-btn-inline .lang-text {
    font-weight: 500;
    font-size: 0.8rem;
}

.lang-toggle-btn .lang-flag {
    font-size: 1.3rem;
    line-height: 1;
}

.lang-toggle-btn .lang-text {
    font-weight: 500;
}

/* 浅色主题下的语言按钮 */
body[data-theme="light"] .lang-toggle-btn {
    background: white;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .lang-toggle-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .theme-toggle-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lang-toggle-btn {
        top: 10px;
        right: 60px;
        min-width: 100px;
        height: 40px;
        padding: 0 15px;
    }

    .vps-card {
        margin-bottom: 15px;
    }

    .search-bar {
        padding: 15px;
    }
}

/* 标签丝带样式 */
.ribbon {
    position: absolute;
    right: -5px;
    top: 15px;
    z-index: 10;
    overflow: hidden;
    width: 120px;
    height: 120px;
    text-align: right;
}

.ribbon span {
    font-size: 11px;
    font-weight: bold;
    color: #FFF;
    text-align: center;
    line-height: 22px;
    transform: rotate(45deg);
    width: 150px;
    display: block;
    background: linear-gradient(135deg, #b73333 0%, #8b2222 100%);
    box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 25px;
    right: -35px;
    padding: 0 5px;
    letter-spacing: 0.5px;
}

.ribbon span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    z-index: -1;
    border-left: 3px solid #8b2222;
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #8b2222;
}

.ribbon span::after {
    content: "";
    position: absolute;
    right: 0;
    top: 100%;
    z-index: -1;
    border-left: 3px solid transparent;
    border-right: 3px solid #8b2222;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #8b2222;
}

/* VPS卡片需要设置相对定位以支持绝对定位的标签 */
.vps-card {
    position: relative;
    overflow: hidden;
}

/* 全选按钮容器 */
.select-all-container {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    margin-bottom: 15px;
}

.select-all-container .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 5px 10px;
}

.btn-select-all {
    border-color: #667eea;
    color: #667eea;
}

.btn-select-all:hover {
    background-color: #667eea;
    color: white;
}

.btn-clear-all {
    border-color: #6c757d;
    color: #6c757d;
}

.btn-clear-all:hover {
    background-color: #6c757d;
    color: white;
}

/* 深色主题下的按钮样式 */
body[data-theme="dark"] .btn-select-all {
    border-color: #8b9dc3;
    color: #8b9dc3;
}

body[data-theme="dark"] .btn-select-all:hover {
    background-color: #8b9dc3;
    color: #1a1d24;
}

body[data-theme="dark"] .btn-clear-all {
    border-color: #8a8d93;
    color: #8a8d93;
}

body[data-theme="dark"] .btn-clear-all:hover {
    background-color: #8a8d93;
    color: #1a1d24;
}

/* 数据中心小卡片样式 */
.datacenter-cards-wrapper {
    margin-top: 8px;
    padding: 0;
    max-height: 82px; /* 限制最大高度（约2行，35px*2 + 6px gap + 6px余量） */
    overflow-y: auto; /* 超出部分显示滚动条 */
    overflow-x: hidden;
    padding-right: 2px; /* 给滚动条留出空间 */
}

/* 自定义滚动条样式 */
.datacenter-cards-wrapper::-webkit-scrollbar {
    width: 5px;
}

.datacenter-cards-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.datacenter-cards-wrapper::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.datacenter-cards-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* 深色主题下的滚动条 */
body[data-theme="dark"] .datacenter-cards-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .datacenter-cards-wrapper::-webkit-scrollbar-thumb {
    background: rgba(139, 157, 195, 0.3);
}

body[data-theme="dark"] .datacenter-cards-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 157, 195, 0.5);
}

.datacenter-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 6px;
    align-items: start;
}

.datacenter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 3px;
    min-height: 35px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    color: #667eea;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    word-break: break-word;
    overflow: hidden;
}

.datacenter-card:hover {
    transform: translateY(-2px) scale(1.02);
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.15);
}

.datacenter-card span {
    font-size: 0.62rem;
    word-break: keep-all;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 深色主题下的数据中心卡片 */
body[data-theme="dark"] .datacenter-card {
    background: rgba(139, 157, 195, 0.1);
    border-color: rgba(139, 157, 195, 0.2);
    color: #a5b4d4;
}

body[data-theme="dark"] .datacenter-card:hover {
    background: rgba(139, 157, 195, 0.15);
    border-color: rgba(139, 157, 195, 0.35);
    box-shadow: 0 4px 12px rgba(139, 157, 195, 0.2);
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    .datacenter-cards {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 5px;
    }

    .datacenter-card {
        padding: 3px 2px;
        min-height: 30px;
        font-size: 0.58rem;
    }

    .datacenter-card span {
        font-size: 0.58rem;
    }
}

/* 搜索面板按钮样式 */
.search-panel-body .btn,
.search-panel-footer .btn {
    border-radius: 15px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-panel-body .btn-primary,
.search-panel-footer .btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border: none;
    color: white;
}

.search-panel-body .btn-primary:hover,
.search-panel-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.search-panel-body .btn-secondary,
.search-panel-footer .btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
}

.search-panel-body .btn-secondary:hover,
.search-panel-footer .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
    background: #5a6268;
}

/* 无限滚动相关样式 */
.loading-more-state {
    padding: 30px 0;
    margin: 20px 0;
}

.loading-more-state i {
    color: #667eea;
}

.loading-more-state p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-top: 10px;
}

/* 深色主题下的加载更多样式 */
body[data-theme="dark"] .loading-more-state i {
    color: #8b9dc3;
}

body[data-theme="dark"] .loading-more-state p {
    color: #a0a0a0;
}

/* 自定义滚动条样式 - 内容区域 */
.content-area::-webkit-scrollbar {
    width: 8px;
}

.content-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.content-area::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

.content-area::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* 深色主题下的内容区域滚动条 */
body[data-theme="dark"] .content-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .content-area::-webkit-scrollbar-thumb {
    background: rgba(139, 157, 195, 0.3);
}

body[data-theme="dark"] .content-area::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 157, 195, 0.5);
}

/* 回到顶部按钮 */
.back-to-top-btn {
    position: fixed;
    right: 30px;
    bottom: 50px; /* 往上移动，避免在页脚上 */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ea6d7e 0%, #d85c6f 100%);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(234, 109, 126, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(234, 109, 126, 0.6);
    background: linear-gradient(135deg, #f07a8a 0%, #ea6d7e 100%);
}

.back-to-top-btn:active {
    transform: translateY(-2px);
}

.back-to-top-btn:focus {
    outline: none;
}

/* 深色主题下的回到顶部按钮 */
body[data-theme="dark"] .back-to-top-btn {
    background: linear-gradient(135deg, #e75f72 0%, #d04d60 100%);
    box-shadow: 0 4px 15px rgba(231, 95, 114, 0.4);
}

body[data-theme="dark"] .back-to-top-btn:hover {
    box-shadow: 0 6px 20px rgba(231, 95, 114, 0.6);
    background: linear-gradient(135deg, #f07a8a 0%, #e75f72 100%);
}

/* 响应式：移动端 */
@media (max-width: 768px) {
    .back-to-top-btn {
        right: 15px;
        bottom: 80px; /* 移动端也往上移 */
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* 隐藏Telegram联系按钮 */
.contact-bubble {
    display: none !important;
}

/* 固定页脚在底部 */
.public-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    margin: 0 !important;
    padding: 10px 0 !important; /* 从20px减少到10px，更紧凑 */
    line-height: 1.2; /* 减小行高 */
}

/* 确保页脚文字居中对齐并缩小字体 */
.public-footer .container {
    max-width: 100%;
    padding: 0 20px;
}

.public-footer p {
    margin: 0 !important;
    font-size: 0.85rem; /* 缩小字体 */
}

/* 确保右侧内容区域有足够的底部padding，不被页脚遮挡 */
.content-area {
    padding-bottom: 50px !important; /* 调整为更小的值，匹配新的页脚高度 */
}

/* 调整VPS卡片的上下间距 */
#vpsContainer .col-lg-3.mb-4,
#vpsContainer .col-md-4.mb-4,
#vpsContainer .col-sm-6.mb-4 {
    margin-bottom: 1.2rem !important; /* 从1.5rem(24px)减少到1.2rem(约19.2px) */
}

/* 商家标签容器 */
.provider-tags-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
    max-height: calc(40px * 5 + 8px * 4); /* 5行高度 + 间距 */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

/* 商家标签容器滚动条样式 */
.provider-tags-container::-webkit-scrollbar {
    width: 6px;
}

.provider-tags-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.provider-tags-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.provider-tags-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 商家标签按钮 - 基础样式 */
.provider-tag {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* 10种淡色渐变配色 - 使用data-color-index而不是nth-child */
.provider-tag[data-color-index="1"]:not(.active) { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); color: #4f46e5 !important; } /* 淡紫 */
.provider-tag[data-color-index="2"]:not(.active) { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); color: #1e40af !important; } /* 淡蓝 */
.provider-tag[data-color-index="3"]:not(.active) { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); color: #047857 !important; } /* 淡绿 */
.provider-tag[data-color-index="4"]:not(.active) { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #92400e !important; } /* 淡黄 */
.provider-tag[data-color-index="5"]:not(.active) { background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%); color: #9a3412 !important; } /* 淡橙 */
.provider-tag[data-color-index="6"]:not(.active) { background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%); color: #991b1b !important; } /* 淡红 */
.provider-tag[data-color-index="7"]:not(.active) { background: linear-gradient(135deg, #fbcfe8 0%, #f9a8d4 100%); color: #9f1239 !important; } /* 淡粉 */
.provider-tag[data-color-index="8"]:not(.active) { background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%); color: #6b21a8 !important; } /* 淡紫红 */
.provider-tag[data-color-index="9"]:not(.active) { background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%); color: #155e75 !important; } /* 淡青 */
.provider-tag[data-color-index="10"]:not(.active) { background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%); color: #374151 !important; } /* 淡灰 */

/* 确保span和provider-name继承颜色 */
.provider-tag:not(.active) span,
.provider-tag:not(.active) .provider-name {
    color: inherit !important;
}

.provider-tag:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(0.95);
}

.provider-tag.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255,107,107,0.4);
    font-weight: 700;
    transform: scale(1.05);
}

.provider-tag.active .provider-name,
.provider-tag.active span {
    color: #fff !important;
}

/* 暗色模式下的商家标签 - 10种中淡色渐变配色 - 使用data-color-index */
body[data-theme="dark"] .provider-tag[data-color-index="1"]:not(.active) { background: linear-gradient(135deg, #4c1d95 0%, #6b21a8 100%); color: #e9d5ff !important; } /* 中紫 */
body[data-theme="dark"] .provider-tag[data-color-index="2"]:not(.active) { background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%); color: #dbeafe !important; } /* 中蓝 */
body[data-theme="dark"] .provider-tag[data-color-index="3"]:not(.active) { background: linear-gradient(135deg, #065f46 0%, #047857 100%); color: #d1fae5 !important; } /* 中绿 */
body[data-theme="dark"] .provider-tag[data-color-index="4"]:not(.active) { background: linear-gradient(135deg, #854d0e 0%, #a16207 100%); color: #fef3c7 !important; } /* 中黄 */
body[data-theme="dark"] .provider-tag[data-color-index="5"]:not(.active) { background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%); color: #fed7aa !important; } /* 中橙 */
body[data-theme="dark"] .provider-tag[data-color-index="6"]:not(.active) { background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%); color: #fecaca !important; } /* 中红 */
body[data-theme="dark"] .provider-tag[data-color-index="7"]:not(.active) { background: linear-gradient(135deg, #9f1239 0%, #be123c 100%); color: #fbcfe8 !important; } /* 中粉 */
body[data-theme="dark"] .provider-tag[data-color-index="8"]:not(.active) { background: linear-gradient(135deg, #6b21a8 0%, #7e22ce 100%); color: #f3e8ff !important; } /* 中紫红 */
body[data-theme="dark"] .provider-tag[data-color-index="9"]:not(.active) { background: linear-gradient(135deg, #155e75 0%, #0e7490 100%); color: #cffafe !important; } /* 中青 */
body[data-theme="dark"] .provider-tag[data-color-index="10"]:not(.active) { background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%); color: #e5e7eb !important; } /* 中灰 */

/* 暗色模式下继承颜色 */
body[data-theme="dark"] .provider-tag:not(.active) span,
body[data-theme="dark"] .provider-tag:not(.active) .provider-name {
    color: inherit !important;
}

body[data-theme="dark"] .provider-tag:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    filter: brightness(1.15);
}

.dark-mode .provider-tag.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255,107,107,0.5);
    font-weight: 700;
    transform: scale(1.05);
}

.dark-mode .provider-tag.active .provider-name,
.dark-mode .provider-tag.active span {
    color: #fff !important;
}

/* 暗色模式下的滚动条 */
.dark-mode .provider-tags-container::-webkit-scrollbar-track {
    background: #2c2c2c;
}

.dark-mode .provider-tags-container::-webkit-scrollbar-thumb {
    background: #555;
}

.dark-mode .provider-tags-container::-webkit-scrollbar-thumb:hover {
    background: #777;
}
