/* ============================================================
   CCProxy 用户首页
   ============================================================ */

body.ccproxy-home {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--cc-color-text);
  background:
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 48%, #f4f6f9 100%),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.03) 0 1px, transparent 1px 48px);
}

body.ccproxy-home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.42) 42%, transparent 64%);
  opacity: 0.7;
  transform: translateX(-60%);
  animation: ccLineSweep 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.ccproxy-home .layui-container {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-width: 560px;
  padding: 24px 16px 28px;
  margin: 0 auto;
  animation: ccFadeUp var(--cc-duration-normal) var(--cc-ease-out) both;
}

.ccproxy-home .layui-logo {
  padding: 8px 0 14px;
  text-align: center;
  animation: ccSoftPop 320ms var(--cc-ease-out) both;
}

.ccproxy-home .layui-logo .layui-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ccproxy-home .wz-title h1 {
  margin: 0 0 16px;
  color: var(--cc-color-text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  animation: ccSoftPop 360ms var(--cc-ease-out) 40ms both;
}

.ccproxy-home .img {
  display: flex;
  justify-content: center;
}

.ccproxy-home .img img {
  width: auto;
  max-width: 168px;
  height: auto;
  max-height: 168px;
  object-fit: contain;
  border: 1px solid var(--cc-color-border-soft);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-color-surface);
  box-shadow: var(--cc-shadow-sm);
  transition: transform var(--cc-duration-normal) var(--cc-ease-out), box-shadow var(--cc-duration-normal) var(--cc-ease-out), border-color var(--cc-duration-fast) ease;
  animation: ccSoftPop 420ms var(--cc-ease-spring) 80ms both;
}

.ccproxy-home .img img:hover {
  border-color: var(--cc-color-primary-border);
  box-shadow: var(--cc-shadow-md);
  transform: translateY(-2px) scale(1.015);
}

.ccproxy-home .cer {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 8px;
  width: min(100%, 380px);
  margin: 18px auto 0;
  float: none !important;
  text-align: center;
  animation: ccSoftPop 380ms var(--cc-ease-out) 120ms both;
}

.ccproxy-home .cer .buwz {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  width: auto;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--cc-color-border);
  border-radius: var(--cc-radius-lg);
  color: var(--cc-color-text-secondary) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: var(--cc-shadow-xs);
  transition: background-color var(--cc-duration-fast) ease, border-color var(--cc-duration-fast) ease, color var(--cc-duration-fast) ease, transform var(--cc-duration-fast) ease;
}

.ccproxy-home .cer .buwz:hover {
  color: var(--cc-color-primary) !important;
  border-color: var(--cc-color-primary-border);
  background: var(--cc-color-primary-soft) !important;
  transform: translateY(-1px);
}

.ccproxy-home .cer .buwz:active {
  transform: translateY(1px);
}

.ccproxy-home .cer .layui-icon {
  font-size: 16px;
  transition: transform var(--cc-duration-fast) var(--cc-ease-out);
}

.ccproxy-home .cer .buwz:hover .layui-icon {
  transform: translateY(-1px) scale(1.08);
}

.ccproxy-home .main {
  position: relative;
  overflow: hidden;
  padding: 18px;
  margin-top: 18px;
  border: 1px solid var(--cc-color-border-soft);
  border-radius: var(--cc-radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--cc-shadow-md);
  animation: ccSoftPop 420ms var(--cc-ease-out) 160ms both;
}

.ccproxy-home .main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.28), transparent);
  transform: translateX(-110%);
  animation: ccLineSweep 2.8s var(--cc-ease-out) 260ms both;
}

.ccproxy-home .home-tabs {
  margin: 0 !important;
}

.ccproxy-home .layui-tab-title {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: auto;
  border: 1px solid var(--cc-color-border-soft);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-color-surface-muted);
  overflow: hidden;
}

