/* ==========================================================================
   Zakoflare Security Verification Page · Style
   与原版 1:1 还原：黑暗/白天自适应、纯正无衬线排版、Turnstile 细节
   ========================================================================== */

:root {
  /* 默认深色主题 (匹配截图的纯黑环境) */
  --bg-color: #000000;
  --text-primary: #ffffff;
  --text-secondary: #999999;
  --text-muted: #666666;
  --border-color: #333333;
  --divider-color: #222222;

  /* Turnstile 验证框配色 (深色) */
  --widget-bg: #222222;
  --widget-border: #444444;
  --widget-text: #ffffff;
  --widget-hover-border: #555555;

  /* 链接颜色 */
  --link-color: #2f7bbf;
  --link-hover: #4ea5ff;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

/* 白天浅色模式自适应 */
@media (prefers-color-scheme: light) {
  :root {
    --bg-color: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #424245;
    --text-muted: #86868b;
    --border-color: #d2d2d7;
    --divider-color: #e5e5ea;

    /* Turnstile 验证框配色 (浅色) */
    --widget-bg: #fafafa;
    --widget-border: #dcdcdc;
    --widget-text: #1d1d1f;
    --widget-hover-border: #b0b0b0;

    --link-color: #0051c3;
    --link-hover: #0071e3;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 80px 24px 30px;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 680px;
  width: 100%;
  margin: 40px auto 0;
}

/* 域名大标题 */
.zone-name-title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
  word-break: break-all;
}

/* 副标题与描述 */
.h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.core-msg {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ==========================================================================
   Turnstile 验证小卡片 (高仿 Cloudflare Turnstile)
   ========================================================================== */
.turnstile-box {
  width: 300px;
  height: 65px;
  background-color: var(--widget-bg);
  border: 1px solid var(--widget-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  user-select: none;
  cursor: default;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.turnstile-box:hover {
  border-color: var(--widget-hover-border);
}

.turnstile-box.failed {
  border-color: #e5484d;
  background-color: rgba(229, 72, 77, 0.05);
}

.turnstile-box.clickable {
  cursor: pointer;
}

.turnstile-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.turnstile-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 环形旋转菊花圆点动画 */
.turnstile-spinner {
  position: relative;
  width: 24px;
  height: 24px;
}

.turnstile-spinner .dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: #22c55e; /* 经典绿点 */
  border-radius: 50%;
  animation: spinner-fade 1.2s infinite ease-in-out both;
}

.turnstile-spinner .d1 { top: 0; left: 10px; animation-delay: -1.1s; }
.turnstile-spinner .d2 { top: 3px; left: 17px; animation-delay: -1.0s; }
.turnstile-spinner .d3 { top: 10px; left: 20px; animation-delay: -0.9s; }
.turnstile-spinner .d4 { top: 17px; left: 17px; animation-delay: -0.8s; }
.turnstile-spinner .d5 { top: 20px; left: 10px; animation-delay: -0.7s; }
.turnstile-spinner .d6 { top: 17px; left: 3px; animation-delay: -0.6s; }
.turnstile-spinner .d7 { top: 10px; left: 0; animation-delay: -0.5s; }
.turnstile-spinner .d8 { top: 3px; left: 3px; animation-delay: -0.4s; }

@keyframes spinner-fade {
  0%, 39%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* 手动勾选框 (失败后显示) */
.turnstile-checkbox-mock {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-box {
  width: 20px;
  height: 20px;
  border: 2px solid #e5484d;
  border-radius: 3px;
  background: transparent;
  transition: all 0.15s ease;
}

.turnstile-box.clickable:hover .mock-box {
  background: rgba(229, 72, 77, 0.1);
}

.turnstile-status-text {
  font-size: 14px;
  color: var(--widget-text);
  font-weight: 500;
  letter-spacing: -0.2px;
}

/* 右侧 Zakoflare Logo */
.turnstile-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.zakoflare-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--widget-text);
}

.logo-svg {
  display: block;
}

.zakoflare-links {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sub-link {
  color: var(--text-muted);
  text-decoration: none;
}

.sub-link:hover {
  text-decoration: underline;
  color: var(--text-secondary);
}

.sep {
  opacity: 0.6;
}

/* 失败提示与申诉入口 */
.challenge-error-notice {
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.error-desc {
  color: #e5484d;
  margin-bottom: 6px;
}

.appeal-link {
  color: var(--link-color);
  text-decoration: underline;
}

.appeal-link:hover {
  color: var(--link-hover);
}

/* ==========================================================================
   页面底部分割线与 Ray ID
   ========================================================================== */
.page-footer {
  width: 100%;
  margin-top: auto;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background-color: var(--divider-color);
  margin-bottom: 16px;
}

.footer-meta {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ray-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.footer-text {
  color: var(--text-muted);
}

.brand-link, .privacy-link {
  color: var(--link-color);
  text-decoration: underline;
}

.brand-link:hover, .privacy-link:hover {
  color: var(--link-hover);
}

.pipe {
  margin: 0 4px;
  opacity: 0.5;
}

/* 响应式调整 */
@media (max-width: 640px) {
  .main-wrapper {
    padding: 40px 16px 20px;
  }
  .main-content {
    margin-top: 20px;
  }
  .zone-name-title {
    font-size: 28px;
  }
  .h2 {
    font-size: 18px;
  }
}
