* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* 动态背景效果 */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: rgba(56, 189, 248, 0.3);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* 导航栏 */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    height: 70px;
}

/* 菜单按钮 */
.menu-toggle {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: none;
}

.menu-toggle:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

/* 用户菜单按钮 */
.user-menu-toggle {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: none;
}

.user-menu-toggle:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

/* 导航栏右侧 */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* 用户下拉菜单 */
.user-dropdown {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 用户下拉菜单（手机模式） */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.user-dropdown-menu.open {
    display: block;
}

.user-dropdown-item {
    display: block;
    padding: 1rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin: 0.25rem 0;
}

.user-dropdown-item:hover {
    background: rgba(56, 189, 248, 0.1);
    border-left-color: #38bdf8;
    color: #38bdf8;
}

.user-info-item {
    font-weight: 600;
    color: #e2e8f0;
    cursor: default;
}

.user-info-item:hover {
    background: none;
    border-left-color: transparent;
    color: #e2e8f0;
}

.logout-btn-mobile {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 90%;
    margin: 0.5rem auto;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn-mobile:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* 桌面端显示控制 */
.desktop-only {
    display: block;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.6), rgba(14, 165, 233, 0.6));
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.8), rgba(14, 165, 233, 0.8));
    border-color: rgba(56, 189, 248, 0.5);
}

/* 火狐浏览器滚动条美化 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.6) rgba(15, 23, 42, 0.8);
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #374151;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #38bdf8;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-home-btn {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-home-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.user-info {
    font-size: 1rem;
    font-weight: 500;
    color: #e2e8f0;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* 主容器 */
.main-container {
    display: flex;
    flex: 1;
}

/* 左侧导航栏 */
.sidebar {
    width: 250px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    padding: 2rem 0;
    flex-shrink: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    position: sticky;
    top: 70px;
    z-index: 999;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: block;
    padding: 1rem 2rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.1), transparent);
    transition: width 0.3s ease;
}

.sidebar-link:hover::before {
    width: 100%;
}

.sidebar-link:hover {
    background: rgba(56, 189, 248, 0.05);
    border-left-color: #38bdf8;
    color: #38bdf8;
}

.sidebar-link.active {
    background: rgba(56, 189, 248, 0.1);
    border-left-color: #38bdf8;
    color: #38bdf8;
    font-weight: 600;
}

.sidebar-icon {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* 二级菜单样式 */
.sidebar-item.has-submenu {
    position: relative;
}

.sidebar-item.has-submenu .sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.submenu-arrow {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    margin-left: auto;
}

.sidebar-item.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.5);
    border-left: 2px solid rgba(56, 189, 248, 0.1);
    margin-left: 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-item.has-submenu.open .sidebar-submenu {
    max-height: 500px;
}

.sidebar-submenu-item {
    margin: 0;
}

.sidebar-submenu-link {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 2.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.sidebar-submenu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.1), transparent);
    transition: width 0.3s ease;
}

.sidebar-submenu-link:hover::before {
    width: 100%;
}

.sidebar-submenu-link:hover {
    background: rgba(56, 189, 248, 0.05);
    color: #38bdf8;
    padding-left: 2.75rem;
}

.sidebar-submenu-link.active {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    font-weight: 600;
    border-right: 2px solid #38bdf8;
}

.sidebar-submenu-link .sidebar-icon {
    font-size: 1rem;
}

/* 主内容 */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    height: calc(100vh - 70px);
}

.dashboard-header {
    margin-bottom: 2rem;
    text-align: center;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f1f5f9, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #94a3b8;
}

/* 功能区域 */
.features-section {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.features-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: #1e88e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 1.5rem;
    color: #1e88e5;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.feature-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

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

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.75rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(15, 23, 42, 0.6);
    color: #f1f5f9;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.btn-primary:disabled {
    background: #475569;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 间距 */
.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

/* 密钥管理样式 */
.key-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.key-input {
    flex-grow: 1;
}

.key-action-btn {
    white-space: nowrap;
    padding: 0.75rem 1rem;
}

.btn-outline {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn-outline:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.key-actions {
    margin-top: 1.5rem;
}

/* 美化提示框样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #1e88e5;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left-color: #4caf50;
}

.toast-error {
    border-left-color: #f44336;
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.toast-error .toast-icon {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.toast-content {
    flex-grow: 1;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    color: #f1f5f9;
}

.table th {
    background: rgba(15, 23, 42, 0.8);
    font-weight: 600;
    color: #38bdf8;
}

.table tr:hover {
    background: rgba(56, 189, 248, 0.05);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-item {
    list-style: none;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(30, 41, 59, 0.8);
}

.page-link:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: #38bdf8;
    color: #38bdf8;
}

.page-link.active {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border-color: #38bdf8;
    color: white;
}

/* 美化对话框样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dialog {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    margin: auto;
}

/* 确保对话框在小屏幕上也能正确居中 */
@media (max-height: 600px) {
    .dialog {
        max-height: 85vh;
    }
}

/* 新的模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid #38bdf8;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #38bdf8;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-size: 18px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
    background: rgba(30, 41, 59, 0.9);
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    color: #f8fafc;
    font-weight: 500;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 0 0 12px 12px;
}

.modal-footer .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
    border: none;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.modal-footer .btn-outline {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.5);
}

.modal-footer .btn-outline:hover {
    background: rgba(100, 116, 139, 0.3);
    color: #cbd5e1;
}

.dialog-overlay.show {
    opacity: 1;
    visibility: visible;
}

.dialog {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.dialog-overlay.show .dialog {
    transform: translateY(0);
}

.dialog-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.dialog-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #38bdf8;
    margin: 0;
}

.dialog-content {
    padding: 2rem;
    color: #94a3b8;
    line-height: 1.5;
}

.dialog-footer {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.8);
}

.dialog-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.dialog-btn.cancel {
    background: rgba(100, 116, 139, 0.3);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.5);
}

.dialog-btn.cancel:hover {
    background: rgba(100, 116, 139, 0.5);
}

.dialog-btn.confirm {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
}

.dialog-btn.confirm:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

/* 我的交互页面样式 */
.section-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f1f5f9, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-header p {
    font-size: 1rem;
    color: #94a3b8;
}

.tabs-container {
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.8);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.1), transparent);
    transition: left 0.5s ease;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.05);
}

