/* =====================================================================
   阳光第三中学 · 学生公开信息系统 —— 全站样式
   配色方案由后勤处王师傅赞助提供（王师傅同时也是食堂临时工）
   ===================================================================== */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Comic Sans MS", "楷体", cursive;
  font-size: 15px;
  color: #0000cc;
  background-color: #aaff00;
  background-image:
    radial-gradient(circle at 12px 12px, #00ffff 5px, rgba(0,0,0,0) 6px),
    radial-gradient(circle at 36px 36px, #ff00ff 4px, rgba(0,0,0,0) 5px);
  background-size: 64px 64px, 96px 96px;
}

a {
  color: #ff6600;
  background: #ccff00;
  padding: 0 3px;
  text-decoration: underline wavy #ff00ff;
}
a:visited { color: #800080; }
a:hover { color: #00ff00; background: #ff0000; text-decoration: line-through; }

/* ---------- 顶部 ---------- */
.site-header {
  background: #ff00ff;
  border-bottom: 10px ridge #ff0000;
  text-align: center;
  padding: 4px 0 10px;
  transform: rotate(-0.7deg);
}
.site-header h1 {
  margin: 8px 0 2px;
  font-size: 34px;
  letter-spacing: 8px;
  font-family: "华文彩云", "Comic Sans MS", cursive;
  color: #00ff00;
  text-shadow: 4px 4px 0 #0000ff, -3px 3px 0 #ffff00;
}
.slogan { font-size: 16px; font-weight: bold; }

.marquee {
  overflow: hidden; white-space: nowrap;
  background: #000080; color: #ffff00;
  font-weight: bold; padding: 3px 0;
}
.marquee span {
  display: inline-block; padding-left: 100%;
  animation: marqueeMove 11s linear infinite;
}
@keyframes marqueeMove { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ---------- 导航 ---------- */
.site-nav { background: #000080; text-align: center; padding: 8px 0 12px; }
.site-nav a {
  display: inline-block; margin: 0 10px; padding: 5px 20px;
  color: #ffff00; background: #ff6600;
  border: 3px dotted #00ff00;
  font-weight: bold; font-size: 16px;
  text-decoration: none;
  transform: skewX(-14deg);
}
.site-nav a.active { background: #00ff00; color: #ff00ff; border-style: solid; }
.site-nav a:hover {
  background: #0000ff; color: #ff0000;
  text-decoration: underline overline;
  animation: navSpin 0.5s linear infinite;
}
@keyframes navSpin {
  from { transform: skewX(-14deg) rotate(0deg); }
  to   { transform: skewX(-14deg) rotate(360deg); }
}

/* ---------- 通用面板 ---------- */
.wrap { width: 1100px; max-width: 96%; margin: 14px auto 48px; }
.panel {
  position: relative;
  background: #ffff00;
  border: 6px double #ff00ff;
  outline: 4px dashed #00ffff;
  outline-offset: 3px;
  box-shadow: 12px 12px 0 #ff0000;
  padding: 14px 18px;
  margin: 22px 0;
  transform: rotate(0.6deg);
}
.panel h2 { margin: 2px 0 12px; color: #c000c0; font-size: 24px; text-shadow: 2px 2px 0 #00ff00; }
.panel h3 { color: #ff0000; }

.blink { animation: blinker 0.55s steps(2, start) infinite; }
@keyframes blinker { to { visibility: hidden; } }

.rainbow { animation: rainbowText 1.1s linear infinite; font-weight: bold; }
@keyframes rainbowText {
  0%   { color: #ff0000; } 17% { color: #ff8800; } 33% { color: #d4d400; }
  50%  { color: #00aa00; } 67% { color: #0000ff; } 84% { color: #8800ff; } 100% { color: #ff0000; }
}

/* ---------- 表单 ---------- */
.field { margin: 14px 0; position: relative; }
.field label { display: inline-block; width: 84px; color: #000080; font-weight: bold; }
input[type="text"], input[type="password"], input[type="number"], select {
  background: #00ffff;
  color: #ff0000;
  border: 3px groove #800080;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 16px;
  width: 250px;
}
input:focus, select:focus { outline: 5px solid #ff00ff; background: #ccffcc; }
input::placeholder { color: #ff00ff; opacity: 1; font-size: 12px; }

/* 【位置错误】登录页“密码”标签被绝对定位到面板外面很远的地方 */
.lbl-far { position: absolute; left: -190px; top: 4px; width: auto !important; color: #ff0000 !important; }

.btn {
  background: #ff0000; color: #00ff00;
  border: 4px dotted #ffff00;
  font-family: inherit; font-size: 18px; font-weight: bold;
  padding: 8px 24px; margin: 8px 10px 0 0; cursor: pointer;
  text-shadow: 1px 1px 0 #000080;
}
.btn:hover {
  background: #0000ff; color: #ff0000; border-style: double;
  transform: translate(10px, -6px) rotate(-3deg);
}
/* 【位置错误】关键提交按钮 hover 时会跑路 */
.btn-big:hover { transform: translate(140px, -34px) rotate(6deg) scale(1.15); }
.btn-small { font-size: 13px; padding: 3px 10px; }

/* ---------- 提示框 ---------- */
.err-box {
  background: #ff0000; color: #ffff00;
  border: 3px solid #00ff00;
  padding: 8px 12px; margin: 10px 0; font-weight: bold;
  animation: wiggle 0.25s linear infinite;
}
@keyframes wiggle {
  0% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } 100% { transform: rotate(-1.2deg); }
}
.ok-box {
  background: #00ff00; color: #ff00ff;
  border: 3px dashed #ff0000;
  padding: 8px 12px; margin: 10px 0;
  font-weight: bold; font-size: 16px;
}

/* ---------- 登录页 ---------- */
.login-wrap { position: relative; min-height: 460px; }
.login-box { position: absolute; left: 56%; top: 26px; width: 400px; margin: 0; } /* 【位置错误】登录框整体偏右 */
.side-panel { position: absolute; left: 0; top: 40px; width: 44%; margin: 0; transform: rotate(-1.5deg); }
.captcha {
  display: inline-block; font-size: 26px; font-weight: bold;
  letter-spacing: 12px; color: #008800; background: #ffffcc;
  text-decoration: line-through; transform: rotate(-9deg);
  border: 2px dotted #ff0000; padding: 0 8px 0 20px;
  user-select: none;
}

/* ---------- 成绩页 ---------- */
.grade-row { margin: 7px 0; white-space: nowrap; }
.bar-outer {
  display: inline-block; width: 150px; height: 16px;
  background: #ffffff; border: 2px solid #000000; vertical-align: middle;
}
.bar-inner { height: 100%; background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff); }
.grade-subject { display: inline-block; width: 60px; font-weight: bold; color: #800080; }
.grade-score { display: inline-block; width: 70px; color: #ff0000; font-weight: bold; }
.grade-judge { display: inline-block; width: 140px; color: #0000ff; }

table.plain { border-collapse: collapse; }
table.plain td, table.plain th { border: 2px solid #ff0000; padding: 4px 10px; }
table.plain th { background: #ff00ff; color: #00ff00; }
table.plain tr:nth-child(odd) { background: #ccffcc; }
table.plain tr:nth-child(even) { background: #ffccff; }
/* 【位置错误】表头整体错位 */
.misalign th { position: relative; left: 30px; }

/* ---------- 公告页 ---------- */
.notice-item {
  border: 3px ridge #800080; background: #ccffff;
  padding: 10px 14px; margin: 14px 0;
}
.notice-item h4 { margin: 0 0 6px; color: #ff00ff; }
.notice-item.flip { transform: rotate(180deg); }   /* 【版面错误】第二条倒挂 */
.notice-item.tilt { transform: rotate(2deg); }
.notice-item.behind { position: absolute; left: 38%; top: 130px; width: 46%; z-index: -1; } /* 【位置错误】被后面的公告盖住 */
.notice-date { color: #008800; font-size: 13px; }
.pinned-badge { background: #ff0000; color: #ffff00; padding: 1px 8px; margin-right: 8px; font-weight: bold; }

/* ---------- 页脚（固定悬浮，故意盖住正文内容） ---------- */
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0; height: 108px;
  background: #800080; border-top: 8px ridge #00ffff;
  color: #00ff00; text-align: center; padding-top: 10px;
  z-index: 600; font-size: 13px;
}
.site-footer .blink { color: #ffff00; font-size: 15px; }

/* ---------- 客服窗（关不掉） ---------- */
.kefu {
  position: fixed; right: 10px; bottom: 120px; width: 225px;
  background: #00ffff; border: 5px ridge #ff0000;
  z-index: 999; font-size: 13px; color: #800000;
  transition: right 0.3s, bottom 0.3s, transform 0.3s;
}
.kefu-head { background: #ff0000; color: #ffff00; padding: 4px 8px; font-weight: bold; }
.kefu-x { float: right; cursor: pointer; background: #ffff00; color: #ff0000; padding: 0 6px; font-weight: bold; }
.kefu-body { padding: 8px; line-height: 1.7; }

/* ---------- 师资队伍页 ---------- */
.teacher-card {
  position: relative;
  border: 4px ridge #0000ff;
  background: #ccffcc;
  padding: 10px 14px;
  margin: 16px 0;
  display: flex;
  gap: 14px;
}
.avatar {
  width: 96px; height: 120px;
  border: 3px dashed #ff00ff;
  background: #ffffcc;
  flex: none;
}
.t-info { position: relative; flex: 1; }
.t-name { font-size: 20px; font-weight: bold; color: #800000; }
/* 【位置错误】职称徽章绝对定位，压住姓名并冲出卡片 */
.title-badge {
  position: absolute; top: -16px; left: 40px;
  white-space: nowrap;
  background: #ff00ff; color: #00ff00;
  border: 2px solid #000000;
  padding: 2px 12px;
  font-size: 14px;
  z-index: 3;
}
.t-meta { color: #000080; margin: 6px 0; }
.t-intro { border-top: 2px dotted #800080; margin-top: 8px; padding-top: 8px; color: #ff0000; }

/* ---------- 课表页 ---------- */
.tt-table { margin-top: 10px; }
.tt-table th, .tt-table td {
  border: 2px solid #ff0000;
  width: 52px;
  white-space: nowrap;   /* 【版面错误】窄列 + 禁止换行，单元格内容必然挤压溢出 */
  padding: 3px 5px;
  font-size: 12px;
}
.tt-table th { background: #ff00ff; color: #00ff00; }
/* 今日高亮：高亮的永远是隔壁那列 */
.tt-today { background: #00ff00 !important; outline: 3px solid #0000ff; }
/* 【位置错误】下午课表用负外边距叠在上午课表上 */
.pm-block { margin-top: -72px; margin-left: 26px; transform: rotate(0.5deg); }
.tt-cursor td { cursor: pointer; }

/* ---------- 校园风采页 ---------- */
.slides-viewport {
  position: relative; height: 260px;
  background: #111111;
  border: 5px solid #ffff00;
  overflow: hidden;
}
.slide {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  font-size: 44px; font-weight: bold;
  color: #ffffff;
  text-shadow: 3px 3px 0 #000000;
  cursor: pointer;
}
.gal-ctrl { margin: 12px 0; }
.gal-ctrl .btn { margin: 0 8px; }
.gal-caption { font-size: 16px; font-weight: bold; color: #000080; }
.dots { margin: 8px 0; }
.dots span {
  display: inline-block; width: 16px; height: 16px;
  border-radius: 50%;
  background: #cccccc;
  border: 2px solid #000000;
  margin-right: 8px;
  cursor: pointer;
}
.dots span.on { background: #ff0000; }
/* 灯箱遮罩：z-index 故意低于页脚(600)和客服窗(999) */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 500;
  display: none;
  align-items: center; justify-content: center;
}
.lightbox-on { display: flex; }
.lb-box { width: 640px; height: 420px; border: 8px double #ffff00; display: flex; align-items: center; justify-content: center; font-size: 60px; color: #ffffff; font-weight: bold; text-shadow: 4px 4px 0 #000; }
.lb-close { position: absolute; left: 30px; bottom: 30px; }

/* ---------- 意见箱页 ---------- */
.fb-item {
  border: 3px ridge #008800;
  background: #ffffcc;
  padding: 8px 12px;
  margin: 12px 0;
}
.fb-meta { color: #008800; font-size: 13px; margin-bottom: 4px; }
.fb-text { color: #800000; font-size: 15px; }
.count-over { color: #ff0000; font-weight: bold; }

/* ---------- 联系我们页 ---------- */
.c-row { margin: 12px 0; font-size: 16px; color: #000080; }
.c-row b { color: #ff0000; }
.qr-img, .map-img { border: 4px ridge #800080; background: #ffffff; display: block; margin: 8px 0; }

/* ---------- 密码强度条（逻辑反了） ---------- */
.strength-bar {
  display: inline-block; width: 200px; height: 14px;
  background: #ffffff; border: 2px solid #000000;
  vertical-align: middle;
}
.strength-fill { height: 100%; width: 0; background: #00cc00; transition: width 0.2s; }