.ccproxy-home .layui-tab-title li {
  min-width: 0;
  padding: 0 6px;
  color: var(--cc-color-text-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 42px;
  white-space: nowrap;
  transition: color var(--cc-duration-fast) ease, background-color var(--cc-duration-fast) ease, box-shadow var(--cc-duration-normal) ease, transform var(--cc-duration-fast) ease;
}

.ccproxy-home .layui-tab-title li::after {
  display: none;
}

.ccproxy-home .layui-tab-title li:hover {
  color: var(--cc-color-text-secondary);
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.ccproxy-home .layui-tab-title .layui-this {
  color: var(--cc-color-primary);
  background: #ffffff;
  box-shadow: inset 0 -2px 0 var(--cc-color-primary);
  animation: ccSoftPop 180ms var(--cc-ease-out) both;
}

.ccproxy-home .layui-tab-content {
  padding: 18px 0 0;
}

.ccproxy-home .layui-tab-content .layui-tab-item.layui-show {
  animation: ccSoftPop 220ms var(--cc-ease-out) both;
}

.ccproxy-home .layui-tab-item.layui-show > .layui-input-block,
.ccproxy-home .layui-tab-item.layui-show > .query-type-switch {
  animation: ccFadeUp 260ms var(--cc-ease-out) both;
}

.ccproxy-home .layui-tab-item.layui-show > :nth-child(2) {
  animation-delay: 45ms;
}

.ccproxy-home .layui-tab-item.layui-show > :nth-child(3) {
  animation-delay: 90ms;
}

.ccproxy-home .layui-tab-item.layui-show > :nth-child(4) {
  animation-delay: 135ms;
}

.ccproxy-home .layui-tab-item.layui-show > :nth-child(5) {
  animation-delay: 180ms;
}

.ccproxy-home .layui-input-block {
  height: auto !important;
  margin: 0 0 12px !important;
  padding: 0;
  line-height: normal !important;
}

.ccproxy-home .field-label {
  display: block;
  margin: 0 0 6px;
  color: var(--cc-color-text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  transition: color var(--cc-duration-fast) ease, transform var(--cc-duration-fast) ease;
}

.ccproxy-home .layui-input-block:focus-within .field-label {
  color: var(--cc-color-primary);
  transform: translateX(2px);
}

.ccproxy-home .inputs {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--cc-color-border);
  border-radius: var(--cc-radius-lg);
  color: var(--cc-color-text);
  background: var(--cc-color-surface-muted);
  font-size: 15px;
  transition: border-color var(--cc-duration-fast) ease, background-color var(--cc-duration-fast) ease, box-shadow var(--cc-duration-fast) ease, transform var(--cc-duration-fast) ease;
  -webkit-appearance: none;
}

.ccproxy-home .inputs::placeholder {
  color: #9aa4b2;
}

.ccproxy-home .inputs:hover {
  border-color: #c8d2df;
  background: #ffffff;
}

.ccproxy-home .inputs:focus {
  border-color: var(--cc-color-primary);
  background: #ffffff;
  box-shadow: var(--cc-focus-ring);
  outline: none;
  transform: translateY(-1px);
}

.ccproxy-home .submit {
  margin-top: 16px !important;
  text-align: center;
}

.ccproxy-home .submit .layui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: var(--cc-radius-lg);
  color: #ffffff;
  background: var(--cc-color-primary) !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16);
  transition: background-color var(--cc-duration-fast) ease, transform var(--cc-duration-fast) ease, box-shadow var(--cc-duration-fast) ease;
}

.ccproxy-home .submit .layui-btn:hover {
  background: var(--cc-color-primary-hover) !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.ccproxy-home .submit .layui-btn:active {
  transform: translateY(1px);
}

.ccproxy-home .query-type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--cc-color-border-soft);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-color-surface-muted);
}

.ccproxy-home .query-type-btn {
  min-height: 38px;
  border: 0;
  border-radius: var(--cc-radius-md);
  color: var(--cc-color-text-muted);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--cc-duration-fast) ease, color var(--cc-duration-fast) ease, box-shadow var(--cc-duration-fast) ease;
}

.ccproxy-home .query-type-btn.active,
.ccproxy-home .query-type-btn.is-active {
  color: var(--cc-color-primary);
  background: #ffffff;
  box-shadow: var(--cc-shadow-xs);
  animation: ccSoftPop 180ms var(--cc-ease-out) both;
}

.ccproxy-home .app-pills-label {
  margin-bottom: 8px;
  color: var(--cc-color-text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.ccproxy-home .app-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 0 0 4px;
}

.ccproxy-home .app-pill {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--cc-color-border);
  border-radius: var(--cc-radius-md);
  color: var(--cc-color-text-secondary);
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--cc-duration-fast) ease, border-color var(--cc-duration-fast) ease, color var(--cc-duration-fast) ease, transform var(--cc-duration-fast) ease;
}

