.security-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px 20px; /* 增加顶部间距 */
    background-image: url('../img/security-web-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.security-content {
    width: 100%;
    max-width: 560px;
}

.security-form {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

.security-title {
    font-weight: 600;
    font-size: 36px;
    color: #111111;
    text-align: center;
}

.security-title span {
    color: #0277D4;
}

.security-description {
    font-size: 15px;
    color: #7f8c8d;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
    text-align: left;
}

.input-wrapper {
    display: flex;
    align-items: center;
}

.input-icon-wrapper {
    position: absolute;
    left: 16px;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon {
    width: 22px;
    height: 22px;
    color: #95a5a6;
    transition: color 0.3s ease;
}

.input-wrapper .security-input {
    padding-left: 52px;
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.error-message img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.error-message.show {
    display: flex;
}

.security-input,
.captcha-input {
    width: 100%;
    height: 56px;
    padding: 0 20px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    font-size: 16px;
    color: #2c3e50;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-weight: 500;
}

.captcha-input {
    padding-left: 52px;
    text-indent: 20px;
}

.input-wrapper .security-input {
    padding-left: 52px;
}

.security-input:focus,
.captcha-input:focus {
    outline: none;
    border-color: #0277D4;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.security-input:focus+.input-icon-wrapper .input-icon,
.captcha-input:focus+.input-icon-wrapper .input-icon {
    color: #0277D4;
}

.captcha-group {
    margin-bottom: 40px;
}

.captcha-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.captcha-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.captcha-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.refresh-captcha {
    font-weight: 400;
    font-size: 14px;
    color: #0277D4;
    display: inline-block;
    width: 80px;
}

#idcode {
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.3s ease;
    min-width: 100px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 8px;
    background: #fff;
}

#idcode:hover {
    opacity: 0.8;
    border-color: #007bff;
}

    #idcode .ehong-idcode-val {
        height: 44px;
        line-height: 44px;
        min-width: 100px;
        text-align: center;
        font-size: 18px;
        display: inline-block;
    }

#captcha-container #ehong-code-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#captcha-container .ehong-code-val-tip {
    color: #007bff;
    font-size: 14px;
    margin-left: 5px;
}

