/* ========== 全局重置与字体 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #0b1022, #121a33);
    color: #e0e0ff;
    overflow-x: hidden;
    padding: 10px;
    min-height: 100vh;
}

/* ========== 头部 ========== */
.dashboard-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 16px 24px;
    background: rgba(26, 31, 60, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(42, 50, 80, 0.6);
    flex-direction: row;
	position: relative;
	    z-index: 999;
}

.header-left h1 {
    font-size: 28px;
    background: linear-gradient(90deg, #4d8af0, #20c6b7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 6px;
    font-weight: 700;
}

.header-left p {
    color: #a0a7d0;
    font-size: 14px;
    opacity: 0.9;
}

.time-display {
    font-size: 18px;
    background: rgba(26, 31, 60, 0.8);
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid rgba(77, 138, 240, 0.3);
    font-weight: 600;
    color: #4d8af0;
    box-shadow: 0 2px 6px rgba(77, 138, 240, 0.15);
    position: absolute;
    right: 60px;align-items: center;
}
.time-display i{margin-right: 8px;}
.toggleFullscreen{
	position: absolute;
	right: 10px;
}

.toggleFullscreen {
  background: none;
  border: 1px solid #ddd;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555;
  transition: all 0.2s ease;
  outline: none;
}

.toggleFullscreen:hover {
  background: #f0f5ff;
  border-color: #3b5998;
  color: #3b5998;
}
/* ========== 导航菜单 ========== */
.main-nav {
    display: flex;
    align-items: center;
    margin-left: 25px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 12px;
    border-radius: 6px;
}

.main-nav a:hover,
.main-nav a.active {
    color: #4d8af0;
    background: rgba(77, 138, 240, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.nav-toggle span {
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

/* ========== 卡片通用样式 ========== */
.card {
    background: linear-gradient(145deg, #1a1f3c, #161b30);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a3250;
    position: relative;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(77, 138, 240, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4d8af0, #20c6b7);
    border-radius: 16px 16px 0 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(42, 50, 80, 0.5);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #e0e0ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: #4d8af0;
    font-size: 18px;
}

.card-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* ========== 统计卡片 ========== */
.stat-card {
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 12px;
    min-width: 180px;
    flex-shrink: 0;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(90deg, #4d8af0, #20c6b7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.stat-label {
    color: #a0a7d0;
    font-size: 16px;
    font-weight: 500;
}

/* ========== 价格变化样式 ========== */
.price-up {
    color: #e74c3c !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-down {
    color: #27ae60 !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 表格样式 ========== */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
}

.modern-table th,
.modern-table td {
    padding: 12px 10px;
    text-align: center;
}

.modern-table th {
    background: rgba(26, 31, 60, 0.7);
    color: #d0d4ff;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #3a4265;
}

.modern-table td {
    font-size: 13px;
    color: #e0e0ff;
    border-bottom: none;
    transition: background-color 0.2s;
}

.modern-table tbody tr:hover {
    background-color: rgba(77, 138, 240, 0.12);
}

/* ========== 滚动容器 ========== */
.stat-cards-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 20px;
}

.stat-cards-scroll-container::-webkit-scrollbar {
    display: none;
}

.stat-cards-wrapper {
    display: inline-flex;
    gap: 20px;
    padding: 0 10px;
    user-select: none;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .dashboard-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .time-display {
        width: 100%;
        justify-content: center;
        display: flex;
        position: initial;
    }

    body {
        min-height: 100% !important;
        overflow: auto;
    }
	.toggleFullscreen{display: none;}
}

@media (max-width: 768px) {
	.card {z-index: 0;}
	.price-up{font-size: 12px;}
	.header-left h1{font-size: 18px;}
    .main-nav {
        position: absolute;
        width: 100%;
        justify-content: flex-end;
		top:15px;
		right: 15px;
    }

    .main-nav ul {
        position: absolute;
        top: 100%;
        right: 0;
        background: #1e253a;
        flex-direction: column;
        width: 200px;
        padding: 12px 0;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .main-nav.nav-open ul {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav ul li {
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }

    .nav-toggle {
        display: flex;
    }

    /* 汉堡按钮动画 */
    .main-nav.nav-open .nav-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .main-nav.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .main-nav.nav-open .nav-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}