/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #3a7bd5;
    --secondary-color: #53a0fd;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
    --offline-color: #9E9E9E;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f5f7fa;
    --card-radius: 12px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* 粒子背景 */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #243B55, #141E30);
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 移动端视图 */
.container.mobile-view {
    margin: 10px;
    padding: 15px;
}

/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-light);
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding-top: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
    padding-left: 15px;
    border-radius: var(--card-radius);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    transition: all var(--transition-speed);
}

h1:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* 服务器网格 */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 服务器卡片 */
.server-card {
    border-radius: var(--card-radius);
    padding: 25px;
    transition: all var(--transition-speed);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    z-index: -1;
    transition: opacity var(--transition-speed);
}

.server-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.server-card .card-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.card-button {
    display: inline-block;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.server-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-light);
    position: relative;
}

.status-icon {
    margin: 10px auto;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
}

.status-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 2px;
}

.server-status {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-light);
    position: relative;
}

.card-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* 状态颜色 */
.status-low::before {
    background-color: var(--success-color);
}

.status-medium::before {
    background-color: var(--warning-color);
}

.status-high::before {
    background-color: var(--danger-color);
}

.status-offline::before {
    background-color: var(--offline-color);
}

/* 页脚和更新时间 */
.footer, .last-update {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--card-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 通知样式 */
.notification {
    padding: 12px 20px;
    border-radius: var(--card-radius);
    position: fixed;
    bottom: 20px;
    right: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all var(--transition-speed);
    opacity: 0;
    transform: translateY(20px);
    background: rgba(76, 175, 80, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-light);
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* 加载容器 */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.5s ease;
}

.loading-container.fade-out {
    opacity: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    .server-grid {
        grid-template-columns: 1fr;
    }
    
    .server-card {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
        /* padding: 10px; */
    }
}

@media (max-width: 480px) {
    .notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    .server-card {
        padding: 15px;
    }
    
    .status-icon {
        margin: 5px auto;
    }
    
    h1 {
        /* font-size: 20px; */
        margin-bottom: 20px;
    }
}

/* 管理界面样式 */
.admin-panel {
    margin-top: 40px;
    padding: 25px;
    border-radius: var(--card-radius);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-panel h2 {
    margin-bottom: 20px;
    color: var(--text-light);
}

form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 768px) {
    form {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-light);
}

input, select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(58, 123, 213, 0.3);
}