.ccproxy-home .app-pill:hover {
  border-color: var(--cc-color-primary-border);
  color: var(--cc-color-primary);
  background: var(--cc-color-primary-soft);
  transform: translateY(-1px);
}

.ccproxy-home .app-pill.active,
.ccproxy-home .app-pill.is-active {
  border-color: var(--cc-color-primary);
  color: #ffffff;
  background: var(--cc-color-primary);
  animation: ccSoftPop 180ms var(--cc-ease-spring) both;
}

.ccproxy-home .app-pills-empty {
  width: 100%;
  padding: 12px;
  border: 1px dashed var(--cc-color-border);
  border-radius: var(--cc-radius-lg);
  color: var(--cc-color-text-muted);
  background: var(--cc-color-surface-muted);
  font-size: 13px;
  text-align: center;
}

.ccproxy-home .query-account-field,
.ccproxy-home .query-kami-field {
  will-change: opacity, transform;
}

.ccproxy-home .query-field-active {
  animation: ccFadeUp 180ms var(--cc-ease-out) both;
}

.ccproxy-home .query-kami-field {
  display: none;
}

.ccproxy-home .time {
  width: 100%;
  margin: 14px auto;
}

.ccproxy-home .query-result {
  padding: 14px;
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--cc-radius-lg);
  color: var(--cc-color-text);
  background: var(--cc-color-success-soft);
  font-size: 14px;
  line-height: 1.8;
  animation: ccSoftPop 240ms var(--cc-ease-spring) both;
}

.ccproxy-home .query-result-label {
  display: block;
  margin-bottom: 8px;
  color: var(--cc-color-success);
  font-size: 12px;
  font-weight: 700;
}

.ccproxy-home .query-result-content {
  display: grid;
  gap: 8px;
}

.ccproxy-home .query-result-row {
  display: grid;
  grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: var(--cc-radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.ccproxy-home .query-result-name {
  color: var(--cc-color-text-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ccproxy-home .query-result-value {
  min-width: 0;
  color: var(--cc-color-text);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.ccproxy-home .password-strength {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.ccproxy-home .password-strength-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--cc-color-border-soft);
}

.ccproxy-home .password-strength-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--cc-color-text-muted);
  transition: width var(--cc-duration-slow) var(--cc-ease-out), background-color var(--cc-duration-normal) ease;
}

.ccproxy-home .password-strength-bar.weak {
  width: 34%;
  background: var(--cc-color-danger);
}

.ccproxy-home .password-strength-bar.medium {
  width: 66%;
  background: var(--cc-color-warning);
}

.ccproxy-home .password-strength-bar.strong {
  width: 100%;
  background: var(--cc-color-success);
}

.ccproxy-home .password-strength-text {
  color: var(--cc-color-text-muted);
  font-size: 12px;
}

.ccproxy-home .layui-footer {
  min-height: 16px;
  padding: 18px 0 0;
  color: var(--cc-color-text-muted);
  font-size: 12px;
  text-align: center;
}

.ccproxy-home .swal-modal {
  border-radius: var(--cc-radius-lg);
}

.ccproxy-home .swal-button {
  border-radius: var(--cc-radius-md);
  background: var(--cc-color-primary);
}

@media screen and (max-width: 480px) {
  .ccproxy-home .layui-container {
    padding: 16px 12px 22px;
  }

  .ccproxy-home .wz-title h1 {
    font-size: 21px;
  }

  .ccproxy-home .img img {
    max-width: 132px;
    max-height: 132px;
  }

  .ccproxy-home .main {
    padding: 14px;
  }

  .ccproxy-home .layui-tab-title li {
    font-size: 13px;
    line-height: 40px;
  }

  .ccproxy-home .cer {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px;
    width: 100%;
    max-width: 100%;
  }

  .ccproxy-home .cer .buwz {
    flex: 1 1 0;
    width: auto;
    min-height: 42px;
    padding: 0 8px;
    gap: 4px;
    font-size: 13px;
  }

  .ccproxy-home .cer .layui-icon {
    font-size: 15px;
  }
}

@media screen and (max-width: 360px) {
  .ccproxy-home .layui-tab-title li {
    font-size: 12px;
  }

  .ccproxy-home .inputs,
  .ccproxy-home .submit .layui-btn {
    font-size: 14px;
  }

  .ccproxy-home .cer .buwz {
    padding: 0 6px;
    font-size: 12px;
  }
}