.tab-btn.active {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.tab-content {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* 内容选项卡样式 */
.content-tabs {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.25rem;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.content-tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.content-tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.1), transparent);
    transition: left 0.5s ease;
}

.content-tab-btn:hover::before {
    left: 100%;
}

.content-tab-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.05);
}

.content-tab-btn.active {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.card-header {
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 1);
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #38bdf8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
    gap: 0.75rem;
}

.loading-container i {
    font-size: 1.2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-message {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 6px;
}

.error-message {
    text-align: center;
    padding: 1.5rem;
    color: #ef4444;
    font-size: 0.9rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    margin: 0.75rem 0;
}

.interaction-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.interaction-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.interaction-item.clickable {
    cursor: pointer;
}

.interaction-item.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(30, 41, 59, 0.8);
}

.interaction-item.clickable:hover::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #38bdf8;
}

.interaction-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.interaction-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.85rem;
}

.interaction-course {
    font-weight: 600;
    color: #38bdf8;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.interaction-time {
    color: #94a3b8;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.interaction-user {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.interaction-content {
    color: #f1f5f9;
    line-height: 1.4;
    font-size: 0.85rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    border-left: 2px solid rgba(56, 189, 248, 0.5);
    flex: 1;
}

.interaction-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.25rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

.action-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

.view-btn i {
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 768px) {

    /* 显示菜单按钮 */
    .menu-toggle {
        display: block;
    }

    /* 显示用户菜单按钮 */
    .user-menu-toggle {
        display: block;
    }

    /* 隐藏桌面端元素 */
    .desktop-only {
        display: none !important;
    }

    /* 修改导航栏布局 */
    .navbar {
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
        height: auto;
        min-height: 70px;
    }

    .navbar-left {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex: 1;
    }

    .navbar-brand {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 修改侧边栏为下拉菜单 */
    .sidebar {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: auto;
        max-height: calc(100vh - 70px);
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        border-right: none;
        border-bottom: 1px solid rgba(56, 189, 248, 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        padding: 1rem 0;
        z-index: 9999;
        display: none;
        margin: 0;
    }

    /* 侧边栏打开状态 */
    .sidebar.open {
        display: block;
    }

    /* 恢复侧边栏菜单样式 */
    .sidebar-menu {
        display: block;
        overflow-x: visible;
    }

    .sidebar-item {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }

    .sidebar-link {
        white-space: normal;
        border-left: 3px solid transparent;
        border-bottom: none;
    }

    .sidebar-link:hover,
    .sidebar-link.active {
        border-left-color: #38bdf8;
        border-bottom: none;
    }

    /* 修改主容器布局 */
    .main-container {
        flex-direction: column;
    }

    /* 修改主内容区域 */
    .main-content {
        padding: 1rem;
        height: calc(100vh - 70px);
    }

    /* 其他响应式调整 */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    /* 图表部分响应式调整 */
    .features-section .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* 确保图表卡片在手机模式下独占一行 */
    .features-section>div:not(.grid) {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* 调整图表高度 */
    #bytesChart,
    #costChart {
        height: 300px !important;
    }

    /* 时间范围选择器响应式调整 */
    .form-group>div {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }

    .form-group>div>div {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: stretch !important;
    }

    .form-group input[type="date"] {
        width: 100% !important;
        margin: 0 !important;
    }

    .form-group>div>button {
        width: 100% !important;
        margin: 0 !important;
    }

    /* AI交互明细表格响应式调整 */
    .features-section .table-responsive {
        overflow-x: auto;
    }

    .features-section table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .features-section table tbody {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .features-section table tr {
        display: flex;
        flex-direction: column;
        background: rgba(30, 41, 59, 0.8);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(56, 189, 248, 0.2);
        border-radius: 8px;
        overflow: hidden;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .features-section table td {
        border: none;
        padding: 0.5rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    }

    .features-section table td:last-child {
        border-bottom: none;
    }

    .features-section table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #94a3b8;
    }

    /* 隐藏表头 */
    .features-section table thead {
        display: none;
    }

    .dialog {
        width: 95%;
        margin: 1rem;
    }
}