/* === SMOOTH SCROLLING === */
html {
    scroll-behavior: smooth;
}

/* === RESET & BASE === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
  font-family: var(--layout-font-family, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  background: #f5f5f7;
  min-height: 100vh;
  color: #1d1d1f;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

:root {
  --layout-glass-control-bg: rgba(255, 255, 255, 0.2);
  --layout-glass-control-hover-bg: rgba(255, 255, 255, 0.24);
  --layout-liquid-glass-shadow:
    rgba(242, 242, 242, 0.8) 2px 2px 3px -3px inset,
    rgba(242, 242, 242, 0.8) -2px -2px 3px -3px inset,
    rgba(255, 255, 255, 0.8) -3px -3px 0.8px -3.5px inset,
    rgba(255, 255, 255, 0.8) 3px 3px 0.8px -3.5px inset,
    rgba(0, 0, 0, 0.1) 0 0 8px 0;
}

.main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

h1 {
  font-size: 48px;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(90deg, #0084ff 30%, #ff6600 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 70px rgba(255, 159, 64, 0.9);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.subtitle {
  text-align: center;
  color: #86868b;
  font-size: 21px;
  margin-bottom: 40px;
}

.container {
  background: #ffffff;
  border-radius: 18px;
  padding: clamp(24px, 5vw, 40px);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 12px;
}

.input-with-icon {
  position: relative;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  transition: transform 0.24s ease;
}

.input-with-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(247,248,250,0.72), rgba(232,234,238,0.46) 48%, rgba(220,223,229,0.34)),
    linear-gradient(180deg, rgba(255,255,255,0.16), transparent 22%);
  box-shadow:
    0 12px 24px rgba(120, 128, 140, 0.14),
    0 3px 8px rgba(120, 128, 140, 0.1),
    inset 0 -8px 14px rgba(136, 143, 155, 0.1),
    inset 0 1px 10px rgba(255,255,255,0.16);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  pointer-events: none;
  transition: background 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.input-with-icon:focus-within::before {
  background:
    linear-gradient(180deg, rgba(248,249,251,0.78), rgba(236,238,242,0.58) 52%, rgba(226,229,235,0.44)),
    linear-gradient(180deg, rgba(255,255,255,0.24), transparent 24%);
  box-shadow:
    0 18px 38px rgba(120, 128, 140, 0.18),
    0 6px 14px rgba(120, 128, 140, 0.14),
    inset 0 -8px 14px rgba(136, 143, 155, 0.05),
    inset 0 1px 14px rgba(255,255,255,0.62);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  transform: translateY(-1px);
}

.input-with-icon:hover {
  transform: translateY(-1px);
}

.form-group input {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 58px;
  padding: 16px 18px;
  font-size: 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1d1d1f;
  transition: color 0.2s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder {
  color: rgba(29, 29, 31, 0.52);
}

.form-group input:focus {
  color: #111113;
}

.form-group input.flash {
  color: #111113;
}

.input-with-icon:has(input.flash)::before {
  box-shadow:
    0 12px 24px rgba(255, 59, 48, 0.12),
    inset 0 0 0 2px rgba(255, 59, 48, 0.28);
}

.btn {
  width: 100%;
  min-height: 54px;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 122, 255, 0.9), rgba(0, 113, 227, 0.78)),
    var(--layout-glass-control-bg);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--layout-liquid-glass-shadow);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  transition: all 0.2s ease;
  margin-top: 8px;
}

.btn:hover {
  background:
    linear-gradient(180deg, rgba(0, 128, 255, 0.96), rgba(0, 119, 237, 0.88)),
    var(--layout-glass-control-hover-bg);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.loading {
  display: none;
  text-align: center;
  padding: 32px 0;
}

.loading.show {
  display: block;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid #0071e3;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  font-size: 15px;
  color: #86868b;
}

.captcha-panel {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
}

.captcha-panel[hidden] {
  display: none;
}

.captcha-panel h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 8px;
}

.captcha-panel p {
  font-size: 14px;
  line-height: 1.5;
  color: #6e6e73;
  margin-bottom: 14px;
}

.captcha-warning {
  color: #b54708 !important;
  margin-bottom: 0 !important;
}

.taolink-recaptcha {
  display: flex;
  justify-content: center;
}

.result {
  display: none;
  text-align: center;
  padding: 24px 0;
}

.result.show {
  display: block;
}

.result h3 {
  font-size: 20px;
  font-weight: 600;
  color: #34c759;
  margin-bottom: 20px;
}

.install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 32px;
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 122, 255, 0.9), rgba(0, 113, 227, 0.78)),
    var(--layout-glass-control-bg);
  text-decoration: none;
  border-radius: 999px;
  box-shadow: var(--layout-liquid-glass-shadow);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.install-btn:hover {
  background:
    linear-gradient(180deg, rgba(0, 128, 255, 0.96), rgba(0, 119, 237, 0.88)),
    var(--layout-glass-control-hover-bg);
  transform: translateY(-1px);
}

.note {
    margin-top: 32px;
    padding: 16px;
    background: #fff9e6;
    border-left: 3px solid #ff9500;
    border-radius: 8px;
    font-size: 14px;
    color: #1d1d1f;
    line-height: 1.6;
}

.note strong {
    font-weight: 600;
    color: #ff9500;
}

  .link-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-top: 15px;
  }
  
  #linkText {
    flex: 1;
    word-break: break-all;
    font-size: 0.9em;
    color: #007bff;
  }
  
  .copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: #fff;
    color: #007aff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    box-shadow: var(--layout-liquid-glass-shadow);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
  }
  
  .copy-btn:hover {
    background: #fff;
    color: #007aff;
    transform: scale(1.04);
  }
  
  .copy-btn:active {
    transform: scale(0.95);
  }
  
  .copy-btn.copied {
    background: #fff;
    color: #34c759;
  }
  
  .copy-btn svg {
    display: block;
  }

/* Responsive */
@media (max-width: 640px) {
  .main-wrapper {
    padding: 24px 20px;
    gap: 16px;
  }
    
  h1 {
    font-size: 38px;
    margin-bottom: 0px;
  }

  .subtitle {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .container {
    border-radius: 16px;
  }

  .note {
    font-size: 12px;
  }
}
