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

body {
  text-align: center;
  font-family: "Arial Hebrew", "Noto Sans Hebrew", "Segoe UI", Arial, sans-serif;
  background: #f4f8fc;
  color: #1e3a5f;
}

.container {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero {
  position: relative;
  width: 100%;
  line-height: 0;
}

.hero > img {
  display: block;
  width: 100%;
  max-width: 720px;
}

.hero-title {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 29.2%;
  margin: 0;
  text-align: center;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.2;
  color: #10224f;
  letter-spacing: -0.02em;
}

.content3 {
  position: absolute;
  width: 78%;
  text-align: center;
  top: 43.2%;
  left: 11%;
  color: #1a1a1a;
}

.title2 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  color: #0011ff;
}

.wenan {
  margin-top: 14px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  color: #1a1a1a;
}

.content {
  position: absolute;
  width: 100%;
  left: 0;
  text-align: center;
  top: 74%;
}

.inputcode {
  width: 78%;
  height: 72px;
  border-radius: 16px;
  border: 2px solid #3ba2bc;
  margin-top: 8px;
  padding: 0 24px;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  background: #eeeeee;
  color: #111;
  outline: none;
}

.inputcode::placeholder {
  color: #8a8a8a;
  font-weight: 600;
}

.start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(560px, 82%);
  height: 78px;
  margin: 22px auto 0;
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, #4eb4ff 0%, #1f93f5 100%);
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(31, 147, 245, 0.35);
}

.anniu {
  animation: pulse2 1s linear infinite;
}

@keyframes pulse2 {
  0% { transform: scale(0.96); }
  50% { transform: scale(1); }
  100% { transform: scale(0.96); }
}

.error {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 24px;
}

.error-content {
  padding: 30px;
  line-height: 1.5;
  word-break: break-word;
  font-size: 30px;
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 10px;
  max-width: 640px;
  text-align: center;
}

.ai-modal {
  position: fixed;
  display: none;
  inset: 0;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  align-items: center;
  background: rgba(28, 58, 88, 0.48);
  backdrop-filter: blur(4px);
  color: #1e3a5f;
  padding: 24px;
}

.ai-progress,
.ai-result {
  width: 100%;
  max-width: 640px;
}

.pro-box,
.result-box {
  position: relative;
  background: linear-gradient(165deg, #ffffff 0%, #f3f9fd 100%);
  border: 1px solid #c9ddea;
  border-radius: 22px;
  padding: 36px 28px 30px;
  margin: 0 auto;
  box-shadow: 0 18px 50px rgba(30, 70, 110, 0.18);
}

.scan-orb {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
}

.scan-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(58, 162, 188, 0.22);
  border-top-color: #3ba2bc;
  animation: spinRing 0.9s linear infinite;
}

.scan-core {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #5ec8e0, #2f8fb0);
  box-shadow: 0 0 18px rgba(59, 162, 188, 0.45);
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.pro-box .title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 26px;
  text-align: center;
}

.pro-box .word {
  font-size: 28px;
  font-weight: 800;
  color: #1e3a5f;
  line-height: 1.3;
}

.pro-box .sub-word {
  font-size: 20px;
  color: #6a8299;
  font-weight: 500;
}

.progress-box .item {
  margin-bottom: 18px;
  text-align: left;
}

.progress-box .item:last-child {
  margin-bottom: 0;
}

.i-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-box .i-title {
  font-size: 22px;
  color: #2f4b66;
  font-weight: 700;
}

.progress-box .i-pct {
  font-size: 20px;
  color: #3ba2bc;
  font-weight: 700;
}

.layui-progress {
  background: #e4eef5;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.layui-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #57c4dd, #3ba2bc 55%, #2f8fb0);
  box-shadow: 0 0 10px rgba(59, 162, 188, 0.35);
  transition: width 0.08s linear;
}

.result-badge {
  display: inline-block;
  margin: 0 auto 14px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(21, 162, 35, 0.12);
  color: #128a20;
  font-size: 20px;
  font-weight: 700;
}

.result-box {
  text-align: center;
  padding-top: 42px;
}

.result-box .title {
  margin-bottom: 16px;
}

.result-box .word {
  font-size: 26px;
  font-weight: 800;
  color: #1e3a5f;
  line-height: 1.45;
}

.result-box #tips-code {
  color: #128a20;
}

.result-con .con {
  font-size: 22px;
  margin-bottom: 22px;
  line-height: 1.65;
  color: #4a5f75;
  text-align: left;
  background: #eef6fb;
  border-radius: 14px;
  padding: 18px 16px;
}

.result-con .btn {
  background: linear-gradient(180deg, #22b833 0%, #15a223 100%);
  color: #fff;
  padding: 16px 18px;
  border-radius: 999px;
  text-align: center;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  font-size: 24px;
  font-weight: 700;
  border: none;
  box-shadow: 0 8px 20px rgba(21, 162, 35, 0.28);
  line-height: 1.3;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e7f1f8;
  border: none;
  color: #3ba2bc;
  font-weight: bold;
  font-size: 34px;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.close-btn:hover {
  background: #3ba2bc;
  color: #fff;
}

.footer {
  width: 100%;
  margin: 0 auto;
  padding: 28px 16px 32px;
  text-align: center;
  font-size: 18px;
  color: #5a6f86;
  background: linear-gradient(180deg, #eaf4fb 0%, #d9ebf7 100%);
  max-width: 720px;
  line-height: 1.7;
  border-top: 1px solid #c5d8e8;
}

.footer a {
  color: #2a6f9a;
  text-decoration: underline;
  margin: 0 8px;
  cursor: pointer;
}

.footer a:hover {
  color: #1a557a;
}

.footer p {
  margin: 10px 0;
}

.legal-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 100000;
  align-items: center;
  justify-content: center;
  background: rgba(20, 45, 70, 0.55);
  padding: 24px;
}

.legal-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 78vh;
  overflow: auto;
  background: #f7fbfe;
  border: 1px solid #c5d8e8;
  border-radius: 14px;
  padding: 48px 28px 28px;
  text-align: left;
  color: #334155;
  box-shadow: 0 12px 40px rgba(30, 70, 110, 0.18);
}

.legal-title {
  font-size: 30px;
  font-weight: 800;
  color: #1e3a5f;
  text-align: center;
  margin-bottom: 18px;
  line-height: 1.3;
}

.legal-body p {
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 14px;
  color: #4a5f75;
}

.legal-body p:last-child {
  margin-bottom: 0;
}

html[dir="rtl"] .close-btn {
  right: auto;
  left: 10px;
}

html[dir="rtl"] .result-con .con,
html[dir="rtl"] .progress-box .item,
html[dir="rtl"] .legal-panel {
  text-align: right;
}
