/* 銀河電燈 - 主站与分支页共用 */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  overflow-x: hidden; /* 强制隐藏水平滚动条 */
  width: 100%;
}

* {
  box-sizing: border-box; /* 确保 padding 不会撑开容器宽度 */
}

.ginga-page {
  min-height: 100vh;
  background: #000 url("../images/bg.png") center center / cover no-repeat fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e8e4df;
  font-family: "Times New Roman", Georgia, serif;
  box-sizing: border-box;
  padding: 2rem 1rem;
  position: relative;
}

.ginga-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 10;
}

/* 子页面顶部固定条（不含 index） */
.ginga-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px; /* 原 52px 的约 1.4 倍 */
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Times New Roman", Georgia, serif;
  box-sizing: border-box;
}

.ginga-topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: bold;
}

.ginga-topbar-nav a {
  color: inherit;
  text-decoration: none;
  padding: 0.25em 0.5em;
  transition: color 0.2s, text-decoration 0.2s;
}

.ginga-topbar-nav a:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

.ginga-topbar-sep {
  opacity: 0.7;
  user-select: none;
}

.ginga-topbar .ginga-lang {
  margin: 0;
}

.ginga-topbar .ginga-lang a {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s, text-decoration 0.2s;
}

.ginga-topbar .ginga-lang a:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

.ginga-page.has-topbar {
  padding-top: 73px; /* 与顶部条高度保持一致，避免内容被遮挡 */
}

.ginga-lang {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: rgba(232, 228, 223, 0.85);
}

.ginga-lang a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s, color 0.2s;
}

.ginga-lang a:hover {
  color: #fff;
  opacity: 1;
}

.ginga-lang a.active {
  color: #fff;
  opacity: 1;
}

.ginga-lang a:not(.active) {
  opacity: 0.6;
}

.ginga-lang-sep {
  opacity: 0.7;
  user-select: none;
}

.ginga-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  max-width: 900px;
  text-align: center;
}

.ginga-title-img {
  width: 100%;
  max-width: 546px; /* 约为原来的 1.3 倍 */
  height: auto;
  display: block;
  margin: 0 auto;
}

.ginga-nav {
  margin-top: 3.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0;
  font-family: "Times New Roman", "Georgia", serif;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 240, 240, 0.95);
}

.ginga-nav a {
  color: inherit;
  text-decoration: none;
  padding: 0 1.6rem;
  transition: color 0.2s, opacity 0.2s;
}

.ginga-nav a:hover {
  color: #fff;
  opacity: 1;
}

.ginga-nav-sep {
  opacity: 0.8;
  user-select: none;
  margin: 0 0.3rem;
}

.ginga-content {
  margin-top: 2rem;
  max-width: 720px;
  line-height: 1.7;
}

/* MEDIA 页面布局：内容区左对齐，分割线为内容区宽度的 1.8 倍，首尾均有分割线 */
.media-main {
  width: 100%;
  margin: 0 auto;
  text-align: left;
  padding: 7rem 5rem 4rem;
  box-sizing: border-box;
  color: #f5f5f5;
}

/* 内容区居中；分割线 1.8 倍长且居中；内部 MEDIA、图片、标题、日期与分割线最左侧齐平 */
.media-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  overflow: visible;
}

.media-title {
  font-family: "Times New Roman", "Georgia", serif;
  font-size: 3.5rem;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin: 0 0 3rem;
  color: #fff;
  position: relative;
  left: -40%;
  width: 140%;
}

.media-note {
  position: relative;
  left: -40%;
  width: 140%;
}

/* 分割线：长度为内容区宽度的 1.8 倍，在页面内居中 */
.media-divider {
  display: block;
  width: 180%;
  margin: 0 0 0 -40%;
  padding: 0;
  height: 1px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
}

.media-list {
  display: flex;
  flex-direction: column;
}

.media-entry {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.25rem;
  padding: 1rem 0;
  border: none;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s, color 0.2s;
  text-align: left;
  position: relative;
  left: -40%;
  width: 140%;
}

.media-entry:hover {
  opacity: 0.9;
  color: #fff;
}

.media-entry-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  overflow: hidden;
  background: #222;
}

.media-entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-entry-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.media-entry-title {
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
}

