/* 全局样式 */
body {
    background-color: #f8f9fa;
    min-height: 100vh;
    background: linear-gradient(135deg, #e0f7fa 0%, #b3e5fc 100%);
    margin: 0;
    padding: 0;
    position: relative;
}

.container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

.btn-query {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(90deg, #e3f0ff 0%, #cbeafe 100%);
    color: #2979ff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1px;
    box-shadow: none;
    transition: background 0.2s, color 0.2s;
}
.btn-query:active, .btn-query:focus {
    background: linear-gradient(90deg, #d0e6ff 0%, #b3e5fc 100%);
    color: #1565c0;
}
.btn-query:disabled {
    opacity: 0.7;
}
.btn-query:focus {
    outline: none;
}
.input-group {
    margin-bottom: 0;
}
.center-card {
    max-width: 600px;
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    background: rgba(255,255,255,0.85);
    padding-top: 1.5rem;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
    margin: 50px auto;
    width: 100%;
}
.center-card svg {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.form-area {
    padding-left: 24px;
    padding-right: 24px;
}
.logo-img {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
}
.brand-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #222;
}
.brand-sub {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 18px;
}
.input-group {
    max-width: 260px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    border-radius: 32px;
    overflow: hidden;
    border: 2.5px solid #cbeafe;
    background: rgba(255,255,255,0.45);
    box-shadow: 0 4px 18px 0 rgba(179,229,252,0.13);
    transition: box-shadow 0.2s, border-color 0.2s;
    height: 54px;
    display: flex;
    align-items: center;
}
.input-group:focus-within {
    border-color: #90caf9;
    box-shadow: 0 6px 24px 0 rgba(144,202,249,0.18);
}
.form-control {
    border: none;
    background: transparent;
    font-size: 1.22rem;
    text-align: center;
    color: #222;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: 32px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.form-control:focus {
    box-shadow: none;
    background: rgba(255,255,255,0.65);
}
.form-control::placeholder {
    color: #b3c6d6;
    opacity: 1;
    font-weight: 400;
    font-size: 1.08rem;
    letter-spacing: 0.5px;
}
.input-group-text {
    background: transparent;
    border: none;
    padding-right: 1rem;
    padding-left: 1.1rem;
    display: flex;
    align-items: center;
}
.input-group-text img {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 1px 2px #e3f2fd);
}
.btn-primary {
    border-radius: 8px;
    background: linear-gradient(90deg, #43cea2 0%, #185a9d 100%);
    border: none;
    font-weight: 600;
    letter-spacing: 1px;
}
.btn-primary:active, .btn-primary:focus {
    background: linear-gradient(90deg, #43cea2 0%, #185a9d 100%);
}
.center-viewport {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
}

.card-body {
    padding: 1.5rem;
}

/* 输入框样式 */
.form-control {
    border-radius: 8px 0 0 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    box-shadow: none;
    border-color: #0d6efd;
}

/* 按钮样式 */
.btn-primary {
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1.5rem;
}

/* 表格样式 */
.table th {
    width: 120px;
    font-weight: 600;
    color: #495057;
}

.table td {
    color: #212529;
}
.global-loading {
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .global-loading .loading-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(200, 220, 255, 0.35);
    backdrop-filter: blur(2px);
  }
  .global-loading .loading-spinner {
    position: relative;
    z-index: 1;
  }
  .not-found-card {
    max-width: 600px;
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    background: rgba(255,255,255,0.85);
    margin: 50px auto;
    padding-top: 3.5rem;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 200px;
    justify-content: space-between;
  }
  .not-found-msg {
    font-size: 1.25rem;
    color: #666;
    font-weight: 600;
    text-align: center;
    flex: 1;
    margin-bottom: 2.5rem;
  }
  .btn-query {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(90deg, #e3f0ff 0%, #cbeafe 100%);
    color: #2979ff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1px;
    box-shadow: none;
    transition: background 0.2s, color 0.2s;
  }

/* 响应式调整 */
@media (max-width: 576px) {
    .center-card {
        max-width: 350px;
    }
    .container {
        padding: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table th {
        width: 100px;
    }
    .not-found-card {
        max-width: 350px;
    }
    #resultCard {
        max-width: 350px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 结果卡片样式 */
#resultCard, .center-card {
    max-width: 1000px;
    margin: 50px auto;
    width: 100%;
}
@media (max-width: 576px) {
    #resultCard, .center-card {
        max-width: 350px;
    }
}
#resultCard .card-body {
    width: 100%;
    padding: 2.5rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.result-header {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1.5rem;
}
.result-icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    vertical-align: middle;
    opacity: 0.85;
}
.result-label {
    font-size: 1.08rem;
    color: #555;
    min-width: 60px;
    font-weight: 500;
}
.result-value {
    font-size: 1.08rem;
    color: #222;
    font-weight: 600;
}
.result-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 1.02rem;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 4px;
    color: #fff;
}
.badge-color-1 { background: #42a5f5; }
.badge-color-2 { background: #66bb6a; }
.badge-color-3 { background: #ffa726; }
.badge-color-4 { background: #ab47bc; }
.badge-color-5 { background: #ef5350; }
.badge-color-6 { background: #26c6da; }
.badge-color-7 { background: #8d6e63; }
.badge-color-8 { background: #789262; }
#resultCard .btn-query {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(90deg, #e3f0ff 0%, #cbeafe 100%);
    color: #2979ff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1px;
    box-shadow: none;
    transition: background 0.2s, color 0.2s;
    margin: 0;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}
#resultCard {
    position: relative;
    padding-bottom: 48px;
}
#resultCard .btn-query:hover {
    background: linear-gradient(90deg, #d0e6ff 0%, #b3e5fc 100%);
    color: #1565c0;
}
@media (max-width: 576px) {
    #resultCard .card-body {
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }
    .result-header {
        font-size: 1.3rem;
    }
    .result-label, .result-value, .result-badge {
        font-size: 0.98rem;
    }
    #resultCard .btn-query {
        font-size: 1rem;
        height: 40px;
    }
}

.db-status #db-dot {
  box-shadow: 0 0 4px rgba(40,167,69,0.3);
}

.credit-score-wrap {
    display: inline-flex;
    align-items: center;
}
.credit-badge {
    margin-left: 10px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.92em;
    font-weight: 600;
}

/* From Uiverse.io by Li-Deheng */ 
.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  --color: hsl(0, 0%, 87%);
  --animation: 2s ease-in-out infinite;
}

.loader .circle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 20px;
  height: 20px;
  border: solid 2px var(--color);
  border-radius: 50%;
  margin: 0 10px;
  background-color: transparent;
  animation: circle-keys var(--animation);
}

.loader .circle .dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color);
  animation: dot-keys var(--animation);
}

.loader .circle .outline {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  animation: outline-keys var(--animation);
}

.circle:nth-child(2) {
  animation-delay: 0.3s;
}

.circle:nth-child(3) {
  animation-delay: 0.6s;
}

.circle:nth-child(4) {
  animation-delay: 0.9s;
}

.circle:nth-child(5) {
  animation-delay: 1.2s;
}

.circle:nth-child(2) .dot {
  animation-delay: 0.3s;
}

.circle:nth-child(3) .dot {
  animation-delay: 0.6s;
}

.circle:nth-child(4) .dot {
  animation-delay: 0.9s;
}

.circle:nth-child(5) .dot {
  animation-delay: 1.2s;
}

.circle:nth-child(1) .outline {
  animation-delay: 0.9s;
}

.circle:nth-child(2) .outline {
  animation-delay: 1.2s;
}

.circle:nth-child(3) .outline {
  animation-delay: 1.5s;
}

.circle:nth-child(4) .outline {
  animation-delay: 1.8s;
}

.circle:nth-child(5) .outline {
  animation-delay: 2.1s;
}

@keyframes circle-keys {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes dot-keys {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes outline-keys {
  0% {
    transform: scale(0);
    outline: solid 20px var(--color);
    outline-offset: 0;
    opacity: 1;
  }

  100% {
    transform: scale(1);
    outline: solid 0 transparent;
    outline-offset: 20px;
    opacity: 0;
  }
}

#loading {
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(200, 220, 255, 0.35); /* 半透明背景 */
    backdrop-filter: blur(2px); /* 模糊效果 */
}

/* 新增的用于强制显示加载动画的类 */
.loading-active {
    display: flex ;
    align-items: center;
    justify-content: center;
}