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

html, body {
  height: 100%;
  font-size: 15px;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  background-color: #eee;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 页眉 */
.header {
  height: 60px;
  line-height: 60px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.logo {
  margin-left: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
}

.nav {
  position: absolute;
  top: 0;
  right: 0;
}

.nav .item {
  float: left;
  display: block;
  margin-right: 1rem;
  text-decoration: none;
  color: #333;
  transition: color 0.3s;
}

.nav .item:hover {
  color: #3498db;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  position: absolute;
  top: 20px;
  left: 15px;
  width: 30px;
  height: 20px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
}

.mobile-menu-btn span {
  display: block;
  height: 2px;
  width: 80%;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s;
}

/* 主体区域 */
.main {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  margin-top: 15px;
  margin-bottom: 15px;
}

/* 侧栏 */
.sidebar {
  width: 180px;
  background-color: #fff;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 10;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar .menus {
  margin: 1rem 0;
}

.sidebar .group {
  position: relative;
}

.sidebar .menu {
  display: block;
  padding-left: 1rem;
  height: 2.5rem;
  line-height: 2.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar .menu:hover {
  background-color: #f9f9f9;
}

.sidebar .menuBtn {
  position: absolute;
  top: 0;
  right: 0.5rem;
  width: 2rem;
  height: 2.5rem;
  line-height: 2.5rem;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
}

.sidebar .sub-menus {
  display: none;
  background-color: #f8f9fa;
}

.sidebar .sub-menus .menu {
  padding-left: 2.5rem;
  font-size: 0.9rem;
}

.sidebar .active {
  background-color: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
}

/* 内容区域 */
.content {
  flex: 1;
  margin-left: 15px;
  padding: 1rem;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.content iframe {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 4px;
}

/* 页脚 */
.footer {
  flex-shrink: 0;
}

.footer .ggbox {
  display: block;
  height: 80px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.footer .copyright {
  height: 20px;
  line-height: 20px;
  margin: 5px;
  font-size: 0.8em;
  text-align: center;
  color: #7f8c8d;
}

/* 移动端遮罩层 */
.mask {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 5;
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .main {
    flex-direction: column;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  
  .sidebar {
    position: fixed;
    top: 60px;
    left: -200px;
    width: 200px;
    height: calc(100% - 60px);
    margin-left: 0;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }
  
  .sidebar.active {
    left: 0;
    top: 0;
    height: 100%;
  }
  
  .content {
    margin-left: 0;
    margin-top: 0;
    padding: 0.5rem;
  }
  
  .nav {
    display: none;
  }
  
  .footer {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
    text-align: center;
    margin-left: 0;
  }
  
  .footer .ggbox {
    height: 60px;
  }
}