/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
}

/* 顶部导航栏 */
.header {
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.logo::before {
    content: "北";
}

.system-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.current-time {
    font-size: 16px;
    font-weight: 500;
    color: #34495e;
    background: rgba(52, 152, 219, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3498db;
    font-size: 14px;
}

.alarm-bell {
    position: relative;
    cursor: pointer;
    color: #e74c3c;
    font-size: 18px;
    transition: all 0.3s ease;
}

.alarm-bell:hover {
    transform: scale(1.1);
}

.alarm-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.fullscreen-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #2c3e50;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.user-menu:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.user-avatar::before {
    content: "管";
}

.username {
    font-size: 14px;
    color: #2c3e50;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-menu:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.dropdown-menu a:hover {
    background: rgba(52, 152, 219, 0.1);
}

/* 主容器 */
.main-container {
    display: flex;
    height: calc(100vh - 60px);
}

/* 左侧导航栏 */
.sidebar {
    width: 240px;
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    transition: width 0.3s ease;
    overflow: hidden;
    position: relative;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-toggle {
    padding: 15px;
    text-align: center;
    color: #ecf0f1;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(52, 152, 219, 0.2);
    color: #ecf0f1;
}

.nav-item.active {
    background: linear-gradient(90deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 16px;
}

.nav-text {
    font-size: 14px;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
}

.submenu {
    list-style: none;
    background: rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.has-submenu.active .submenu {
    max-height: 200px;
}

.submenu li {
    padding: 10px 20px 10px 52px;
    color: #95a5a6;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.submenu li:hover {
    background: rgba(52, 152, 219, 0.2);
    color: #ecf0f1;
}

/* 主内容区域 */
.content-area {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#contentFrame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 0 10px;
    }
    
    .system-title {
        font-size: 14px;
    }
    
    .sidebar {
        width: 60px;
    }
    
    .sidebar .nav-text {
        opacity: 0;
    }
    
    .main-container {
        margin: 5px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 16px;
    color: #7f8c8d;
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ecf0f1;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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