/* ===== Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC",
    "Microsoft JhengHei", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #1c1d33;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

/* ===== App container (mobile centered) ===== */
.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: #1c1d33;
  overflow: hidden;
}

/* ===== Top background image (cube) ===== */
.page-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  height: 420px;
  background: url("../assets/bg.png") no-repeat center 20%;
  background-size: 100% auto;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.55) 65%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.55) 65%,
    transparent 100%
  );
}

/* ===== Top bar (back + language) ===== */
.top-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  height: 50px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #ffffff;
  font-size: 22px;
}

.back-btn svg {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  stroke-width: 2.4;
  fill: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fadf26;
  font-size: 15px;
  font-weight: 500;
}

.lang-switch .triangle {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #fadf26;
  margin-left: 2px;
}

/* ===== Logo + company ===== */
.logo-section {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 70px;
}

.logo {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.logo img {
  width: 78px;
  height: auto;
  display: block;
}

.company-name {
  margin-top: 18px;
  color: #fadf26;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* ===== Form card ===== */
.form-card {
  position: relative;
  z-index: 2;
  margin: 26px 14px 0;
  padding: 24px 18px 22px;
  background: rgba(60, 60, 80, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 16px;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 22px;
  padding: 0 10px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 16px;
  color: #9b9bad;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.tab.active {
  color: #fadf26;
  font-weight: 700;
}

/* Tab content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Inputs */
.input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 14px 18px;
  margin-bottom: 14px;
  min-height: 50px;
}

.input-group .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #fadf26;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.input-group .icon svg {
  width: 100%;
  height: 100%;
  stroke: #fadf26;
  fill: none;
  stroke-width: 1.8;
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 15px;
  min-width: 0;
}

.input-group input::placeholder {
  color: #aeaebd;
}

.input-group .eye {
  width: 22px;
  height: 22px;
  color: #ffffff;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.input-group .eye svg {
  width: 100%;
  height: 100%;
  stroke: #ffffff;
  fill: none;
  stroke-width: 1.6;
}

/* Phone prefix */
.phone-prefix {
  color: #ffffff;
  font-size: 15px;
  padding-right: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  margin-right: 4px;
}

/* Captcha value */
.captcha-text {
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 1px;
  user-select: none;
}

/* ===== Submit button ===== */
.submit-btn {
  display: block;
  width: calc(100% - 28px);
  margin: 26px 14px 18px;
  padding: 16px;
  background: #fadf26;
  color: #2a2a2a;
  border-radius: 40px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  transition: opacity 0.2s, transform 0.05s;
}

.submit-btn:active {
  transform: scale(0.99);
  opacity: 0.9;
}

/* ===== Footer link ===== */
.footer-link {
  text-align: center;
  color: #d6d6e0;
  font-size: 14px;
  margin: 6px 0 24px;
}

.footer-link a {
  color: #fadf26;
  font-weight: 600;
  margin-left: 4px;
}

/* ===== Language page ===== */
.lang-top-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lang-top-bar .back-btn {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.lang-top-bar .title {
  font-size: 17px;
  color: #ffffff;
  font-weight: 500;
}

.lang-list {
  margin: 18px 14px;
  background: rgba(60, 60, 80, 0.45);
  border-radius: 16px;
  padding: 6px 0;
}

.lang-item {
  position: relative;
  padding: 17px 22px;
  font-size: 15px;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
  direction: ltr;
  unicode-bidi: plaintext;
}

.lang-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 1px;
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 50%
  );
  background-size: 8px 1px;
  background-repeat: repeat-x;
}

.lang-item:hover,
.lang-item.active {
  color: #fadf26;
}

/* ===== Modal (success / warning alerts) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: modal-fade 0.18s ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  width: 78%;
  max-width: 320px;
  padding: 28px 24px 22px;
  background: #2a2b46;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  animation: modal-pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes modal-pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: #fadf26;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon svg {
  width: 32px;
  height: 32px;
}

.modal-msg {
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 22px;
  line-height: 1.45;
  font-weight: 500;
}

.modal-btn {
  display: inline-block;
  min-width: 120px;
  padding: 10px 28px;
  background: #fadf26;
  color: #2a2a2a;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.modal-btn:active {
  transform: scale(0.98);
}

/* Scrollbar (subtle) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
