/* ============================================================
   证书查询系统 - 前台样式
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Microsoft YaHei', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
    background: #f7f7f7;
    color: #333;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ========== 顶部横幅 ========== */
.TopBanner {
    flex-shrink: 0;
    background: url('../images/topBanner.jpg') center center no-repeat;
    background-size: cover;
    height: 160px;
    position: relative;
}

/* Banner responsive */
@media screen and (min-width: 1921px) {
    .TopBanner { height: 8vw; background-size: 100%; }
}
@media screen and (min-width: 1111px) and (max-width: 1920px) {
    .TopBanner { height: 160px; }
}
@media screen and (min-width: 871px) and (max-width: 1110px) {
    .TopBanner { height: 14.86vw; background-size: cover; }
}
@media screen and (max-width: 870px) {
    .TopBanner { height: 14vw; background-size: cover; }
}

/* ========== 主容器 ========== */
.main {
    flex: 1;
    margin: 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.block {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ========== 区块头部 ========== */
.blockTop {
    height: 55px;
    padding: 0 20px;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

.blockTitle {
    line-height: 50px;
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    border-bottom: 4px solid #1058b9;
    white-space: nowrap;
    position: relative;
    top: 1px;
}

/* ========== 区块底部 ========== */
.blockBottom {
    padding: 30px 20px;
    flex: 1;
}

/* ========== 首页查询选项 ========== */
.query-options {
    display: flex;
    gap: 24px;
    justify-content: center;
    padding: 20px 0;
}

.query-card {
    flex: 1;
    max-width: 280px;
    text-align: center;
    padding: 28px 24px 24px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    color: #333;
}

.query-card:hover {
    border-color: #1058b9;
    box-shadow: 0 2px 12px rgba(16,88,185,0.1);
}

.query-card .icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 26px;
}

.query-card .icon-wrapper.icon-blue {
    background: #e8f0ff;
    color: #1058b9;
}

.query-card .icon-wrapper.icon-orange {
    background: #fff3e0;
    color: #e65100;
}

.query-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.query-card p {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 16px;
}

.query-card .query-btn {
    display: inline-block;
    padding: 7px 28px;
    background: #1058b9;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.query-card:hover .query-btn {
    background: #0d47a1;
}

@media (max-width: 640px) {
    .query-options {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .query-card {
        max-width: 100%;
        width: 100%;
    }
}

/* ========== 非本人查询表单 ========== */
.query-form {
    max-width: 480px;
    margin: 0 auto;
}

.form-item {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 0;
}

.form-item .form-label {
    width: 100px;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    text-align: right;
    padding-right: 16px;
    flex-shrink: 0;
    line-height: 40px;
}

.form-item .form-input {
    flex: 1;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
    background: #fff;
}

.form-item .form-input:focus {
    border-color: #1058b9;
    box-shadow: 0 0 0 3px rgba(16,88,185,0.08);
}

.form-item .form-input::placeholder {
    color: #bbb;
}

.form-item.submit-area {
    padding-left: 100px;
}

.form-item .submit-btn {
    display: inline-block;
    padding: 10px 52px;
    background: #1058b9;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    letter-spacing: 4px;
}

.form-item .submit-btn:hover {
    background: #0d47a1;
    box-shadow: 0 2px 8px rgba(16,88,185,0.3);
}

.form-item .submit-btn:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    box-shadow: none;
}

/* ========== 本人查询 - 手机验证码登录 ========== */
.phone-login {
    max-width: 420px;
    margin: 0 auto;
}

.phoneTitle {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    text-align: center;
}

.login-item {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 0;
}

.login-item .login-label {
    width: 90px;
    font-size: 15px;
    color: #333;
    text-align: right;
    padding-right: 12px;
    flex-shrink: 0;
    line-height: 40px;
    font-weight: 400;
}

.login-item .login-input {
    flex: 1;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
}

.login-item .login-input:focus {
    border-color: #1058b9;
    box-shadow: 0 0 0 3px rgba(16,88,185,0.08);
}

.login-item .login-input::placeholder {
    color: #bbb;
}

.login-item .code-input {
    flex: 1;
    border-radius: 4px 0 0 4px;
}

.login-item .send-code-btn {
    height: 40px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: #1058b9;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    font-family: inherit;
}

.login-item .send-code-btn:hover {
    color: #0d47a1;
    border-color: #1058b9;
}

.login-item .send-code-btn:disabled {
    color: #d9d9d9;
    cursor: not-allowed;
    border-color: #d9d9d9;
}

.login-item.login-btn-area {
    padding-left: 90px;
}

.login-item .login-btn {
    padding: 10px 52px;
    background: #1058b9;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    letter-spacing: 4px;
}

.login-item .login-btn:hover {
    background: #0d47a1;
}

/* ========== 提示信息 ========== */
.notice {
    padding: 20px 30px;
    background: #fafafa;
    border-top: 1px solid #f2f2f2;
}

.notice h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.notice p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.notice a {
    color: #3578cf;
    text-decoration: none;
}

.notice a:hover {
    text-decoration: underline;
}

/* ========== 查询结果样式（deprecated - 现由 queryDetail.php 独立页面展示） ========== */
.result-container {
    padding: 24px;
    text-align: center;
}

.result-not-found {
    padding: 60px 20px;
    text-align: center;
}

.result-not-found .not-found-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.result-not-found h2 {
    font-size: 20px;
    color: #999;
    font-weight: 500;
}

/* 证书结果横排卡片 */
.cert-result-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 680px;
}

.cert-result-header {
    background: linear-gradient(135deg, #1058b9, #1a6bd6);
    color: #fff;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
}

.cert-result-body {
    padding: 0;
}

/* 横排字段行 */
.cert-field-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
}

.cert-field-row:last-child {
    border-bottom: none;
}

.cert-field-label {
    width: 130px;
    flex-shrink: 0;
    padding: 14px 16px;
    background: #fafafa;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-align: right;
    border-right: 1px solid #f0f0f0;
}

.cert-field-value {
    flex: 1;
    padding: 14px 16px;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    text-align: left;
}

.cert-result-actions {
    text-align: center;
    padding: 20px 0 0;
}

.back-link {
    display: inline-block;
    margin: 0 6px;
    padding: 8px 24px;
    border: 1px solid #1058b9;
    border-radius: 4px;
    color: #1058b9;
    font-size: 14px;
    transition: all 0.3s;
    background: #fff;
}

.back-link:hover {
    background: #1058b9;
    color: #fff;
}

/* 脱敏文字样式 */
.masked-id {
    font-family: 'Consolas', 'Courier New', monospace;
    letter-spacing: 2px;
}

/* 移动端适配 - 查询结果卡片 */
@media screen and (max-width: 640px) {
    .cert-result-card {
        max-width: 100%;
        border-radius: 6px;
    }
    .cert-result-header {
        padding: 14px 16px;
        font-size: 15px;
        letter-spacing: 1px;
    }
    .cert-field-label {
        width: 80px;
        padding: 12px 10px;
        font-size: 13px;
    }
    .cert-field-value {
        padding: 12px 10px;
        font-size: 14px;
        word-break: break-all;
    }
    .cert-result-actions {
        padding: 16px 0 0;
    }
    .cert-result-actions .back-link {
        padding: 8px 16px;
        font-size: 13px;
        margin: 0 4px;
    }
}

/* ========== 加载状态 ========== */
.loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top-color: #1058b9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* ========== 底部 ========== */
.bottom {
    flex-shrink: 0;
    padding: 24px 20px;
    text-align: center;
    background: #0854bc;
    color: #fff;
    font-size: 14px;
}

.bottom .bottom-content {
    display: inline-block;
    vertical-align: middle;
    text-align: center;
}

.bottom .bottom-content a {
    color: #fff;
    font-size: 14px;
    margin-bottom: 6px;
    display: inline-block;
}

.bottom .bottom-content a:hover {
    text-decoration: underline;
}

.bottom .bottom-content p {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.85;
}

.bottom .bottom-img {
    display: inline-block;
    vertical-align: middle;
    margin-left: 16px;
}

.bottom .bottom-img img {
    width: 48px;
    height: 48px;
    vertical-align: middle;
}

@media (max-width: 870px) {
    .bottom { font-size: 12px; }
    .blockBottom { padding: 20px 16px; }
    .blockTop { margin: 0 16px; }
    .notice { padding: 16px; }
    .form-item .form-label { 
        width: 70px; 
        font-size: 14px;
    }
    .form-item.submit-area { padding-left: 70px; }
    .query-form { max-width: 100%; }
}
