/* 东川市银信高级附属医院官网 - 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0d5c75;
  --primary-light: #14919b;
  --accent: #c73e1d;
  --text: #2b2b2b;
  --text-light: #6b7280;
  --bg: #fafafa;
  --white: #ffffff;
  --border: #e5e7eb;
  --dark-bg: #1a1a2e;
  --horror-red: #8b0000;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 恐怖氛围 - 页面闪烁效果 */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.97; }
  52% { opacity: 0.8; }
  54% { opacity: 0.97; }
}

body.horror-mode {
  animation: flicker 8s infinite;
}

/* 顶部导航 */
.navbar {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
  transition: all 0.3s;
}

.logo:hover .logo-icon {
  box-shadow: 0 0 20px var(--primary-light);
}

.logo.clicked-1 .logo-icon { background: #1a5276; }
.logo.clicked-2 .logo-icon { background: #154360; }
.logo.clicked-3 .logo-icon { background: #0e3654; }
.logo.clicked-4 .logo-icon { background: #0b2a44; }
.logo.clicked-5 .logo-icon { background: #081e33; }
.logo.clicked-6 .logo-icon { background: #051222; }
.logo.clicked-7 .logo-icon { background: #000; box-shadow: 0 0 30px var(--horror-red); }

.logo-text h1 {
  font-size: 18px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-text p {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 3px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
}

/* 汉堡按钮：PC端隐藏，JS自动注入 */
.hamburger { display: none; }

.nav-menu a {
  text-decoration: none;
  color: var(--text);
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.3s;
  display: block;
  position: relative;
}

.nav-menu a:hover, .nav-menu a.active {
  background: var(--primary);
  color: white;
}

/* ===== 旧楼专区导航：默认隐藏，解锁后才显示 ===== */
/* 由 JS 直接操作 <li> 的 style.display 控制显示，保证兼容性 */
.nav-menu a.unlocked-show {
  color: var(--text) !important;
}

.nav-menu a.locked {
  color: #ccc;
  cursor: not-allowed;
}

.nav-menu a.locked:hover {
  background: transparent;
  color: #ccc;
}

.nav-menu a.locked::after {
  content: "🔒";
  font-size: 10px;
  margin-left: 4px;
}

/* 主容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  flex: 1;
  width: 100%;
}

/* 轮播图 */
.carousel {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  margin-bottom: 40px;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  user-select: none;
  -webkit-user-select: none;
}

.slide-1 { background: linear-gradient(135deg, #0d5c75 0%, #14919b 100%); }
.slide-2 { background: linear-gradient(135deg, #14919b 0%, #38b6a7 100%); }
.slide-3 { background: linear-gradient(135deg, #38b6a7 0%, #6dd3bd 100%); }
.slide-4 { background: linear-gradient(135deg, #0d5c75 0%, #457b9d 100%); }

.slide-content {
  text-align: center;
  padding: 40px;
  max-width: 700px;
}

.slide-content h2 {
  font-size: 36px;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  cursor: pointer;
}

.slide-content p {
  font-size: 18px;
  opacity: 0.95;
  margin-bottom: 24px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--white);
  color: var(--primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-danger {
  background: var(--accent);
  color: white;
}

.btn-ghost {
  background: transparent;
  border: 2px solid var(--white);
  color: white;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active { background: white; transform: scale(1.2); }

/* 公告栏 */
.notice-bar {
  background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
  border-left: 4px solid #ea580c;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.notice-bar .label {
  background: #ea580c;
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.notice-bar a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.notice-bar a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* 医院简介/文字谷容器 */
.intro-section {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 30px;
}

.section-title {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary);
}

.section-subtitle {
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 24px;
}

.intro-text p {
  margin-bottom: 16px;
  font-size: 15px;
  text-indent: 2em;
  color: #444;
  line-height: 1.9;
}

/* 功能快捷入口 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.quick-card {
  background: white;
  padding: 30px 20px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s;
  border: 1px solid transparent;
}

.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(13,92,117,0.12);
  border-color: var(--primary-light);
}

.quick-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.quick-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.quick-card p {
  font-size: 12px;
  color: var(--text-light);
}

/* 科室卡片网格 */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dept-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid var(--border);
}

.dept-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.dept-header {
  padding: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.dept-header h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.dept-header .badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.dept-body {
  padding: 16px 20px;
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  min-height: 90px;
}

.dept-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
}

/* 科室布局图 */
.layout-map {
  width: 100%;
  height: 500px;
  background: #f0f4f8;
  border-radius: 12px;
  position: relative;
  margin: 20px 0;
  overflow: hidden;
}

.map-building {
  position: absolute;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.map-building.old {
  border-color: #999;
  background: #f5f5f5;
  color: #666;
}

.map-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--horror-red);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 0 0 0 var(--horror-red);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(139,0,0,0.7); }
  70% { box-shadow: 0 0 0 14px rgba(139,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(139,0,0,0); }
}

/* 医生/领导介绍 */
.leader-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.leader-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s;
}

.leader-photo {
  height: 220px;
  background: linear-gradient(135deg, #dfe7ed, #c3d1dc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s;
}

.leader-photo .confession {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  font-size: 6px;
  color: white;
  background: transparent;
  opacity: 0.01;
  letter-spacing: 0.5px;
}

.leader-card.zhao:hover .leader-photo {
  background: #3d2b2b;
  color: #2a1515;
}

.leader-card.zhao:hover .leader-photo::after {
  content: "😭";
  position: absolute;
  font-size: 120px;
  opacity: 0.4;
}

.leader-info {
  padding: 16px 20px;
}

.leader-info h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--primary);
}

.leader-info .title {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
}

.leader-info p {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  position: relative;
}

.leader-info p .whisper {
  position: absolute;
  right: 0;
  bottom: -10px;
  font-size: 0.1px;
  color: white;
}

/* 新闻列表 */
.news-list {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.news-item {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: background 0.3s;
  cursor: pointer;
}

.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #f8fafc; }

.news-date {
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
  flex-shrink: 0;
  min-width: 60px;
}

.news-date .day {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.news-date .year-month {
  font-size: 10px;
  opacity: 0.9;
  margin-top: 3px;
}

.news-content {
  flex: 1;
}

.news-content h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
}

.news-content h3.important {
  color: var(--accent);
}

.news-content h3 .sneaky-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.news-content p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
}

.news-content p .hidden-text {
  font-size: 14.5px;
}

/* 新闻详情弹窗 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-box {
  background: white;
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalIn 0.3s;
}

@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
}

.modal-header h2 {
  font-size: 18px;
  color: var(--primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.modal-body {
  padding: 24px;
  line-height: 1.9;
  font-size: 14px;
  color: #444;
}

.modal-body p {
  text-indent: 2em;
  margin-bottom: 14px;
}

.modal-body .meta {
  text-indent: 0;
  color: var(--text-light);
  font-size: 12px;
  text-align: right;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

/* 医生列表表格 */
.doctor-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.doctor-table th {
  background: var(--primary);
  color: white;
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.doctor-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: #444;
}

.doctor-table tr:last-child td { border-bottom: none; }
.doctor-table tr:hover { background: #f8fafc; }

.doctor-table .sneaky-name {
  cursor: pointer;
  color: var(--text);
  transition: color 0.3s;
}

.doctor-table .sneaky-name:hover {
  color: var(--horror-red);
  text-decoration: underline;
}

/* 招聘列表 */
.job-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.job-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
}

.job-card h3 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 10px;
}

.job-card .dept-tag {
  display: inline-block;
  background: #e0f2fe;
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  margin-bottom: 14px;
}

.job-card ul {
  list-style: none;
  margin-bottom: 14px;
}

.job-card ul li {
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
  font-size: 13px;
  color: #555;
}

.job-card ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary-light);
}

.id-card {
  background: #f8fafc;
  border: 1px dashed var(--border);
  padding: 14px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  color: #555;
}

.id-card .id-number {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
}

/* 病理查询系统 */
.query-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  max-width: 500px;
  margin: 0 auto;
}

.query-form .form-group {
  margin-bottom: 20px;
}

.query-form label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 600;
}

.query-form input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
  font-family: inherit;
}

.query-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.query-form .hint {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
}

.query-result {
  margin-top: 20px;
  padding: 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  display: none;
}

.query-result.found {
  background: #f0fdf4;
  border-color: #bbf7d0;
  display: block;
}

.query-result.error {
  display: block;
}

/* 护士站/留言墙 */
.wall-container {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 40px;
  color: #e0e0e0;
  min-height: 600px;
}

.wall-title {
  text-align: center;
  font-size: 28px;
  color: #6b7280;
  margin-bottom: 40px;
  letter-spacing: 8px;
}

.wall-messages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.wall-note {
  background: #2a2a4e;
  padding: 16px;
  border-radius: 6px;
  border-left: 3px solid #4a4a6e;
  font-size: 13px;
  line-height: 1.8;
  transform: rotate(-0.5deg);
  transition: all 0.3s;
}

.wall-note:nth-child(even) { transform: rotate(0.5deg); }
.wall-note:hover { transform: rotate(0) scale(1.02); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }

.wall-note.rain { border-left-color: #7dd3fc; }
.wall-note.red { border-left-color: #f87171; }
.wall-note.green { border-left-color: #4ade80; }
.wall-note.gold { border-left-color: #fbbf24; }
.wall-note.garbled { color: #6b7280; font-family: monospace; font-size: 11px; }

.wall-note .sender {
  font-size: 10px;
  color: #6b7280;
  margin-top: 10px;
  text-align: right;
  font-family: monospace;
}

.wall-note.special {
  background: #2d1a1a;
  border-left-color: var(--horror-red);
}

/* 旧楼登录页面 */
.old-building-wrap {
  background: linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 100%);
  min-height: 80vh;
  border-radius: 12px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.old-building-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
  pointer-events: none;
}

.iron-gate {
  width: 100%;
  max-width: 500px;
  height: 360px;
  background: #111;
  border: 8px solid #2a2a2a;
  border-radius: 8px 8px 0 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.8);
  margin-bottom: 30px;
}

.iron-gate::before, .iron-gate::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 12px;
  background: #2a2a2a;
}
.iron-gate::before { left: 40px; box-shadow: 110px 0 0 #2a2a2a, 220px 0 0 #2a2a2a, 330px 0 0 #2a2a2a, 440px 0 0 #2a2a2a; }
.iron-gate::after { top: 0; left: 0; right: 0; height: 12px; width: auto; bottom: auto; box-shadow: 0 110px 0 #2a2a2a, 0 220px 0 #2a2a2a; }

.gate-warning {
  color: #f87171;
  font-size: 24px;
  letter-spacing: 6px;
  text-shadow: 0 0 10px var(--horror-red);
}

.password-inputs {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  z-index: 10;
}

.pwd-group {
  text-align: center;
}

.pwd-group label {
  display: block;
  color: #9ca3af;
  font-size: 12px;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.pwd-group input {
  width: 140px;
  padding: 14px;
  text-align: center;
  font-size: 22px;
  letter-spacing: 4px;
  background: #111;
  border: 2px solid #374151;
  border-radius: 8px;
  color: var(--primary-light);
  font-family: monospace;
  font-weight: 700;
}

.pwd-group input:focus {
  outline: none;
  border-color: var(--primary-light);
}

.pwd-group input.digit3 { width: 120px; }
.pwd-group input.digit4 { width: 150px; }

/* 旧楼漫游 */
.roam-container {
  width: 100%;
  min-height: 600px;
  height: auto;
  background: #0a0a0a;
  border-radius: 12px;
  position: relative;
  overflow: visible;
}

.room-scene {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #ccc;
  padding: 48px 32px 56px;
  text-align: center;
  box-sizing: border-box;
  position: relative;
}

.room-scene.active { display: flex; }

.scene-hallway { background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%); }
.scene-308 { background: linear-gradient(180deg, #2a1a1a 0%, #1a0d0d 100%); }
.scene-elevator { background: linear-gradient(180deg, #1a1a2a 0%, #0d0d1a 100%); }
.scene-lab { background: linear-gradient(180deg, #0a2a2a 0%, #051515 100%); }

.room-title {
  font-size: 28px;
  color: #888;
  letter-spacing: 8px;
  margin-bottom: 24px;
  padding-top: 4px;
  word-break: break-all;
}

.room-desc {
  max-width: 760px;
  line-height: 2;
  font-size: 15px;
  color: #aaa;
  margin-bottom: 28px;
}

.roam-nav {
  display: flex;
  gap: 12px 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.roam-item {
  min-height: 44px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid #333;
  border-radius: 8px;
  color: #ccc;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.roam-item:hover {
  background: rgba(200,62,29,0.2);
  border-color: var(--accent);
  color: white;
}

.roam-item.clue {
  border-color: #4ade80;
  color: #4ade80;
}

.roam-item.clue.found {
  opacity: 0.5;
  pointer-events: none;
}

.phone-screen {
  background: #1a1a1a;
  padding: 20px 22px;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  border: 2px solid #333;
  font-family: monospace;
  text-align: left;
  margin: 0 auto 28px;
  box-sizing: border-box;
}

.phone-screen .msg-header {
  color: #f87171;
  margin-bottom: 12px;
  border-bottom: 1px dashed #333;
  padding-bottom: 8px;
}

.elevator-panel {
  background: #0a0a0a;
  padding: 30px 40px;
  border-radius: 12px;
  border: 2px solid #222;
  margin-bottom: 20px;
}

.elevator-panel h4 {
  color: #999;
  margin-bottom: 16px;
  letter-spacing: 3px;
}

.elevator-panel input {
  padding: 12px 20px;
  font-size: 18px;
  letter-spacing: 4px;
  text-align: center;
  background: #111;
  border: 2px solid #333;
  border-radius: 6px;
  color: #7dd3fc;
  font-family: monospace;
}

/* 结局页面 */
.ending-container {
  background: #0a0a0f;
  min-height: 80vh;
  border-radius: 12px;
  padding: 40px;
  color: #e0e0e0;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.evidence-card {
  background: #1a1a2e;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--horror-red);
}

.evidence-card h4 {
  color: #f87171;
  margin-bottom: 10px;
  font-size: 14px;
}

.evidence-card p, .evidence-card ul {
  font-size: 13px;
  line-height: 1.8;
  color: #bbb;
  list-style: none;
}

.evidence-card ul li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.evidence-card ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--horror-red);
}

.choice-area {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px dashed #333;
}

.choice-area h3 {
  color: #aaa;
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 4px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.choice-btn {
  padding: 24px;
  background: #1a1a2e;
  border: 2px solid #333;
  border-radius: 12px;
  color: #ccc;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
  font-size: 14px;
  line-height: 1.7;
  font-family: inherit;
}

.choice-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.choice-btn.good:hover { border-color: #4ade80; background: #0f1a0f; }
.choice-btn.evil:hover { border-color: #f87171; background: #1a0f0f; }
.choice-btn.hidden-ending { display: none; }
.choice-btn.hidden-ending.show { display: block; border-color: #a78bfa; }
.choice-btn.hidden-ending.show:hover { background: #130f1a; }

.choice-btn strong {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-size: 15px;
}

/* 结局结果 */
.ending-result {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 20px;
}

.ending-result h1 {
  font-size: 40px;
  margin-bottom: 30px;
  letter-spacing: 6px;
}

.ending-result.good h1 { color: #4ade80; }
.ending-result.evil h1 { color: #f87171; }
.ending-result.true h1 { color: #a78bfa; }

.ending-result .epilogue {
  font-size: 16px;
  line-height: 2.2;
  color: #bbb;
  text-align: left;
  text-indent: 2em;
  margin-bottom: 40px;
}

.ending-result .epilogue p {
  margin-bottom: 16px;
}

/* 意识独白弹窗 */
.voice-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 40px;
}

.voice-overlay.active { display: flex; }

.voice-box {
  max-width: 600px;
  background: #0a0a0f;
  border: 1px solid var(--horror-red);
  border-radius: 12px;
  padding: 40px;
  animation: voiceIn 1s;
  box-shadow: 0 0 60px rgba(139,0,0,0.3);
}

@keyframes voiceIn {
  from { opacity: 0; filter: blur(10px); }
  to { opacity: 1; filter: blur(0); }
}

.voice-label {
  color: var(--horror-red);
  font-size: 12px;
  letter-spacing: 4px;
  margin-bottom: 16px;
  font-family: monospace;
}

.voice-text {
  color: #e5e7eb;
  font-size: 16px;
  line-height: 2;
  margin-bottom: 20px;
  font-style: italic;
}

.voice-continue {
  text-align: right;
  color: #666;
  font-size: 12px;
  letter-spacing: 2px;
  cursor: pointer;
}

.voice-continue:hover { color: #aaa; }

/* 周慧芳个人页面 */
.zhou-page {
  max-width: 900px;
  margin: 0 auto;
  background: #fffaf5;
  border-radius: 12px;
  padding: 40px;
  border: 1px solid #fde68a;
}

.zhou-header {
  text-align: center;
  padding-bottom: 30px;
  border-bottom: 2px dashed #fde68a;
  margin-bottom: 30px;
}

.zhou-portrait {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde68a, #fcd34d);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  border: 6px solid white;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.zhou-header h2 {
  color: #92400e;
  margin-bottom: 6px;
}

.zhou-header .years {
  color: #a16207;
  font-size: 14px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.album-photo {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 8px;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  transform: rotate(-2deg);
  position: relative;
}

.album-photo:nth-child(even) { transform: rotate(2deg); }
.album-photo span {
  position: absolute;
  bottom: -20px;
  font-size: 11px;
  color: #a16207;
  white-space: nowrap;
}

.zhou-diary p {
  text-indent: 2em;
  line-height: 2;
  color: #78350f;
  margin-bottom: 14px;
  font-family: "Kaiti", "STKaiti", "楷体", serif;
  font-size: 15px;
}

/* 404风格留言页 */
.notfound-page {
  background: #0a0a0f;
  border-radius: 12px;
  padding: 60px 40px;
  text-align: center;
  color: #666;
}

.notfound-page .code {
  font-size: 120px;
  color: #222;
  font-weight: 900;
  letter-spacing: 20px;
  margin-bottom: 20px;
}

.notfound-page .msg {
  font-size: 14px;
  letter-spacing: 4px;
  color: #555;
  margin-bottom: 40px;
}

/* 底部 */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 20px 20px;
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 30px;
}

.footer h4 {
  color: white;
  margin-bottom: 16px;
  font-size: 14px;
  letter-spacing: 1px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  padding: 5px 0;
  font-size: 13px;
}

.footer ul li a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s;
}

.footer ul li a:hover { color: var(--primary-light); }

.footer-contact p {
  padding: 5px 0;
  font-size: 13px;
  display: flex;
  gap: 8px;
}

.footer-copy {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

.footer-copy .glitch-text {
  display: inline-block;
}

/* 页面停留过久的乱码效果 */
body.glitching .intro-text,
body.glitching .dept-body,
body.glitching .leader-info p,
body.glitching .news-content p {
  animation: textGarble 0.3s infinite;
}

@keyframes textGarble {
  0% { filter: blur(0); }
  25% { filter: blur(1px) hue-rotate(10deg); }
  50% { filter: blur(0.5px); }
  75% { filter: blur(1px) hue-rotate(-10deg); }
  100% { filter: blur(0); }
}

/* 响应式 */
@media (max-width: 900px) {
  /* ===== 顶部导航 ===== */
  .nav-container { position: relative; padding: 10px 16px; }
  .logo-text h1 { font-size: 15px; }
  .logo-text p { font-size: 9px; }
  .logo-icon { width: 42px; height: 42px; font-size: 20px; }
  .logo { gap: 8px; }

  /* 汉堡按钮 */
  .hamburger {
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 99;
  }
  .hamburger span {
    display: block;
    height: 2px;
    background: #1f2937;
    border-radius: 2px;
    transition: all 0.3s;
  }
  .hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.is-open span:nth-child(2) { opacity: 0; }
  .hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* 移动端下拉菜单 */
  .nav-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    padding: 10px;
    z-index: 999;
    flex-direction: column !important;
    border: 1px solid #e5e7eb;
  }
  .nav-menu.mobile-open { display: flex !important; }
  .nav-menu li { width: 100%; border-bottom: 1px solid #f3f4f6; }
  .nav-menu li:last-child { border: none; }
  .nav-menu a {
    display: block;
    width: 100%;
    padding: 14px 12px;
    font-size: 15px;
    min-height: 44px;
    box-sizing: border-box;
  }

  /* ===== 容器 & 字号 ===== */
  .container { padding: 16px 14px; }
  .page-title { font-size: 22px; margin-bottom: 16px; }
  .page-subtitle { font-size: 13px; }
  body { font-size: 14px; }

  /* ===== 轮播图 ===== */
  .carousel {
    height: 260px;
    border-radius: 12px;
    margin: 0 -14px 24px;
    width: calc(100% + 28px);
  }
  .carousel-slide h2 { font-size: 18px; margin-bottom: 10px; }
  .carousel-slide p { font-size: 13px; margin-bottom: 18px; }
  .carousel-slide { padding: 20px; }
  .carousel-dots { bottom: 8px; }
  .carousel-btn { font-size: 12px; padding: 8px 14px; min-height: 40px; }

  /* ===== 网格系统 ===== */
  .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dept-grid { grid-template-columns: 1fr; }
  .leader-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .job-list { grid-template-columns: 1fr; gap: 12px; }
  .wall-messages { grid-template-columns: 1fr; gap: 12px; }
  .evidence-grid { grid-template-columns: 1fr; gap: 12px; }
  .footer-container { grid-template-columns: 1fr; gap: 18px; }
  .password-inputs { flex-direction: column; gap: 12px; }
  .pwd-group input { width: 100% !important; min-height: 48px; font-size: 18px; }
  .pwd-group label { font-size: 13px; }

  /* ===== 快捷入口卡片 ===== */
  .quick-card { padding: 16px 10px; min-height: 80px; }
  .quick-card .quick-icon { font-size: 22px; margin-bottom: 6px; }
  .quick-card .quick-title { font-size: 13px; }
  .quick-card .quick-desc { font-size: 10px; }

  /* ===== 领导卡片 ===== */
  .leader-card { min-height: 260px; }
  .leader-photo { height: 130px; min-height: 130px; }
  .leader-name { font-size: 14px; }
  .leader-title { font-size: 11px; }
  .leader-desc { font-size: 12px; padding: 8px; line-height: 1.6; }

  /* ===== 按钮通用触摸热区 ===== */
  .btn {
    min-height: 44px;
    font-size: 14px;
    padding: 10px 18px;
  }
  button, .btn, a.btn, .voice-continue, .choice-btn {
    min-height: 44px !important;
  }

  /* ===== 新闻列表 ===== */
  .news-item { padding: 14px; }
  .news-title { font-size: 14px; line-height: 1.5; }
  .news-meta { font-size: 11px; }
  .news-summary { font-size: 12px; }

  /* ===== 招聘卡片 ===== */
  .job-card { padding: 14px; }
  .job-title { font-size: 15px; }
  .job-meta { font-size: 11px; flex-wrap: wrap; gap: 6px; }
  .job-card p, .job-card li { font-size: 12px; }

  /* ===== 科室详情弹窗 ===== */
  .modal-box { max-width: 94vw; max-height: 90vh; }
  .doctor-grid { grid-template-columns: 1fr; }

  /* ===== 病理查询表单 ===== */
  .query-form { padding: 20px; }
  .query-form label { font-size: 14px; }
  .query-form input {
    min-height: 48px;
    font-size: 16px;
    padding: 10px 14px;
  }
  .query-result { padding: 16px; font-size: 13px; }

  /* ===== 旧楼漫游 ===== */
  .old-building-wrap { padding: 20px 14px; border-radius: 10px; min-height: 60vh; }
  .iron-gate {
    max-width: 100%;
    height: 240px;
    border-width: 6px;
    margin-bottom: 24px;
  }
  .iron-gate::before {
    left: 24px;
    box-shadow: 72px 0 0 #2a2a2a, 144px 0 0 #2a2a2a, 216px 0 0 #2a2a2a, 288px 0 0 #2a2a2a;
  }
  .iron-gate::after {
    box-shadow: 0 80px 0 #2a2a2a, 0 160px 0 #2a2a2a;
  }
  .gate-warning { font-size: 18px; letter-spacing: 4px; }

  .old-building-wrap h3 { font-size: 16px; letter-spacing: 4px; margin-bottom: 18px; }
  .old-building-wrap h3 + div,
  .old-building-wrap p[style*="color:#666"] { font-size: 12px; }

  .roam-container { border-radius: 10px; min-height: 480px; overflow-x: hidden; }
  .roam-scene { padding: 20px 16px 28px; min-height: auto; }
  .room-title { font-size: 18px; letter-spacing: 4px; margin-bottom: 18px; }
  .room-desc { font-size: 13px; line-height: 1.8; margin-bottom: 22px; }

  .roam-nav {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
  }
  .roam-nav .roam-item,
  .roam-nav a.roam-item {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
    min-height: 48px;
    font-size: 12px;
    padding: 10px 10px;
    line-height: 1.5;
    text-align: center;
    box-sizing: border-box;
  }

  .elevator-panel {
    padding: 20px 16px;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .elevator-panel h4 { font-size: 13px; line-height: 1.6; }
  .elevator-panel input {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    font-size: 18px;
  }

  /* ===== 护士留言墙 ===== */
  .wall-note { padding: 14px; font-size: 13px; line-height: 1.8; }
  .wall-note .note-meta { font-size: 11px; margin-bottom: 8px; }

  /* ===== 结局页 ===== */
  .ending-container { padding: 20px 14px; }
  .ending-section { padding: 20px; }
  .ending-section .section-title { font-size: 18px; }
  .ending-section .section-desc { font-size: 13px; }
  .ending-result h1 { font-size: 22px; }
  .ending-result .epilogue p { font-size: 14px; line-height: 2; }
  .ending-result .epilogue p:last-child { font-size: 16px; }

  /* ===== 语音/选择弹窗 ===== */
  .voice-box {
    max-width: 94vw !important;
    padding: 20px 18px;
    margin: 10px;
  }
  .voice-text { font-size: 14px; line-height: 1.9; }

  /* ===== 周慧芳个人页 ===== */
  .zhou-page { padding: 20px 14px; }
  .zhou-diary { font-size: 13px; padding: 16px; }
  .zhou-photos { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* ===== 页脚 ===== */
  .footer-bottom { padding: 16px 14px; font-size: 11px; text-align: center; }
  .footer-section h4 { font-size: 14px; }
  .footer-section p, .footer-section a { font-size: 12px; }

  /* ===== 医院介绍段落 & 历史 ===== */
  .intro-text p, .history-section p { font-size: 13px; line-height: 2; }

  /* ===== 布局图 ===== */
  .campus-map { height: 220px; }
}

/* ================= 极限小屏 (<=480px) 额外适配 ================= */
@media (max-width: 480px) {
  .old-building-wrap { padding: 16px 10px; }
  .iron-gate { height: 200px; }
  .iron-gate::before {
    left: 18px;
    box-shadow: 54px 0 0 #2a2a2a, 108px 0 0 #2a2a2a, 162px 0 0 #2a2a2a, 216px 0 0 #2a2a2a;
  }
  .iron-gate::after { box-shadow: 0 66px 0 #2a2a2a, 0 132px 0 #2a2a2a; }
  .gate-warning { font-size: 16px; letter-spacing: 3px; }
  .room-title { font-size: 15px; letter-spacing: 3px; }
  .roam-scene { padding: 16px 12px 24px; }
  .room-desc { font-size: 12px; line-height: 1.75; }
  .roam-nav .roam-item,
  .roam-nav a.roam-item {
    flex: 1 1 100%;
    min-height: 52px;
    font-size: 12px;
  }
  .phone-screen { padding: 14px 14px; font-size: 12px; }
  .elevator-panel { padding: 16px 12px; }
  .elevator-panel h4 { font-size: 12px; }
  .pwd-group input { min-height: 52px; font-size: 20px; }
}