.media-entry-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  .media-main {
    padding: 2rem 1rem 3rem;
  }
  .media-title {
    font-size: 2.2rem;
    letter-spacing: 0.2em;
    left: 0;
    width: 100%;
  }
  .media-note {
    left: 0;
    width: 100%;
  }
  .media-entry {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    left: 0;
    width: 100%;
  }
  .media-divider {
    width: 100%;
    margin-left: 0;
  }
  .media-entry-thumb {
    width: 100%;
    height: 120px;
  }
}

/* ABOUT 页面布局：标题与 MEDIA 同字体、同位置；正文左对齐；底部三按键 */
.about-main {
  width: 100%;
  margin: 0 auto;
  text-align: left;
  padding: 7rem 5rem 4rem;
  box-sizing: border-box;
  color: #f5f5f5;
}

.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  overflow: visible;
}

/* 与 MEDIA 标题相同字体与位置（左移与 MEDIA 齐平） */
.about-title {
  font-family: "Times New Roman", "Georgia", serif;
  font-size: 3.5rem;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin: 0 0 3rem;
  color: #fff;
  position: relative;
  left: -40%;
  width: 140%;
}

.about-content {
  margin-bottom: 3rem;
  position: relative;
  left: -40%;
  width: 140%;
}

.about-content p {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
}

/* 副标题「银河电灯」：2 倍字号、加粗、与下文间距加大 */
.about-content .about-heading {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 2rem;
  color: #fff;
}
.about-heading {
    position: relative; /* 必须设置定位，z-index 才会生效 */
    z-index: 10000;    /* 只要比遮罩层的 9999 高即可 */
    
    /* 建议：由于它浮在黑幕上，可以加一点发光效果确保看清 */
    color: #e8e4df;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}
.about-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  position: relative;
  left: -40%;
  width: 140%;
}

.about-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  color: #fff;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, opacity 0.2s;
}

.about-btn:hover {
  border-color: #fff;
  color: #fff;
  opacity: 0.95;
}

.about-btn-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
  object-fit: contain;
}

.about-btn-text {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  .about-main {
    padding: 2rem 1rem 3rem;
  }
  .about-title {
    font-size: 2.2rem;
    letter-spacing: 0.2em;
    left: 0;
    width: 100%;
  }
  .about-content {
    left: 0;
    width: 100%;
  }
  .about-buttons {
    left: 0;
    width: 100%;
  }
}

/* CONNECT 页面布局：标题居中，表单白框透明底，送信按钮白底黑字 */
.connect-main {
  width: 100%;
  margin: 0 auto;
  padding: 7rem 5rem 4rem;
  box-sizing: border-box;
  color: #f5f5f5;
  text-align: center;
}

.connect-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.connect-title {
  font-family: "Times New Roman", "Georgia", serif;
  font-size: 3.5rem;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin: 0 0 2rem;
  color: #fff;
  text-align: center;
}

.connect-intro {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2rem;
  line-height: 1.6;
}

.connect-form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.connect-label {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}

.connect-label:first-of-type {
  margin-top: 0;
}

.connect-input,
.connect-textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.connect-input::placeholder,
.connect-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.connect-input:focus,
.connect-textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.85);
}

.connect-textarea {
  min-height: 140px;
  resize: vertical;
}

.connect-submit {
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  letter-spacing: 0.05em;
  color: #000;
  background: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.connect-submit:hover {
  opacity: 0.9;
}

@media (max-width: 600px) {
  .connect-main {
    padding: 2rem 1rem 3rem;
  }
  .connect-title {
    font-size: 2.2rem;
    letter-spacing: 0.2em;
  }
}

/* WORKS 页面布局 */
.works-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 5rem 4rem;
  box-sizing: border-box;
  color: #f5f5f5;
}

.works-title {
  font-family: "Times New Roman", "Georgia", serif;
  font-size: 3.5rem;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin: 0 0 3rem;
}

.works-section {
  margin-top: 2rem;
}

