:root {
    --tech-blue: #1853fd;
    --tech-dark-blue: #2563eb;
    --bg-color: #f0f2f5;
    --nav-bg: #2563eb;
    --btn-primary-bg: var(--tech-blue);
    --btn-primary-hover: var(--tech-dark-blue);
}

[data-theme="tech-blue"] {
    --bg-color: rgb(255, 255, 255);
    --nav-bg: #ea2715;
    --btn-primary-bg: #ea2715;
    --btn-primary-hover: #ea2715;
}

body {
    background-color: var(--bg-color);
    transition: background-color 0.3s;
    padding-bottom: 0; /* 调整为0，移除底部边距 */
    min-width: 1200px; /* 设置最小宽度，防止布局变形 */
    overflow-x: auto; /* 允许水平滚动而不是布局变形 */
}

.navbar {
    background-color: var(--nav-bg) !important;
    transition: background-color 0.3s;
    min-width: 1200px; /* 确保导航栏最小宽度 */
}

/* 确保导航栏内容不换行 */
.navbar .container {
    min-width: 1180px;
    white-space: nowrap;
}

/* 导航栏链接不换行 */
.navbar-nav {
    flex-wrap: nowrap;
}

/* 确保导航栏右侧按钮组不换行 */
.navbar .ms-auto {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--btn-primary-bg);
    border-color: var(--btn-primary-bg);
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--btn-primary-hover);
    border-color: var(--btn-primary-hover);
}

/* 减小container左右边距 */
.container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    max-width: 98%;
}

/* 添加使用说明Modal的样式 */
.usage-modal pre {
    background: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
}

.usage-modal details {
    margin: 10px 0;
}

.usage-modal table {
    border-collapse: collapse;
    width: 100%;
}

.usage-modal th,
.usage-modal td {
    border: 1px solid #ddd;
    padding: 8px;
}

/* 图片自适应显示样式 */
.usage-modal img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.contact-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 30px;
}

.qrcode-container {
    margin: 0 auto 15px;
    max-width: 220px;
}

.contact-info p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.bi-wechat {
    color: #09b83e;
}

.bi-envelope {
    color: #ea4335;
}

#themeToggle {
    border: 0 !important;
    font-size: 10px;
}

#themeToggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* 如果需要移除所有按钮的焦点效果 */
.btn:focus, .form-select:focus, .form-control:focus {
    outline: none !important;
    box-shadow: none !important;
}

.btn-custom {
    background: linear-gradient(135deg, #4A90E2, #007BFF);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.btn-custom:hover {
    background: linear-gradient(135deg, #007BFF, #0056b3);
    box-shadow: 0 6px 14px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

/* 登录按钮和用户名按钮的悬停效果 */
.btn-outline-light:hover {
    background-color: #00c4cc;
    color: white;
    border-color: #00c4cc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 下拉菜单的样式调整 */
.dropdown-menu {
    min-width: 12rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

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

/* 下拉菜单项样式 */
.dropdown-item {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    color: #333;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.dropdown-item i {
    margin-right: 10px;
    font-size: 1rem;
    color: var(--tech-blue);
    transition: transform 0.2s ease;
}

/* 下拉菜单项悬停时的背景色变化 */
.dropdown-item:hover {
    background: linear-gradient(to right, rgba(24, 144, 255, 0.1), rgba(24, 144, 255, 0.05));
    color: var(--tech-blue);
    border-left: 3px solid var(--tech-blue);
    transform: translateX(5px);
}

/* 下拉菜单项悬停时图标动画 */
.dropdown-item:hover i {
    transform: scale(1.2);
}

/* 添加菜单项分隔线 */
.dropdown-menu li:not(:last-child) {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* 美化系统设置下拉按钮 */
.nav-link.dropdown-toggle {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link.dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.dropdown-toggle::after {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-link.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.btn-light:hover {
    background-color: #e0e0e0;
}

.site-logo {
    height: 40px;  /* 根据实际图片比例调整 */
    margin-right: 15px;
}

/* 登录模态框样式 */
.modal-content {
    border-radius: 12px; 
    overflow: hidden; 
    border: none; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.modal-header.login-header {
    background: linear-gradient(135deg, #1976D2, #2196F3); 
    border: none; 
    padding: 15px 10px;
}

.modal-title.login-title {
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.input-group-text.login-icon {
    border-top-left-radius: 6px; 
    border-bottom-left-radius: 6px;
}

.form-control.login-input {
    border-top-right-radius: 6px; 
    border-bottom-right-radius: 6px;
}

.captcha-container {
    height: 30px; 
    width: 90px; 
    border-radius: 6px; 
    cursor: pointer;
}

.captcha-text {
    font-family: 'Courier New', monospace; 
    font-weight: bold; 
    font-size: 16px; 
    letter-spacing: 1px; 
    color: #333; 
    user-select: none;
}

.login-button {
    background: linear-gradient(135deg, #1976D2, #2196F3); 
    border: none; 
    padding: 8px; 
    border-radius: 6px; 
    font-weight: 500; 
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* 注销按钮样式 */
.logout-button {
    font-size: 13px; 
    padding: 5px 12px; 
    border-radius: 20px; 
    color: white; 
    background: linear-gradient(135deg, #ff5252, #d32f2f); 
    border: none; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); 
    transition: all 0.3s ease; 
    display: flex; 
    align-items: center; 
    gap: 0px;
}

/* 登录按钮样式 */
.login-nav-button {
    font-size: 13px; 
    padding: 5px 12px; 
    border-radius: 20px; 
    color: white; 
    background: linear-gradient(135deg, #00bcd4, #0097a7); 
    border: none; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); 
    transition: all 0.3s ease; 
    display: flex; 
    align-items: center; 
    gap: 0px;
}

/* 页脚样式 */
footer {
    position: fixed;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 1000;
    min-width: 320px;
    padding-bottom: env(safe-area-inset-bottom);
    font-size: 10px;
}

/* Grafana目录面板样式已移动到dashboard.css文件中 */