/* 全局主题变量 */
:root {
    --bg-dark: #0b0e14;
    --bg-panel: #151822;
    --bg-hover: #1e2233;
    --border-color: #2a2e3d;

    --gold-primary: #f5d491;
    --gold-light: #fef0c7;
    --gold-dark: #cc9b3d;

    --text-main: #e2e8f0;
    --text-muted: #8b949e;

    --up-color: #f6465d;
    --down-color: #2ebd85;

    --vip-gradient: linear-gradient(135deg, #f5d491 0%, #cc9b3d 100%);

    --sidebar-width: 240px;
    --header-height: 60px;

    /* 额外强调色（策略页等使用） */
    --accent-blue: #3b82f6;
    --accent-green: #2ebd85;
    --accent-red: #f6465d;
}

/* 基础排版 */
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 隐藏滚动条但可滚动 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 左侧 SaaS 导航（通用 sidebar） */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 1000;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    box-sizing: border-box;
}

.sidebar .logo-area {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 20px;
    font-weight: bold;
    color: var(--gold-primary);
    text-decoration: none;
    box-sizing: border-box;
    flex-shrink: 0;
}

.sidebar .logo-area i {
    margin-right: 10px;
    font-size: 24px;
}

.sidebar .nav-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar .nav-group {
    margin-bottom: 25px;
}

.sidebar .nav-group-title {
    padding: 0 20px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    font-size: 14px;
    box-sizing: border-box;
    white-space: nowrap;
}

.sidebar .nav-item i.main-icon {
    width: 20px;
    text-align: center;
    margin-right: 12px;
    font-size: 16px;
    color: var(--text-muted);
}

.sidebar .nav-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.sidebar .nav-item:hover i.main-icon {
    color: var(--gold-primary);
}

.sidebar .nav-item.active {
    background: linear-gradient(90deg, rgba(245, 212, 145, 0.1) 0%, transparent 100%);
    color: var(--gold-primary);
    border-left: 3px solid var(--gold-primary);
}

.sidebar .nav-item.active i.main-icon {
    color: var(--gold-primary);
}

.sidebar .nav-tag {
    margin-left: auto;
    background: var(--vip-gradient);
    color: #000;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.sidebar .user-profile {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background 0.3s;
}

.sidebar .user-profile:hover {
    background: rgba(255, 255, 255, 0.02);
}

.sidebar .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2a2e3d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    overflow: hidden;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.sidebar .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar .user-info {
    flex: 1;
    overflow: hidden;
}

.sidebar .user-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.sidebar .user-status {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar .login-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.sidebar .btn-login {
    background: var(--gold-primary);
    color: #000;
    border: none;
    padding: 5px 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.sidebar .btn-login:hover {
    background: #fff;
    box-shadow: 0 0 8px rgba(245, 212, 145, 0.4);
}

.sidebar .btn-register {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 4px 0;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.sidebar .btn-register:hover {
    border-color: var(--text-muted);
    color: #fff;
}

.period-tag {
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: normal;
}

.tag-ultra-short {
    background: rgba(246, 70, 93, 0.15);
    color: #f6465d;
    border: 1px solid rgba(246, 70, 93, 0.3);
}

.tag-short {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-swing {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.tag-long {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* 主内容区与顶部通栏（默认布局） */
.main-content {
    margin-left: var(--sidebar-width, 240px);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at top right, #1a1e2d 0%, var(--bg-dark) 60%);
}

.top-header {
    height: var(--header-height);
    background-color: rgba(21, 24, 34, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 90;
}

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* 分页 */
.pagination-wrap {
    margin-top: 20px;
    margin-bottom: 20px;
    /* border-top: 1px solid var(--border-color); */
    display: flex;
    justify-content: flex-end;
}
.pagination-wrap .pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}
.pagination-wrap .pagination li {
    margin: 0;
}
.pagination-wrap .pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s;
}
.pagination-wrap .pagination li a:hover {
    background: var(--bg-panel);
    border-color: var(--gold-dark);
    color: var(--gold-primary);
}
.pagination-wrap .pagination li.active a,
.pagination-wrap .pagination li.current a {
    background: var(--vip-gradient);
    border-color: var(--gold-primary);
    color: #000;
    font-weight: bold;
}
.pagination-wrap .pagination li.disabled a {
    opacity: 0.5;
    cursor: not-allowed;
}
.pagination-wrap .pagination li.disabled a:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
    color: var(--text-main);
}


/* 面包屑 */
.page-breadcrumbs {
    font-size: 14px;
    color: var(--text-muted);
}

 .page-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

 .page-breadcrumbs a:hover {
    color: var(--gold-primary);
}

 .page-breadcrumbs span {
    color: #fff;
    margin: 0 5px;
}