.works-row {
  width: 100%;
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.works-row-label {
  font-family: "Times New Roman", "Georgia", serif;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
}

.works-row-line {
  flex: 1;
  height: 1px;
  margin: 0 1.5rem;
  background: rgba(255, 255, 255, 0.25);
}

.works-row-icon {
  width: 16px;
  height: 16px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transition: background-image 0.15s ease;
}

.works-section .works-row-icon {
  background-image: url("../images/icon_add.svg");
}

.works-section.works-section-expanded .works-row-icon {
  background-image: url("../images/icon_close.svg");
}

/* 可折叠内容：用 grid 实现向下展开 / 向上收起动画 */
.works-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease-out;
  overflow: hidden;
}

.works-section.works-section-expanded .works-content {
  grid-template-rows: 1fr;
}

.works-content > * {
  min-height: 0;
  overflow: hidden;
}

.works-content .works-cards {
  margin-top: 2.5rem;
  padding-top: 0;
}

.works-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.works-card {
  width: 320px;
  max-width: 100%;
  text-align: center;
  font-family: "Times New Roman", "Georgia", serif;
}

.works-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.works-card-link:hover {
  opacity: 0.9;
}

.works-card-thumb {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  background: #222;
  overflow: hidden;
}

.works-card-thumb img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.works-card-title {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.works-card-meta {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .ginga-nav {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    margin-top: 2rem;
  }
  .ginga-title-img {
    max-width: 90%;
  }
}


/* 修改 .media-inner 和 .about-inner 的限制，确保不溢出 */
.media-inner, .about-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%; /* 确保宽度不超过屏幕 */
  box-sizing: border-box;
}

/* 统一处理这些溢出元素 */
.media-title, .media-note, .media-entry, .media-divider,
.about-title, .about-content, .about-buttons {
  position: static; /* 取消 relative 定位偏移 */
  width: 100%;      /* 回归正常宽度 */
  left: 0;          /* 重置偏移 */
  margin-left: 0;   /* 重置边距 */
}

/* 优化顶部条在小屏幕的表现 */
@media (max-width: 600px) {
  .ginga-topbar {
    padding: 0 1rem;       /* 缩小左右内边距 */
    height: auto;          /* 允许高度自适应 */
    min-height: 52px;
    flex-direction: column; /* 空间极小时改为上下排列 */
    justify-content: center;
    gap: 5px;
    padding: 10px 0;
  }

  .ginga-topbar-nav {
    font-size: 0.85rem;    /* 缩小字体 */
    gap: 0.1rem;           /* 缩小链接间距 */
    flex-wrap: wrap;       /* 允许自动换行 */
    justify-content: center;
  }
  
  .ginga-topbar-nav a {
    padding: 0.2rem 0.4rem; /* 增加点击区域但减少占用宽度 */
  }
}

@media (max-width: 600px) {
  .works-title {
    font-size: 2.2rem;   /* 减小字号，与你之前的 connect-title 手机端保持一致 */
    letter-spacing: 0.2em; /* 相应缩小字间距，防止文字过长溢出 */
    margin-bottom: 2rem;   /* 稍微减小下边距，让布局更紧凑 */
    text-align: center;    /* 在手机端居中通常视觉效果更好 */
  }

  .works-card {
    width: 100%;      /* 手机端让卡片占满全宽 */
    margin-bottom: 2rem;
  }
  
  .works-card-thumb img {
    border-radius: 4px; /* 可选：给原比例图片加一点点圆角，增加精致感 */
  }
}

/* 针对手机端优化子页面的顶部条 */
@media (max-width: 600px) {
  /* 只有当页面具有 has-topbar 类时（即非首页），隐藏语言切换选项 */
  .has-topbar .ginga-topbar .ginga-lang {
    display: none;
  }

  /* 确保导航栏占据整行并居中/两端对齐，防止溢出 */
  .has-topbar .ginga-topbar {
    display: flex;
    justify-content: center; /* 关键：将内容水平居中 */
    align-items: center;     /* 关键：将内容垂直居中 */
    height: 60px;                  /* 固定一个较小的高度 */
    padding: 0 1rem;
  }

  /* 调整导航文字大小，确保其能在一行内放下 */
  .has-topbar .ginga-topbar-nav {
    font-size: 0.85rem;
    gap: 0.1rem;             /* 适当的链接间距 */
    justify-content: center;
    width: 100%;             /* 确保导航容器占满父级宽度以便居中 */
  }
}

