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

html {
    /* 设置纯黑色背景 */
    background-color: #000000;
    background: #000000;
    min-height: 100vh;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    min-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;
    color: #e2e8f0;
}

/* 当弹窗打开时禁止背景滚动 */
body.dialog-open {
    overflow: hidden;
    /* 移除 position: fixed 避免影响日历布局 */
}

/* 确保日历组件不受dialog样式影响 */
.calendar-container,
.status-grid,
.heatmap-grid,
.month-year-section,
.month-row {
    position: static !important;
    transform: none !important;
    z-index: auto !important;
}

/* 修复日历显示问题 */
.heatmap-day,
.heatmap-day.no-data,
.heatmap-legend-square {
    display: block !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* 修复月视图日期显示 */
.month-row .status-day {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
}

/* 修复月视图可见性问题，但保留原有布局 */
.status-grid.month-view,
.month-year-section,
.month-row,
.month-calendar {
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

/* 确保Grid布局不被破坏 */
.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    grid-template-rows: repeat(6, 20px) !important;
    gap: 0 !important;
}

.week-header {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
}

/* 修复月视图日期数字大小 */
.calendar-day {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.55em !important;
    height: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-weight: 500 !important;
    min-width: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

.week-day {
    font-size: 0.55em !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 10px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    min-height: calc(100vh - 200px);
}

/* 页面说明header */
.page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px 40px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
}

.page-icon {
    flex-shrink: 0;
}

.page-info {
    flex: 1;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.page-description {
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0;
    font-weight: 400;
}

/* 状态总结分析网格布局 */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.summary-item {
    text-align: center;
    padding: 16px 8px;
}

.summary-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.3;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
    /* 渐变文字效果，提升视觉效果 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* 降级方案：如果渐变不支持，显示普通颜色 */
    color: #667eea;
}

/* 针对不支持背景裁剪的浏览器 */
@supports not (-webkit-background-clip: text) {
    .summary-value {
        background: none !important;
        -webkit-text-fill-color: initial !important;
        color: #667eea !important;
    }
}

.summary-unit {
    font-size: 11px;
    color: #64748b;
    font-weight: 400;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .page-header {
        padding: 24px 20px 16px;
        gap: 16px;
    }
    
    .page-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-description {
        font-size: 14px;
    }
    
    /* 移动端状态总结网格调整 */
    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .summary-item {
        padding: 12px 6px;
    }
    
    .summary-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .summary-item {
        padding: 10px 4px;
    }
    
    .summary-value {
        font-size: 18px;
    }
    
    .summary-label {
        font-size: 11px;
    }
}

/* GitHub风格顶部导航按钮 */
.github-header {
    position: relative;
    padding: 16px 24px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 998;
    pointer-events: none;
    height: 72px;
    box-sizing: border-box;
}

/* 让按钮可以点击 */
.header-left,
.header-right {
    pointer-events: auto;
}

/* 移除body的padding */
body {
    padding-top: 0;
}

/* 左侧按钮组 */
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

/* 右侧按钮组 */
.header-right {
    display: flex;
    align-items: center;
    position: relative;
}

/* 左侧菜单按钮 */
.menu-button {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.menu-button:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 3px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 汉堡包菜单样式 */
.hamburger {
    width: 16px;
    height: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* GoMars logo */
.gomars-logo {
    color: #475569;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 10px;
    transition: all 0.2s;
    background: transparent;
    min-width: 40px;
    min-height: 40px;
}

.gomars-logo:hover {
    color: #475569;
    text-decoration: none;
    transform: translateY(-1px);
}

/* GoMars 文字 */
.gomars-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    line-height: 40px;
    height: 40px;
    display: flex;
    align-items: center;
}

.app-icon {
    border-radius: 6px;
}

/* 右侧头像按钮 */
.avatar-button {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    min-width: 48px;
    min-height: 48px;
}

.avatar-button:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 3px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(15px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #e2e8f0;
    transition: all 0.2s;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chevron-down {
    color: #666;
    transition: transform 0.2s;
}

.avatar-button.active .chevron-down {
    transform: rotate(180deg);
}

/* 侧边栏抽屉样式 */
.dropdown-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 300px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    overflow-y: auto;
    box-shadow: 
        2px 0 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.show {
    transform: translateX(0);
}

/* 右侧侧边栏 */
.dropdown-menu-right {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.5);
}

.dropdown-menu-right.show {
    transform: translateX(0);
}

/* 左侧菜单 */
#leftDropdown {
    left: 0;
}

/* 遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
}

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

/* 侧边栏头部 */
.dropdown-header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #f1f5f9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    /* 精确对齐：导航栏72px + 页面头部(32px+24px) + border 1px = 129px */
    height: 129px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
}

.dropdown-header span {
    font-size: 16px;
}

/* 侧边栏内容区域 */
.sidebar-content {
    padding: 16px 0;
}

/* 侧边栏分组标题 */
.sidebar-section-title {
    padding: 8px 16px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.sidebar-section-title:first-child {
    margin-top: 0;
}

/* 用户信息大头像 */
.user-info-large {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.user-email {
    font-size: 12px;
    color: #cbd5e1;
}

/* 分隔线 */
.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

/* 侧边栏菜单项 */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #f1f5f9;
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 400;
    border-left: 2px solid transparent;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.2);
    text-decoration: none;
    color: #ffffff;
}

.dropdown-item.active {
    background: rgba(102, 126, 234, 0.25);
    border-left-color: #667eea;
    color: #ffffff;
}

.dropdown-item.text-red {
    color: #f85149;
}

.dropdown-item.text-red:hover {
    background: rgba(248, 81, 73, 0.15);
    color: #ff7b72;
}

.item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #cbd5e1;
}

.dropdown-item:hover .item-icon {
    color: #ffffff;
}

.dropdown-item.active .item-icon {
    color: #ffffff;
}

.dropdown-item.text-red .item-icon {
    color: #f85149;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 8px 12px;
        min-height: 56px;
    }
    
    .header-title h1 {
        font-size: 18px;
    }
    
    .header-title p {
        display: none;
    }
    
    /* 移动端侧边栏全屏宽度 */
    .dropdown-menu {
        width: 280px;
    }
    
    .dropdown-menu-right {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .dropdown-menu,
    .dropdown-menu-right {
        width: 100vw;
    }
}

.content {
    padding: 20px;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.error {
    text-align: center;
    padding: 30px;
    color: #e74c3c;
    background: #fdf2f2;
    border-radius: 10px;
    margin: 15px 0;
}



.summary-unit {
    font-size: 0.7em;
    color: #888;
}

.trend-up {
    color: #22c55e !important;
    background: none !important;
    -webkit-text-fill-color: #22c55e !important;
}

.trend-down {
    color: #ef4444 !important;
    background: none !important;
    -webkit-text-fill-color: #ef4444 !important;
}

.trend-stable {
    color: #f59e0b !important;
    background: none !important;
    -webkit-text-fill-color: #f59e0b !important;
}