* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

.container-fluid {
    padding: 0;
}

.row {
    margin: 0;
}

/* 左侧面板 */
.left-panel {
    height: 100vh;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 20px;
    border-right: 1px solid #dee2e6;
}

.panel-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #007bff;
}

.panel-header h4 {
    margin: 0;
    color: #007bff;
    font-weight: 400;
}

.title-line {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.title-line i {
    font-size: 1.2rem;
}

.subtitle-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subtitle-cn {
    font-size: 1.1rem;
    flex: 1;
}

.settings-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 4px;
    flex-shrink: 0;
}

.settings-btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.settings-btn svg {
    display: block;
}

/* 国家/地区选择�?*/
.region-selector {
    background: transparent;
    padding: 0;
    margin-bottom: 15px;
}

.region-selector h6 {
    margin-bottom: 10px;
    font-weight: 400;
    color: #495057;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
}

.continent-buttons {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.continent-btn {
    flex: 1;
    min-width: 90px;
    padding: 8px 12px;
    border: 1px solid #007bff;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-align: center;
    font-weight: 400;
    color: #212529;
}

.continent-btn:hover {
    background: #f0f7ff;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.continent-btn.active {
    background: #007bff;
    color: white;
    border: 3px solid white;
    outline: 2px solid #007bff;
    outline-offset: -1px;
    font-weight: 500;
}

/* 国家选择 Modal */
.country-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    pointer-events: none;
}

.country-modal.show {
    display: block;
    pointer-events: auto;
}

.country-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.country-modal.show .country-modal-overlay {
    opacity: 1;
}

.country-modal-content {
    position: absolute;
    top: 140px;
    left: 20px;
    width: calc(33.333% - 30px);
    max-width: 520px;
    max-height: calc(100vh - 160px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease-out;
}

.country-modal.show .country-modal-content {
    opacity: 1;
    transform: translateY(0);
}

.country-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.country-modal-title {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: #212529;
}

.country-modal-close {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.2s;
}

.country-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #212529;
}

.country-modal-close svg {
    width: 16px;
    height: 16px;
}

