:root {
    --page-width: min(100%, 580px);
}

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

body {
    font-family: Arial, sans-serif;
    user-select: none;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.fw-container {
    max-width: 880px;
    display: flex;
    margin: 0 auto;
    flex-direction: column;
    padding: 0 10px;
    box-sizing: border-box;
    align-items: stretch;
}

/* 在第一个 banner 的左上角放置thugs-r.png作为 .icon */
.icon {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100px;
    height: 100px;
    background-image: url('/images/thugs-r.png');
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}

/* 页面第一个 Banner：黑色背景，放置thugs-r.png */
.banner {
    background-color: black;
    background-image: url('/images/thugs-r.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center 70%;
    height: 360px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
}

/* 页面第二个 Banner：黑色背景，放置thugs-bg.png */
.second-banner {
    background-color: black;
    background-image: url('/images/thugs-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: auto;
    aspect-ratio: 16 / 9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 10px;
}

@media screen and (max-width: 768px) {
    .second-banner {
        height: auto;
        aspect-ratio: 4 / 3;
    }
}

/* 页面主要内容区域 */
.main-content {
    padding: 20px;
    text-align: center;
}

/* 提交按钮 */
.submit_btn {
    outline: none;
    width: 100%;
    height: 50px;
    background: black;
    color: white;
    border: none;
    line-height: 50px;
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.submit_btn:hover {
    background-color: #333;
}

/* 输入框及相关样式 */
.queryBar {
    display: flex;
    width: 100%;
    margin: 0 auto;
    position: relative;
    height: 50px;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.queryBar:focus-within {
    border-color: #18B84B;
}

/* 提示语位置 */
.tip {
    position: absolute;
    top: 30%;
    left: 12px;
    font-size: 16px;
    color: #777;
    pointer-events: none;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

/* 输入框获得焦点时，提示语上移更远 */
#code:focus + .tip {
    transform: translateY(-200%);
    font-size: 12px;
}

#code::placeholder {
    font-size: 13px;
}

/* 结果内容 */
.result-des {
    font-size: 10px; /* 扩大一倍，从14px改为28px */
    line-height: 1.4;
    font-weight: 500;
    text-align: left;
    flex: 1;
}

/* 输入框数字输入优化 */
#code {
    font-family: monospace;
    letter-spacing: 1px;
}

/* 加载动画优化 */
.loadding {
    position: relative;
    width: 30px;
    height: 30px;
    margin: 0 auto;
}

.loadding span {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* 响应式优化 */
@media screen and (max-width: 768px) {
    .result-des {
        font-size: 18px;
    }
    
    #code {
        font-size: 10px;
    }
}

.result_content {
    min-height: 100px;
    background-color: #FAFAFA;
    width: 100%;
    margin-top: 20px;
    padding: 15px 10px; /* 增加内边距 */
    box-sizing: border-box;
    font-size: 14px;
    position: relative;
    display: flex;
    align-items: center;
}

/* 单个动态图标样式 - 扩大为原来两倍 */
#result-icon {
    width: 56px; /* 扩大为原来28px的两倍 */
    height: 56px; /* 扩大为原来28px的两倍 */
    display: none;
    flex-shrink: 0;
    margin-right: 10px; /* 增加图标与文字的间距 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 动态添加这些类来显示不同图标 - 修复这里！ */
#result-icon.success {
    background-image: url('/images/success-icon.png'); /* 首次成功使用绿色成功图标 */
}

#result-icon.repeat {
    background-image: url('/images/repeat-icon.png'); /* 重复验证使用黄色重复图标 */
}

#result-icon.error {
    background-image: url('/images/error-icon.png'); /* 错误使用红色错误图标 */
}

/* 加载动画 */
.loadding {
    position: relative;
    display: none;
    justify-content: center;
    width: 30px;
    height: 30px;
    animation: demo 0.8s linear infinite;
}

@keyframes demo {
    to { transform: rotateZ(360deg); }
}

/* 关闭按钮 */
.close-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #8A8A8A;
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 5px;
    display: none;
}

.close-icon::before, .close-icon::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 2px;
    background: white;
    top: 0;
    left: 0;
    right: 0;
    margin: auto;
    bottom: 0;
    transform: rotate(45deg);
}

/* 页面底部 */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 30px;
}

.footer p {
    margin: 10px 0;
}

/* 可访问性 */
button, .submit_btn {
    outline: none;
}

button:focus, .submit_btn:focus {
    border: 2px solid #18B84B;
}