/* --- 手电筒特效最终版 --- */

/* 1. 顶部条层级最高，不受黑屏影响 */
.ginga-topbar {
    z-index: 10001 !important;
}

/* 2. 遮罩层：设为固定定位，全屏 */
.flashlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* 初始全黑，JS会实时修改这个背景 */
    background: black; 
    z-index: 9998;
    /* 允许点击穿透，这样才能点到下方的按钮/文字 */
    pointer-events: none; 
    transition: opacity 0.5s ease;
}

/* 3. 角落文字 */
.corner-text {
    position: fixed;
    z-index: 1;
    color: white;
    font-size: 0.8rem;
    padding: 15px;
    text-shadow: none;
    pointer-events: none; 
    user-select: none;
}

.bottom-left, .bottom-right {
    position: absolute; /* 关键：改为绝对定位 */
    bottom: 20px;       /* 距离页面最底端 20px */
}
.top-left { top: 80px; left: 10px; }
.bottom-left { bottom: 10px; left: 10px; }
.bottom-right { bottom: 10px; right: 10px; }
.top-right { top: 80px; right: 10px; }

/* 禁用移动端的手电筒，或微调 */
@media (max-width: 600px) {
    .top-left, .top-right { top: 70px; }
}

/* QUESTION 页面专有样式 */

/* 验证提示副标题样式 */
.about-verify-hint {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ff9d00; /* 使用警示色或强调色，也可以保持白色 */
    margin-bottom: 3rem;
    border-left: 3px solid #ff9d00;
    padding-left: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.about-verify-loading {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.about-verify-text {
    color: #ff9d00;
}

.archive-section {
    margin-bottom: 4rem;
}

/* 姓名样式：调大字号并加粗，并加入头像 */
.archive-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;              /* 图案与姓名间距加大 */
    font-size: 2.1rem;      /* 姓名字号放大 */
    font-weight: bold;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    text-align: center;     /* 姓名在头像下方居中 */
}

.archive-avatar {
    width: 6rem;
    height: 6rem;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 50%;     /* 圆形头像，弱化方形边缘存在感 */
    user-select: none;
    /* 不加描边与阴影，让边框更不显眼，只保留柔和圆形轮廓 */
}

/* 正文段落：首行缩进 2 字符 */
.archive-text {
    text-indent: 2em;
    margin-bottom: 1.25rem;
    text-align: justify; /* 两端对齐使档案感更强 */
}

/* 针对移动端的适配 */
@media (max-width: 600px) {
    .archive-name {
        font-size: 1.5rem;
    }
    .about-verify-hint {
        font-size: 0.95rem;
    }
}

/* QUESTION 页面：拖拽验证区域 */
.question-interaction {
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

.question-verify {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    justify-content: space-between;
}

.question-verify-left,
.question-verify-right {
    flex: 1;
}

.verify-pool,
.verify-target {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    min-height: 150px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.verify-pool {
    background: #ffffff;
}

.verify-target {
    background: rgba(255, 255, 255, 0.04);
    border: 2px dashed rgba(200, 200, 200, 0.8);
    position: relative;
}

.verify-placeholder {
    color: rgba(220, 220, 220, 0.9);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.verify-item {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #101010;
    border: 2px dashed #c0c0c0;
    color: #d8d8d8;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem;
    cursor: grab;
    user-select: none;
}

.verify-item:active {
    cursor: grabbing;
}

.verify-target.drag-over {
    border-color: #ffd27f;
    background: rgba(255, 255, 255, 0.06);
}

.verify-submit-btn {
    margin-top: 1.5rem;
    display: inline-block;
    padding: 0.75rem 2.5rem;
    background: #d73232;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.verify-submit-btn:hover {
    background: #ff7a1a;
}

.verify-submit-btn:active {
    transform: translateY(1px);
}

@media (max-width: 768px) {
    .question-verify {
        flex-direction: column;
    }

    .verify-pool,
    .verify-target {
        padding: 1.25rem 0.75rem;
    }

    .verify-item {
        width: 72px;
        height: 72px;
        font-size: 0.75rem;
    }

    .verify-submit-btn {
        width: 100%;
        text-align: center;
    }
}