.country-modal-search {
    position: relative;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.country-modal-search .search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.country-modal-search input {
    width: 100%;
    padding: 8px 10px 8px 32px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
    background: white;
}

.country-modal-search input:focus {
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.country-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    align-content: start;
}

.country-card {
    padding: 10px 6px;
    border: 2px solid transparent;  /* 使用透明边框占位 */
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 0 1px #e0e0e0;  /* 使用阴影模拟默认边框 */
}

.country-card:hover {
    border-color: #34c759;  /* 显示绿色边框 */
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

.country-card.selected {
    border: 3px solid #34c759;
    background: white;
    box-shadow: 0 0 0 1px #34c759;
    margin: -1px;  /* 选中状态边框更粗，需要补�?*/
}

.country-flag {
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.country-name {
    font-size: 13px;
    font-weight: 400;
    color: #212529;
    line-height: 1.3;
    height: 34px;  /* 固定高度，容�?行文�?(13px * 1.3 * 2 �?34px) */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    overflow: hidden;
}

.country-card .region-tag {
    display: none;
}

.country-modal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6c757d;
}

.country-modal-empty svg {
    margin-bottom: 12px;
    opacity: 0.4;
    width: 48px;
    height: 48px;
}

.country-modal-empty p {
    margin: 0;
    font-size: 14px;
}

/* 响应�?- Modal */
@media (max-width: 768px) {
    .country-modal-content {
        top: 120px;
        left: 10px;
        width: calc(100% - 20px);
        max-width: none;
        max-height: calc(100vh - 140px);
    }
    
    .country-modal-body {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .country-card {
        padding: 8px 6px;
    }
    
    .country-flag {
        width: 36px;
        height: 27px;
    }
    
    .country-name {
        font-size: 11px;
    }
}

/* 当前选择 */
.current-selection {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #007bff;
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.current-selection strong {
    color: #212529;
    font-size: 14px;
}

.current-selection-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.current-selection-text {
    font-size: 14px;
    color: #212529;
}

/* 搜索�?*/
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    font-size: 14px;
    border: 1px solid #28a745;
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #218838;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.search-box input:disabled {
    border-color: #dee2e6;
    background: #f8f9fa;
    cursor: not-allowed;
}

.search-box button {
    white-space: nowrap;
    font-size: 14px;
    min-width: 90px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    transition: all 0.2s;
}

.search-box button:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.search-box button:disabled {
    border-color: #dee2e6;
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* 搜索建议 */
.suggestions-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestions-list.show {
    display: block;
}

.suggestion-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-main {
    font-weight: 400;
    color: #212529;
    margin-bottom: 4px;
}

.suggestion-secondary {
    font-size: 13px;
    color: #6c757d;
}

/* 地址详情 */
.address-details {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #007bff;
    display: block;
}

.address-details h6 {
    margin-bottom: 15px;
    color: #212529;
    font-weight: 400;
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row:hover {
    background: #f8f9fa;
}

.detail-label {
    flex: 0 0 100px;
    font-weight: 400;
    color: #6c757d;
    font-size: 13px;
}

.detail-value {
    flex: 1;
    color: #212529;
    font-size: 13px;
    word-break: break-word;
}

.copy-btn {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.copy-btn:hover {
    background: #e9ecef;
    color: #007bff;
}

.copy-btn.copied {
    color: #28a745;
}

.copy-btn svg {
    display: block;
}

/* 虚拟个人信息 */
.person-info {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #007bff;
    display: block;
    margin-top: 15px;
}

.person-info h6 {
    margin-bottom: 15px;
    color: #212529;
    font-weight: 400;
}

/* 地图 */
#map {
    height: 100vh;
    width: 100%;
    cursor: default;
}

#map canvas {
    cursor: default !important;
}

/* 加载状�?*/
.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式设�?*/
@media (max-width: 1024px) {
    .country-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

@media (max-width: 768px) {
    .left-panel {
        height: auto;
        max-height: 50vh;
    }
    
    #map {
        height: 50vh;
    }
    
    .country-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .continent-buttons {
        justify-content: space-between;
    }
    
    .continent-btn {
        flex: 0 0 auto;
        min-width: 60px;
        font-size: 12px;
        padding: 6px 8px;
    }
    
    /* 移动端标题优�?*/
    .panel-header {
        padding-bottom: 10px;
    }
    
    .title-line {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    
    .title-line i {
        font-size: 1rem;
    }
    
    .subtitle-cn {
        font-size: 0.95rem;
    }
    
    .settings-btn {
        padding: 4px;
        margin-left: 8px;
    }
    
    .settings-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* 滚动条样�?*/
.country-grid::-webkit-scrollbar,
.suggestions-list::-webkit-scrollbar,
.left-panel::-webkit-scrollbar,
.country-modal-body::-webkit-scrollbar {
    width: 6px;
}

.country-grid::-webkit-scrollbar-track,
.suggestions-list::-webkit-scrollbar-track,
.left-panel::-webkit-scrollbar-track,
.country-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.country-grid::-webkit-scrollbar-thumb,
.suggestions-list::-webkit-scrollbar-thumb,
.left-panel::-webkit-scrollbar-thumb,
.country-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.country-grid::-webkit-scrollbar-thumb:hover,
.suggestions-list::-webkit-scrollbar-thumb:hover,
.left-panel::-webkit-scrollbar-thumb:hover,
.country-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Mapbox 弹窗自定义样�?*/
.mapboxgl-popup-content {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    padding: 0 !important;
}

.mapboxgl-popup-tip {
    border-top-color: rgba(255, 255, 255, 0.98) !important;
}

.custom-popup .mapboxgl-popup-content {
    min-width: 250px;
    max-width: 400px;
}

.custom-popup .mapboxgl-popup-close-button {
    font-size: 18px;
    width: 24px;
    height: 24px;
    padding: 0;
    color: #666;
    right: 6px;
    top: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.custom-popup .mapboxgl-popup-close-button:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}

/* 隐藏 Mapbox Logo 和版权信息（完全透明�?*/
.mapboxgl-ctrl-logo {
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.mapboxgl-ctrl-attrib {
    opacity: 0 !important;
    pointer-events: none !important;
    font-size: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.mapboxgl-ctrl-attrib-inner {
    display: none !important;
}

.mapboxgl-ctrl-attrib-button {
    display: none !important;
}

/* 确保地图底部没有空白 */
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
    pointer-events: none !important;
}

/* 地图样式切换控件 */
.style-switcher {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.style-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: none;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.style-btn:last-child {
    border-bottom: none;
}

.style-btn:hover {
    background: #f0f0f0;
}

.style-btn.active {
    background: #3b82f6;
}

.style-btn.active .style-icon {
    filter: grayscale(100%) brightness(200%);
}

.style-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.style-icon svg {
    width: 18px;
    height: 18px;
    color: #333;
}

.style-btn.active .style-icon svg {
    color: white;
}

.style-name {
    display: none;
}

/* IP 定位按钮样式 */
.ip-location-btn {
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="29" height="29" viewBox="0 0 29 29" fill="%23333"><path d="M14.5 2C8.7 2 4 6.7 4 12.5c0 5.8 10.5 14.5 10.5 14.5S25 18.3 25 12.5C25 6.7 20.3 2 14.5 2zm0 14c-1.9 0-3.5-1.6-3.5-3.5S12.6 9 14.5 9s3.5 1.6 3.5 3.5S16.4 16 14.5 16z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

.ip-location-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 设置弹窗样式 */
.settings-modal-content {
    max-width: 500px;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.settings-modal-body {
    padding: 20px;
    display: block !important;
    grid-template-columns: none !important;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-info {
    flex: 1;
    margin-right: 15px;
}

.settings-item-label {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.settings-item-desc {
    font-size: 13px;
    color: #999;
}

/* iOS风格开�?*/
.ios-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: 0.3s;
    border-radius: 31px;
}

.ios-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ios-switch input:checked + .ios-slider {
    background-color: #34c759;
}

.ios-switch input:checked + .ios-slider:before {
    transform: translateX(20px);
}

/* 关于部分 */
.about-content {
    display: flex;
    align-items: center;
    padding: 20px;
}

.about-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.about-info {
    flex: 1;
}

.about-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.02em;
}

.about-version {
    font-size: 14px;
    color: #007bff;
    margin-bottom: 8px;
}

.about-desc {
    font-size: 13px;
    color: #666;
}

/* 响应�?- 设置弹窗 */
@media (max-width: 768px) {
    .settings-modal-content {
        max-width: calc(100% - 40px);
        width: calc(100% - 40px);
    }
    
    .about-logo {
        width: 60px;
        height: 60px;
    }
}


/* ==================== API统计Modal样式 ==================== */

.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.stats-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.stats-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.stats-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-modal-header h5 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.stats-modal-header h5 i {
    margin-right: 8px;
    color: #0080ff;
}

.stats-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.2s;
}

.stats-modal-close:hover {
    color: #333;
}

.stats-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    height: 0;
}

.stats-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Tab切换 */
.stats-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e0e0e0;
}

.stats-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.stats-tab:hover {
    color: #333;
    background: rgba(0, 128, 255, 0.05);
}

.stats-tab.active {
    color: #0080ff;
    border-bottom-color: #0080ff;
}

.stats-tab i {
    margin-right: 6px;
}

/* Tab内容 */
.stats-tab-content {
    display: none;
}

.stats-tab-content.active {
    display: block;
}

.stats-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.stats-loading i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.stats-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 16px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f0f0;
}

.stats-section-title:first-child {
    margin-top: 0;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stats-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.stats-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.stats-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.stats-card-info {
    flex: 1;
}

.stats-card-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stats-card-label {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* 配额显示 */
.stats-quota {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quota-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
}

.quota-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.quota-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.quota-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    background: white;
}

.quota-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.quota-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.quota-text {
    font-size: 13px;
    color: #666;
    text-align: right;
}

.quota-text span {
    font-weight: 600;
    color: #333;
}

/* 时间范围选择 */
.stats-period {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.period-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
}

.period-btn:hover {
    border-color: #0080ff;
    color: #0080ff;
}

.period-btn.active {
    background: #0080ff;
    border-color: #0080ff;
    color: white;
}

/* Token卡片网格布局 */
.stats-tokens-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.token-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px;
    transition: all 0.2s;
}

.token-card:hover {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.token-card-header {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e0e0e0;
}

.token-card-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    font-size: 11px;
}

.token-card-stat:last-child {
    margin-bottom: 0;
}

.token-card-label {
    color: #666;
    font-size: 10px;
}

.token-card-value {
    font-weight: 600;
    color: #333;
}

.token-card-pct {
    color: #999;
    font-size: 9px;
    margin-left: 3px;
}

/* 保留表格样式作为备用 */
.stats-table-container {
    overflow-x: auto;
    margin-bottom: 12px;
    display: none;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.stats-table thead {
    background: #f8f9fa;
}

.stats-table th {
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    font-size: 11px;
}

.stats-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
}

.stats-table tbody tr:hover {
    background: #f8f9fa;
}

.stats-table small {
    color: #999;
    margin-left: 4px;
}

/* 简单统�?*/
.stats-simple {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.stats-simple-item {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-simple-item.stats-simple-total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
}

.stats-simple-item.stats-simple-total .stats-simple-label,
.stats-simple-item.stats-simple-total .stats-simple-value strong {
    color: white;
}

.stats-simple-item.stats-simple-total .stats-simple-label {
    font-size: 12px;
}

.stats-simple-item.stats-simple-total .stats-simple-value strong {
    font-size: 16px;
}

.stats-simple-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.stats-simple-label i {
    margin-right: 6px;
    color: #0080ff;
    font-size: 12px;
}

.stats-simple-value {
    text-align: right;
}

.stats-simple-value strong {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: block;
    line-height: 1;
}

.stats-simple-rate {
    font-size: 11px;
    color: #28a745;
    margin-top: 2px;
    display: block;
}

/* 图表容器 */
.stats-chart-container {
    height: 180px;
    margin-bottom: 0;
}

/* Mapbox和Google详情页面的图表更�?*/
#tab-mapbox .stats-chart-container,
#tab-google .stats-chart-container {
    height: 150px;
}

/* 响应�?*/
@media (max-width: 768px) {
    .stats-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .stats-tabs {
        overflow-x: auto;
    }
    
    .stats-tab {
        white-space: nowrap;
    }
}


/* 计费周期信息横幅 */
.billing-info-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.billing-info-banner i {
    font-size: 16px;
}

.billing-info-banner span {
    font-size: 13px;
    font-weight: 500;
}

.billing-reset {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

/* API健康检查样�?*/
.health-card {
    margin-bottom: 16px;
}

.health-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.health-status-icon {
    flex-shrink: 0;
}

.health-info {
    flex: 1;
}

.health-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.health-details {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 13px;
}

.health-status {
    font-weight: 600;
}

.health-time {
    color: #666;
}

.health-error {
    color: #dc3545;
    font-size: 12px;
}

/* Mapbox健康网格 */
.health-tokens-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.health-token-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    transition: all 0.2s;
}

.health-token-card:hover {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.health-token-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.health-status-icon-small svg {
    width: 16px;
    height: 16px;
}

.health-token-status {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

.health-token-time {
    font-size: 10px;
    color: #666;
}

.health-token-error {
    font-size: 9px;
    color: #dc3545;
    margin-top: 4px;
    word-break: break-word;
}

.health-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
}

/* API管理样式 - 表格布局 */
.api-manage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 16px;
}

.api-manage-table thead {
    background: #f8f9fa;
}

.api-manage-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    font-size: 11px;
}

.api-manage-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.api-manage-table tbody tr:hover {
    background: #f8f9fa;
}

.api-manage-input-inline {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

.api-manage-input-inline:focus {
    outline: none;
    border-color: #0080ff;
}

.api-manage-add-row {
    background: #e7f5ff !important;
}

.api-manage-add-row td {
    border-bottom: none;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
    margin-right: 4px;
}

.btn-xs:last-child {
    margin-right: 0;
}

/* 数字密码锁弹�?- 白色背景 + 绿色按钮 */
.pinlock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
}

.pinlock-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.pinlock-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 380px;
    padding: 40px 30px 30px;
    animation: pinlockSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pinlockSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.pinlock-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.pinlock-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.pinlock-header {
    text-align: center;
    margin-bottom: 30px;
}

.pinlock-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: #34c759;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.pinlock-title {
    margin: 0 0 5px 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.pinlock-subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.pinlock-display {
    margin-bottom: 20px;
}

.pinlock-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
}

.pinlock-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s;
}

.pinlock-dot-filled {
    background: #34c759;
    transform: scale(1.2);
}

.pinlock-success .pinlock-dot-filled {
    background: #34c759;
}

@keyframes pinlockShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.pinlock-error-shake {
    animation: pinlockShake 0.4s;
}

.pinlock-error-image {
    text-align: center;
    margin-bottom: 15px;
    animation: pinlockErrorFadeIn 0.2s ease-out;
}

@keyframes pinlockErrorFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pinlock-error-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.pinlock-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 280px;
    margin: 0 auto;
}

.pinlock-key {
    width: 75px;
    height: 75px;
    border: none;
    border-radius: 50%;
    background: #34c759;
    color: white;
    font-size: 32px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

.pinlock-key:hover {
    background: #2fb350;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.4);
}

.pinlock-key:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(52, 199, 89, 0.3);
}

.pinlock-key-empty {
    background: transparent;
    cursor: default;
    box-shadow: none;
}

.pinlock-key-empty:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.pinlock-key-delete {
    font-size: 24px;
    background: #ff3b30;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
}

.pinlock-key-delete:hover {
    background: #e6342a;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

.key-number {
    font-size: 32px;
    font-weight: 400;
}