button {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

button.danger {
    background: linear-gradient(135deg, #f5515f, #a1051d);
}

button.danger:hover {
    background: linear-gradient(135deg, #a1051d, #f5515f);
}

/* 服务器列表样式 */
.server-list {
    margin-top: 20px;
}

.server-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    padding-right: 0px;
    padding-bottom: 15px;
    padding-left: 0px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-light);
    transition: all var(--transition-speed);
}

.server-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.server-actions {
    display: flex;
    gap: 10px;
}

.admin-toggle {
    margin-top: 25px;
    text-align: center;
}

.hidden {
    display: none;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.server-card {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.server-card:nth-child(2n) {
    animation-delay: 0.1s;
}

.server-card:nth-child(3n) {
    animation-delay: 0.2s;
}

.admin-link-card, .admin-link-card:visited, .admin-link-card:hover, .admin-link-card:active {
    text-decoration: none;
}

/* 用户登录按钮样式 */
.user-login-container {
    text-align: center;
    margin: 10px 0 20px;
}

.user-login-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(76, 175, 80, 0.7);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: none;
}

.user-login-btn:hover {
    background-color: rgba(76, 175, 80, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: rgba(25, 25, 35, 0.95);
    margin: 10% auto;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    color: #eee;
    animation: modalFadeIn 0.3s;
    position: relative;
}

.wide-modal {
    max-width: 700px;
}

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

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #fff;
}

/* 模态框标题居中 */
.modal-content h2 {
    text-align: center;
    margin-bottom: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.7);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 14px;
}

.btn.primary {
    background-color: rgba(76, 175, 80, 0.8);
    color: white;
}

.btn.primary:hover {
    background-color: rgba(76, 175, 80, 1);
}

.error-message {
    color: #f44336;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

/* 登录按钮居中 */
.form-group:has(button) {
    text-align: center;
}

/* 兼容性更好的登录按钮居中样式 */
#userLoginForm .form-group:last-of-type {
    text-align: center;
}

/* 用户常用区样式 */
.user-favorites {
    margin-top: 15px;
}

/* 常用区标题和计数信息容器 */
.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.favorites-header h3 {
    margin: 0;
}

.favorites-count-display {
    font-size: 14px;
    color: #ccc;
    font-style: italic;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.favorites-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.favorites-group-title {
    margin: 10px 0 5px;
    font-size: 16px;
    font-weight: 500;
    padding-left: 5px;
    border-left: 3px solid;
}

.favorites-group-title.active {
    color: #4caf50;
    border-color: #4caf50;
}

.favorites-group-title.expiring {
    color: #ff9800;
    border-color: #ff9800;
}

.favorites-group-title.expired {
    color: #f44336;
    border-color: #f44336;
}

.no-favorites-message {
    text-align: center;
    color: #ccc;
    font-style: italic;
}

.favorite-card {
    background-color: rgba(40, 40, 50, 0.7);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background-color: rgba(50, 50, 60, 0.8);
}

.favorite-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
}

.favorite-expiry {
    font-size: 12px;
    color: #aaa;
}

.favorite-status {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-active {
    background-color: rgba(76, 175, 80, 1);
}

.status-expiring {
    background-color: rgba(255, 193, 7, 1);
}

.status-expired {
    background-color: rgba(244, 67, 54, 1);
}

.favorite-time {
    margin-top: 8px;
    font-size: 14px;
}

.favorite-time.unlimited {
    color: #4caf50;
}

.favorite-time.limited {
    color: #ff9800;
}

.favorite-time.expired {
    color: #f44336;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated {
    animation: fadeInUp 0.5s ease forwards;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
    
    .favorites-list {
        grid-template-columns: 1fr;
    }
}

/* 用户面板标题区域 */
.user-panel-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-panel-header h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.user-panel-name {
    font-size: 16px;
    color: #ccc;
    font-weight: 500;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 用户面板底部区域 */
.user-panel-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
}

.logout-btn {
    background-color: rgba(244, 67, 54, 0.7);
    color: white;
}

.logout-btn:hover {
    background-color: rgba(244, 67, 54, 0.9);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* =================== 备份管理相关样式 =================== */

/* 用户面板选项卡 */
.user-panel-tabs {
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 20px;
    background-color: rgba(40, 40, 50, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.user-tab-button {
    flex: 1;
    min-width: 100px;
    background: none;
    border: none;
    padding: 12px 20px;
    color: #ccc;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    position: relative;
    white-space: nowrap;
}

.user-tab-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.user-tab-button.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(58, 123, 213, 0.3);
}

/* 用户面板内容区域 */
.user-tab-content {
    display: none;
    min-height: 300px;
}

.user-tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* 备份管理区域 */
.backup-section {
    padding: 20px 0;
}

.backup-section h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 0.5px;
}

.backup-description {
    color: #ccc;
    margin-bottom: 25px;
    text-align: center;
    font-style: italic;
    font-size: 15px;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.backup-server-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.no-backup-servers {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-style: italic;
}

/* 备份服务器卡片 */
.backup-server-card {
    background: linear-gradient(135deg, rgba(40, 40, 50, 0.8), rgba(35, 35, 45, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px 24px 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.backup-server-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    border-color: rgba(255, 255, 255, 0.25);
}

.backup-server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4caf50, #2196f3, #ff9800);
    border-radius: 12px 12px 0 0;
}

.backup-server-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.backup-server-name {
    font-weight: 600;
    font-size: 18px;
    color: #fff;
    letter-spacing: 0.3px;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    margin-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backup-server-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.backup-server-status.status-permanent {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.backup-server-status.status-temporary {
    background-color: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.backup-server-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.backup-server-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.backup-server-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.backup-server-health {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: none;
    opacity: 0;
    transform: translateY(-10px);
}

.backup-server-health.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.backup-server-health.hide {
    opacity: 0;
    transform: translateY(-10px);
}

.backup-server-health.success {
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.backup-server-health.error {
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.health-ok {
    color: #4caf50;
}

.health-error {
    color: #f44336;
}

.health-loading {
    color: #ccc;
}

/* 备份管理模态框 */
.backup-modal {
    max-width: 900px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 备份管理模态框标题区域 */
.backup-modal-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.backup-modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.backup-modal-server-name {
    font-size: 16px;
    color: #ccc;
    font-weight: 500;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.backup-tabs {
    display: flex;
    margin-bottom: 25px;
    background-color: rgba(40, 40, 50, 0.5);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    color: #ccc;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-size: 14px;
}

.tab-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 提高特殊性确保激活状态样式优先级 */
.backup-tabs .tab-button.active,
.tab-button.active {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(58, 123, 213, 0.3) !important;
}

/* 确保激活状态的hover效果 */
.backup-tabs .tab-button.active:hover,
.tab-button.active:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.backup-content {
    min-height: 400px;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* 备份概览 */
.backup-overview {
    padding: 20px 0;
}

.backup-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--card-radius);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all var(--transition-speed);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.stat-card h4 {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #888;
    font-size: 12px;
}

.rate-limits {
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--card-radius);
    padding: 20px;
}

.rate-limits h4 {
    color: #fff;
    margin-bottom: 15px;
}

.rate-limit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rate-limit-item:last-child {
    border-bottom: none;
}

.status-ok {
    color: #4caf50;
    font-weight: 500;
}

.status-limited {
    color: #f44336;
    font-weight: 500;
}

/* 备份操作 */
.backup-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.backup-list h4 {
    color: #fff;
    margin-bottom: 15px;
}

.backup-item {
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-speed);
}

.backup-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    background: rgba(50, 50, 60, 0.8);
}

.backup-info {
    flex: 1;
}

.backup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.backup-id {
    font-weight: 600;
    color: #fff;
    flex: 1;
}

.backup-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #ccc;
}

.backup-type {
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.backup-type.incremental {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.backup-type.overwrite {
    background-color: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.backup-actions {
    display: flex;
    gap: 8px;
}

.btn.small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.btn.danger {
    background-color: rgba(244, 67, 54, 0.8);
    color: white;
}

.btn.danger:hover {
    background-color: rgba(244, 67, 54, 1);
}

.btn.secondary {
    background-color: rgba(255, 152, 0, 0.8);
    color: white;
}

.btn.secondary:hover {
    background-color: rgba(255, 152, 0, 1);
}

/* 消息样式 */
.success-message {
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    display: none;
}

.loading-message {
    background-color: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    display: none;
    text-align: center;
}

/* 全局提示消息样式 */
.global-messages {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 500px;
    pointer-events: none;
}

.global-message {
    margin: 8px 0;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 500;
    text-align: center;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.global-message:empty {
    display: none !important;
}

/* 显示动画 */
.global-message.show {
    transform: translateY(0);
    opacity: 1;
}

/* 全局错误消息 */
.global-message.error-message {
    background-color: rgba(244, 67, 54, 0.95);
    border: 1px solid rgba(244, 67, 54, 0.6);
    color: white;
}

/* 全局成功消息 */
.global-message.success-message {
    background-color: rgba(76, 175, 80, 0.95);
    border: 1px solid rgba(76, 175, 80, 0.6);
    color: white;
}

/* 全局加载消息 */
.global-message.loading-message {
    background-color: rgba(33, 150, 243, 0.95);
    border: 1px solid rgba(33, 150, 243, 0.6);
    color: white;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .global-messages {
        bottom: 15px;
        width: 95%;
        max-width: none;
    }
    
    .global-message {
        padding: 12px 16px;
        font-size: 14px;
    }
}

.no-data {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .backup-modal {
        width: 95vw;
        max-height: 90vh;
    }
    
    .backup-modal-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .backup-modal-header h2 {
        font-size: 20px;
    }
    
    .backup-modal-server-name {
        font-size: 14px;
        padding: 5px 12px;
    }
    
    .user-panel-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .user-panel-header h2 {
        font-size: 20px;
    }
    
    .user-panel-name {
        font-size: 14px;
        padding: 5px 12px;
    }
    
    .backup-stats {
        grid-template-columns: 1fr;
    }
    
    .backup-actions {
        flex-direction: column;
    }
    
    .backup-server-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .backup-server-info {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .backup-server-name {
        font-size: 16px;
        margin-right: 8px;
        flex: 1;
        min-width: 120px;
    }
    
    .backup-server-status {
        font-size: 10px;
        padding: 4px 10px;
        flex-shrink: 0;
    }
    
    .backup-server-actions {
        width: 100%;
        gap: 10px;
    }
    
    .backup-server-actions .btn {
        min-width: 100px;
        font-size: 12px;
        padding: 7px 12px;
    }
    
    .backup-server-card {
        padding: 16px 20px 14px;
    }
    
    .backup-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .backup-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .rate-limit-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .user-panel-tabs {
        flex-wrap: nowrap;
        gap: 0;
    }
    
    .user-tab-button {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 80px;
    }
    
    .backup-meta {
        flex-direction: column;
        gap: 5px;
    }

    /* 移动端常用区标题和计数信息响应式 */
    .favorites-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }

    .favorites-count-display {
        font-size: 12px;
        white-space: nowrap;
    }

    /* 备份管理面板小屏幕优化 */
    .backup-modal-header h2 {
        font-size: 18px;
    }
    
    .backup-modal-server-name {
        font-size: 13px;
        padding: 4px 10px;
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 用户面板小屏幕优化 */
    .user-panel-header h2 {
        font-size: 18px;
    }
    
    .user-panel-name {
        font-size: 13px;
        padding: 4px 10px;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* 公共卡密管理页面样式优化 */

/* 节标题区域 */
.section-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header h2 {
    color: var(--text-light);
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

.section-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
}

/* 卡片区域 */
.card-section {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.card-section:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-section h3 {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 500;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* 共享卡密表单 */
.shared-card-form {
    max-width: none;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 0px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.form-group-wide {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2196F3;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 4px;
}

/* 生成按钮 */
.btn-generate {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0px;
    min-width: 180px;
    justify-content: center;
}

.btn-generate:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.btn-generate span {
    font-size: 18px;
}

/* 搜索按钮 */
.btn-search {
    background: linear-gradient(135deg, #FF9800, #F57700);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.btn-search:hover {
    background: linear-gradient(135deg, #F57700, #FF9800);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
}

.btn-search span {
    font-size: 16px;
}

/* 搜索过滤区域 */
.search-filters {
    width: 100%;
    margin-bottom: 5px;
}

.search-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: end;
}

.search-input-group,
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-input-group label,
.filter-group label {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-input-group input,
.filter-group select {
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2196F3;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.filter-group select option {
    background: #2a2a2a;
    color: #ffffff;
    padding: 8px;
}

/* 确保所有select option都有正确的颜色 */
select option {
    background: #2a2a2a !important;
    color: #ffffff !important;
    padding: 8px;
}

.search-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}



/* 响应式设计 */
@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .search-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-input-group,
    .filter-group {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .card-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .section-header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn-generate {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .card-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .section-header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    
    .card-section h3 {
        font-size: 16px;
    }
}

/* 使用记录查询区域样式 */
.usage-search {
    width: 100%;
    margin-bottom: 25px;
}

.usage-search-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 20px;
    align-items: end;
}

.search-button-group {
    display: flex;
    align-items: end;
}

.btn-search {
    background: linear-gradient(135deg, #673AB7, #5E35B1);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0px;
    min-width: 120px;
    justify-content: center;
    height: 45px;
}

.btn-search:hover {
    background: linear-gradient(135deg, #5E35B1, #673AB7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(103, 58, 183, 0.3);
}

.btn-search span {
    font-size: 16px;
}

.usage-records-container {
    /* min-height: 60px; */
    margin-top: 20px;
}

/* 响应式设计补充 */
@media (max-width: 1024px) {
    .usage-search-row {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .search-button-group {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .usage-search-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn-search {
        width: 100%;
    }
}