body {
    -webkit-user-select: none;
    user-select: none;
}

/* --- Banner 布局 (解决重叠) --- */
.banner-wrapper {
    height: 350px;
    display: flex;
    flex-direction: column;
}

.top-left-logo {
    padding: 15px 0 0 15px;
    height: 80px;
}

.top-left-logo img {
    height: 100%;
    max-width: 130px;
    object-fit: contain;
}

.hero-center-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px 20px 20px;
}

.hero-image {
    width: 100%;
    height: 100%;
    background: url('../images/thugs-r.png') no-repeat center center;
    background-size: contain;
    /* 图片自动缩放，绝不超出容器 */
}

/* 装饰 Banner */
.second-banner {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: url('../images/thugs-bg.png') no-repeat center center;
    background-size: cover;
}

/* --- Input 动画还原 --- */
.input-group-custom {
    height: 60px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: white;
    transition: all 0.2s ease;
    overflow: hidden;
}

.input-group-custom:focus-within {
    border-color: #18b84b8c;
    box-shadow: 0 0 0 3px rgba(24, 184, 75, 0.1);
}

.query-bar-group {
    height: 100%;
}

.custom-input {
    border: none !important;
    padding: 24px 45px 8px 12px;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    background: transparent;
}

.btn-qr-scan {
    width: 60px;
    border: none;
    border-left: 1px solid #f0f0f0;
    background-color: #f8f9fa;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background-color 0.2s;
    border-radius: 0;
}

.btn-qr-scan:hover {
    background-color: #e9ecef;
    color: #000;
}

.custom-label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #adb5bd;
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 15px;
}

/* 浮动逻辑 */
.custom-input:focus~.custom-label,
.custom-input:not(:placeholder-shown)~.custom-label {
    top: 14px;
    font-size: 11px;
    font-weight: bold;
}

/* --- Full Screen Scanner --- */
.full-screen-scanner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999; /* Higher than bootstrap tooltips */
    display: none;
    justify-content: center;
    align-items: center;
}

.scanner-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
    position: relative;
}

#reader {
    width: 100% !important;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(24, 184, 75, 0.5) !important;
}

/* Override html5-qrcode styles for cleaner look */
#reader __scan_region_expander_img__{
    display: none !important;
}
#reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.scanner-close-btn {
    position: absolute;
    top: 30px;
    right: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1100;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: background 0.2s;
}

.scanner-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .banner-wrapper {
        height: 220px;
    }

    .top-left-logo {
        height: 60px;
    }

    .second-banner {
        aspect-ratio: 4 / 3;
    }

    .custom-input {
        font-size: 16px;
    }

    .input-group-custom {
        height: 55px;
    }
    .scanner-container {
        height: 100%;
        padding: 0;
        max-width: 100%;
    }
    #reader {
        height: 100% !important;
        border-radius: 0;
        border: none !important;
    }
    #reader video {
        height: 100% !important;
    }
}