/* ===== 全局重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: #f5f5f0; /* 米白纸张底色，模拟手绘纸面 */
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 顶部导航栏（手绘框风格）===== */
.top-bar {
  background: #fff;
  border: 2px solid #333;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.top-left .brand {
  font-weight: bold;
  font-size: 20px;
}

.top-left .divider {
  margin: 0 6px;
  color: #999;
}

.top-left .studio-name {
  font-size: 18px;
  font-style: italic;
}

.top-left .studio-name sup {
  font-size: 9px;
  vertical-align: super;
}

.top-left .panel-tag {
  margin-left: 10px;
  font-size: 16px;
}

/* ===== 怀旧版徽章（贴纸风）===== */
.retro-badge {
  display: inline-block;
  margin-left: 12px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: bold;
  color: #333;
  background: #fff3c4;
  border: 2px solid #333;
  border-radius: 3px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
  letter-spacing: 1px;
  cursor: default;
}

.retro-badge:hover {
  transform: rotate(0deg) scale(1.05);
  background: #ffe9a8;
}

.top-right {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: #555;
}

/* ===== 两列布局 ===== */
.body-wrapper {
  display: flex;
  flex-direction: row;
  flex: 1;
}

/* ===== 左侧边栏菜单 ===== */
.sidebar {
  flex-shrink: 0;
  width: 160px;
  padding: 15px 8px;
  background: #fff9e6;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: block;
  text-align: center;
  padding: 13px 6px;
  border: 2.5px solid #333;
  background: #fff;
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-weight: bold;
  transition: all 0.2s;
  border-radius: 4px;
  box-shadow: 3px 3px 8px rgba(0,0,0,0.1);
  white-space: nowrap;
}

.nav-item:nth-child(odd) { transform: rotate(-0.5deg); }
.nav-item:nth-child(even) { transform: rotate(0.5deg); }

.nav-item:hover {
  background: linear-gradient(135deg, #d4ebff 0%, #b8daff 100%);
  transform: scale(1.05) translateY(-2px) !important;
  box-shadow: 5px 6px 15px rgba(0,0,0,0.18);
  border-color: #0066cc;
  color: #003366;
}

.nav-item.active {
  background: linear-gradient(135deg, #c0e0ff 0%, #90caff 100%);
  border-color: #0055aa;
  box-shadow: 4px 4px 12px rgba(0,80,200,0.25);
  transform: scale(1.02) !important;
}

/* ===== 主内容区域 ===== */
.main-content {
  flex: 1;
  padding: 15px 30px 60px 30px;
  min-height: 0;
}

.page-view {
  animation: fadeIn 0.3s ease;
}

.page-view.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 页面标题 ===== */
.page-title {
  font-size: 28px;
  margin-bottom: 25px;
  border-bottom: 2px dashed #bbb;
  padding-bottom: 10px;
  display: inline-block;
}

/* ===== 主公司页面 - 部门卡片 ===== */
.dept-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.dept-card {
  border: 2.5px solid #333;
  border-radius: 6px;
  padding: 30px 20px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 3px 4px 10px rgba(0,0,0,0.1);
}

.dept-card:nth-child(odd) { transform: rotate(-0.3deg); }
.dept-card:nth-child(even) { transform: rotate(0.3deg); }

.dept-card:hover {
  background: linear-gradient(135deg, #d4ebff 0%, #b8daff 100%);
  transform: scale(1.04) !important;
  box-shadow: 5px 7px 15px rgba(0,0,0,0.18);
  border-color: #0066cc;
}

.dept-name {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.dept-desc {
  font-size: 16px;
  color: #555;
  font-weight: 500;
}

/* ===== 业务办理 - 服务卡片网格 ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.service-card {
  border: 2px solid #333;
  background: #fff;
  padding: 22px 18px;
  text-align: center;
  border-radius: 3px;
  transition: all 0.2s;
}

.service-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 4px 4px 12px rgba(0,0,0,0.1);
}

.service-card .icon {
  font-size: 38px;
  margin-bottom: 12px;
}

.service-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* ===== 作品展示网格 ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.portfolio-card {
  border: 2px solid #333;
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
  transition: transform 0.2s;
}

.portfolio-card:hover {
  transform: translateY(-3px) rotate(0.3deg);
  box-shadow: 4px 4px 12px rgba(0,0,0,0.08);
}

.portfolio-card .card-body {
  padding: 18px;
}

.portfolio-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.portfolio-card .category {
  font-size: 12px;
  color: #0066cc;
  margin-bottom: 8px;
  font-weight: bold;
}

.portfolio-card p {
  font-size: 14px;
  color: #666;
}

/* ===== 关于我们 ===== */
.about-content {
  max-width: 700px;
  line-height: 1.9;
  font-size: 16px;
  color: #444;
}

.about-content p {
  margin-bottom: 15px;
}

/* ===== 关注我们 / 社交链接 ===== */
.social-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.social-card {
  border: 2px solid #333;
  background: #fff;
  padding: 24px 18px;
  border-radius: 3px;
  text-align: center;
}

.social-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.social-card p {
  font-size: 15px;
  color: #555;
  word-break: break-all;
}

/* ===== 内容通用块 ===== */
.content-block {
  max-width: 700px;
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  border-left: 3px solid #888;
  padding-left: 20px;
}

/* ===== 协议/版权内容 ===== */
.agreement-content p,
.piracy-content p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px dashed #ccc;
  border-radius: 4px;
  background: #fafafa;
}

.piracy-content {
  max-width: 600px;
}

/* ===== 底部版权 ===== */
.footer {
  text-align: center;
  padding: 18px 0;
  border-top: 2px dashed #bbb;
  margin-top: auto;
  font-size: 14px;
  color: #777;
  margin-left: 180px;
}

.device-note {
  font-size: 11px;
  color: #aaa;
  margin-top: 6px;
  font-family: monospace;
}

/* ===== 响应式（不改变左侧边栏布局） ===== */
@media (max-width: 768px) {
  /* 侧边栏始终保持左竖排，不做响应式变化 */
  .sidebar {
    left: 2px;
    width: 130px;
  }

  .nav-item {
    font-size: 13px;
    padding: 10px 6px;
  }

  .main-content {
    margin-left: 145px;
    padding: 10px 10px 40px 10px;
  }

  .footer {
    margin-left: 145px;
  }

  .top-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .top-right {
    flex-direction: column;
    gap: 5px;
  }

  .hunter-star {
    width: 240px;
    height: 240px;
  }
}
