/* ============================================================
   celimax 正品校验页（成功态）静态复刻
   样式依据原站 makesolutions.kr 实测计算值整理
   ============================================================ */

:root {
  --font-sans: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, "Apple SD Gothic Neo", "Malgun Gothic",
    "Helvetica Neue", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

/* hidden 属性优先级兜底：作者样式 display 会覆盖 UA 的 [hidden] 规则 */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgb(33, 37, 41);
  background: rgb(238, 243, 247);
}

/* ---------- 外层容器（移动端默认铺满） ---------- */
.mobile-auth-page {
  width: 100vw;
  height: 100vh;
  background: rgb(238, 243, 247);
}

/* ---------- 卡片面板 ---------- */
.mainBody {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: #fff;
  background-image: url("../assets/141.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 50%;
}

/* 右上角菜单图标 */
.top-row {
  position: relative;
  flex: 0 0 auto;
}

.menu-icon {
  float: right;
  width: 15px;
  margin-top: 20px;
  margin-right: 10px;
  cursor: pointer;
}

/* 按钮内容区：按钮组置于面板下半部分、底部对齐 */
.center {
  flex: 1 1 auto;
  display: flex;
  width: 100%;
}

.box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: auto;
  padding-bottom: 24px;
}

.auth-buttons {
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- 四个黑色按钮统一规格 ---------- */
.auth-button {
  width: 300px;
  height: 50px;
  border: 0.8px solid rgb(0, 0, 0);
  border-radius: 4px;
  background: rgb(0, 0, 0);
  color: rgb(255, 255, 255);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 20px;
  margin: 0 auto 24px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.auth-button:last-child {
  margin-bottom: 0;
}

/* ---------- 降级提示文案（请求失败 / 数据异常时替换前两个按钮） ---------- */
.fail-tip {
  width: 300px;
  min-height: 50px;
  margin: 0 auto 24px auto;
  padding: 10px 20px;
  border: 0.8px solid rgb(0, 0, 0);
  border-radius: 4px;
  background: rgb(0, 0, 0);
  color: rgb(255, 255, 255);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.auth-button:hover {
  background: rgb(20, 20, 20);
}

/* ---------- 桌面端（≥600px）居中卡片 ---------- */
@media (min-width: 600px) {
  .mobile-auth-page {
    --auth-panel-height: clamp(660px, calc(100vh - 48px), 728px);
    --auth-panel-width: calc(var(--auth-panel-height) * 0.59091);
    --auth-panel-vh: calc(var(--auth-panel-height) / 100);
    --auth-panel-vw: calc(var(--auth-panel-width) / 100);
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background: rgb(238, 243, 247);
  }

  .mainBody {
    width: var(--auth-panel-width);
    height: var(--auth-panel-height);
    margin: 0;
    overflow: auto;
    border-radius: 20px;
    background-color: #fff;
    box-shadow: 0 16px 48px rgba(26, 51, 70, 0.14);
  }
}

/* 窄屏适配 */
@media (max-width: 353px) {
  .auth-button,
  .fail-tip {
    max-width: calc(100vw - 24px);
  }
}

/* ---------- 使用条款弹窗 ---------- */
.terms-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 20px 16px;
  background: rgba(16, 22, 26, 0.5);
  z-index: 1000;
}

.terms-overlay.is-open {
  display: flex;
}

.terms-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 40px);
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 64px rgba(16, 34, 48, 0.2);
  text-align: left;
}

.terms-header {
  position: relative;
  flex: 0 0 auto;
  padding: 22px 64px 20px 24px;
  border-bottom: 1px solid #edf0f3;
}

.terms-title {
  color: #243846;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: -0.5px;
}

.terms-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #f5f7f9;
  color: #72828e;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.terms-close:hover {
  background: #eaf0f4;
}

.terms-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.terms-content {
  margin: 0;
  color: #52616d;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.85;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-align: left;
}

.terms-footer {
  flex: 0 0 auto;
  padding: 16px 24px 20px;
  border-top: 1px solid #edf0f3;
  background: #fff;
}

.terms-dismiss {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: #263e50;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
}

.terms-dismiss:hover {
  background: #1d3242;
}

.terms-dismiss:active {
  background: #142938;
}

@media (max-width: 360px) {
  .terms-overlay {
    padding: 16px 12px;
  }
  .terms-header {
    padding-left: 20px !important;
  }
  .terms-body {
    padding: 20px !important;
  }
  .terms-footer {
    padding: 14px 20px 18px !important;
  }
}