.captcha-input {
    flex: 1;
    height: 50px;
    padding: 0 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.captcha-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.captcha-img {
    width: 100px;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.captcha-img:hover {
    border-color: #007bff;
}

.button-group {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.reset-btn {
    flex: 1;
    height: 56px;
    background: #fff;
    color: #7f8c8d;
    border: 1px solid #ecf0f1;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    line-height: 40px;
}

.reset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.reset-btn:hover::before {
    left: 100%;
}

.query-btn {
    flex: 1;
    height: 56px;
    background-color: #0277D4;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    line-height: 40px;
}

.query-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.query-btn:hover::before {
    left: 100%;
}


.query-btn:active {
    transform: translateY(-1px);
}

.query-btn:disabled {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.query-btn:disabled::before {
    display: none;
}

.btn-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.reset-btn .btn-icon {
    color: #7f8c8d;
}

.query-btn .btn-icon {
    color: white;
}

.reset-btn:hover .btn-icon,
.query-btn:hover .btn-icon {
    transform: scale(1.1);
}

/* 结果容器样式 */
.result-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    animation: fadeInUp 0.5s ease;
    opacity: 0.8;
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.result-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.result-info {
    text-align: center;
}

.result-code {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.result-code span {
    color: #333;
    font-weight: 600;
}

.result-message {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #555;
}

.back-btn {
    padding: 12px 30px;
    background: #f8f9fa;
    color: #0277D4;
    border: 1px solid #0277D4;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 加载动画 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .security-container {
        padding: 20px 15px;
        min-height: calc(100vh - 120px);
    }

    .security-content {
        max-width: 100%;
    }

    .security-form {
        padding: 40px 25px;
        margin: 0 10px;
        border-radius: 16px;
    }

    .security-title {
        font-size: 30px;
        letter-spacing: 0.5px;
        margin-bottom: 10px;
    }

    .security-description {
        font-size: 14px;
        margin-bottom: 32px;
    }

    .captcha-row {
        flex-direction: row;
        gap: 12px;
        align-items: center;
    }

    .captcha-display {
        justify-content: center;
        flex-shrink: 0;
    }

    .button-group {
        flex-direction: row;
        gap: 12px;
        margin-top: 28px;
    }

    .reset-btn,
    .query-btn {
        height: 52px;
        font-size: 15px;
        border-radius: 12px;
    }

    .btn-icon {
        width: 18px;
        height: 18px;
    }

    .security-input,
    .captcha-input {
        height: 52px;
        font-size: 15px;
        border-radius: 10px;
    }

    .input-icon {
        width: 20px;
        height: 20px;
    }

    .input-wrapper .security-input {
        padding-left: 48px;
    }
    
    .refresh-icon {
        width: 14px;
        height: 14px;
    }

    #captcha-container .ehong-idcode-val {
        height: 52px;
        line-height: 50px;
        min-width: 90px;
        font-size: 16px;
    }

    #captcha-container #ehong-code-input {
        height: 52px;
        font-size: 15px;
        border-radius: 10px;
    }

    .result-container {
        padding: 35px 25px;
        margin: 0 10px;
        border-radius: 16px;
    }

    .result-icon {
        width: 100px;
        height: 100px;
    }

    .result-code {
        font-size: 16px;
    }

    .result-message {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* 手机端背景图设置 */    
    .security-container {
        padding: 60px 10px 15px 10px; /* 增加顶部间距 */
        background-image: url('../img/security-h5-bg.png');
        background-size: 100% 100%;
    }

    .security-form {
        padding: 30px 20px;
        margin: 0 5px;
        border-radius: 14px;
    }

    .security-title {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .security-description {
        font-size: 13px;
        margin-bottom: 28px;
    }

    .captcha-row {
        gap: 10px;
        align-items: center;
    }

    .captcha-input-wrapper {
        flex: 1;
        min-width: 0;
    }

    .captcha-display {
        flex-shrink: 0;
    }

    .security-input,
    .captcha-input {
        height: 48px;
        font-size: 14px;
        border-radius: 8px;
        padding: 0 16px;
    }

    .input-wrapper .security-input {
        padding-left: 44px;
    }

    .input-icon {
        width: 18px;
        height: 18px;
    }

    .input-icon-wrapper {
        left: 14px;
    }

    .button-group {
        gap: 10px;
        margin-top: 24px;
        flex-direction: row;
    }

    .reset-btn,
    .query-btn {
        height: 48px;
        font-size: 14px;
        border-radius: 10px;
    }

    .btn-icon {
        width: 16px;
        height: 16px;
    }

    .refresh-icon {
        width: 12px;
        height: 12px;
    }

    #captcha-container .ehong-idcode-val {
        height: 48px;
        line-height: 46px;
        min-width: 80px;
        font-size: 14px;
    }

    #captcha-container #ehong-code-input {
        height: 48px;
        font-size: 14px;
        border-radius: 8px;
    }

    #captcha-container {
        gap: 8px;
    }
}

/* 错误状态样式 */
.security-input.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* 成功状态样式 */
 .result-message.success {
    color: #28a745;
}

 .result-message.warning {
    color: #ffc107;
}

 .result-message.danger {
    color: #dc3545;
}

/* 状态展示区域样式 */
.status-demo {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    margin-top: 20px;
}

.status-demo h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.demo-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.success-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.success-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.warning-btn {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.warning-btn:hover {
    background: linear-gradient(135deg, #e0a800, #e8590c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.error-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.error-btn:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* 响应式设计 - 状态展示区域 */
@media (max-width: 768px) {
    .status-demo {
        padding: 20px;
        margin: 20px 10px 0;
    }

    .demo-buttons {
        flex-direction: column;
        align-items: center;
    }

    .demo-btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .status-demo {
        padding: 15px;
        margin: 15px 5px 0;
    }

    .status-demo h3 {
        font-size: 18px;
    }
}

.ehong-code-val-tip {
    display: none;
}

/* 手机端隐藏元素 */
@media (max-width: 768px) {
    .desktop-only{
        display: none;
    }
    .button-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .query-btn {
        order: -1; /* 查询按钮在上面 */
        width: 100%;
        min-width: auto;
    }
    
    .reset-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .button-group {
        gap: 10px;
    }
}