/* 全局样式 - 核心适配修改 */
body {
    background-image: url("../图片/retouch_2025100604023242.jpg");
    background-repeat: no-repeat; 
    background-size: cover;
    background-position: center; 
    background-attachment: fixed;
    text-align: center;
    margin: 0;
    padding-top: 70px; /* 增加导航栏预留空间 */
    overflow-x: hidden; /* 防止移动端横向滚动 */
}

/* 标题样式 - 响应式字体 */
h1{
    background-color: rgba(178, 193, 134,0.6);
    color: brown;
    text-align: center;
    font-size: clamp(20px, 5vw, 30px); /* 响应式字体 */
    border-radius: 20px;
    padding: 10px 20px;
    display: inline-block;
    margin: 0 10px; /* 移动端左右边距 */
}

/* 表单容器 - 核心：移除固定宽度，改为自适应 */
.box{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px; /* 改为最小高度，适配内容 */
    width: 90%; /* 占屏幕90%宽度 */
    max-width: 800px; /* 桌面端最大宽度 */
    background-color: rgba(238, 248, 248,0.8);
    border-radius: 40px;
    margin: 50px auto;
    padding: 20px;
    box-sizing: border-box;
}

.box form {
    width: 100%;
    max-width: 400px;
}

/* 表单行 - 适配移动端换行 */
.form-row {
    display: flex;
    flex-wrap: wrap; /* 移动端允许换行 */
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 15px;
}

/* 表单标签 - 移动端适配 */
.form-row label {
    width: 80px; /* 移动端缩小标签宽度 */
    min-width: 80px; /* 保证最小宽度 */
    text-align: right;
    margin-right: 10px;
    font-size: clamp(16px, 3vw, 20px); /* 响应式字体 */
    white-space: nowrap; /* 保留你的原有样式 */
}

/* 输入框 - 核心：改为自适应宽度 */
input{
    height: 30px;
    width: 100%; /* 改为100%宽度 */
    max-width: 300px; /* 桌面端最大宽度 */
    padding: 0 10px;
    box-sizing: border-box;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* 按钮行 */
.btn-row {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 20px;
    flex-wrap: wrap; /* 移动端按钮换行 */
}

.btn-row input {
    width: 100px;
    max-width: 100px;
    height: 35px;
    cursor: pointer;
    background-color: #f0f0f0;
    border: 1px solid #999;
}

/* 导航栏 - 核心修复定位和溢出问题 */
#daohang{
    background-color: #333;
    border-radius: 10px;
    height: 60px; /* 增加高度，适配移动端点击 */
    position: fixed;
    top:0;
    left: 1%; /* 修正不规范的left:2 */
    right: 1%; /* 修正不规范的right:2 */
    width: 98%; /* 配合左右1%，避免溢出 */
    z-index: 9999;
    overflow-x: auto; /* 移动端导航栏可横向滚动 */
    white-space: nowrap; /* 防止导航项换行 */
}

#daohang>a:not(.denglu){
    display: inline-flex;
    color: aliceblue;
    text-decoration: none;
    margin: 0px 8px; /* 移动端缩小间距 */
    box-sizing: border-box;
    padding: 15px 8px; /* 增加上下内边距，方便点击 */
    font-size: clamp(14px, 3vw, 20px); /* 响应式字体 */
    z-index: 9999;
    float: left;
    align-items: center; /* 垂直居中 */
    height: 100%; /* 占满导航栏高度 */
}

#daohang>a:not(.denglu):hover{
    color: rgb(255, 157, 0);
    z-index: 9999;
}

.denglu{
    display: inline-flex;
    color: aliceblue;
    text-decoration: none;
    margin: 0px 8px; /* 移动端缩小间距 */
    box-sizing: border-box;
    padding: 15px 8px; /* 增加上下内边距，方便点击 */
    font-size: clamp(14px, 3vw, 20px); /* 响应式字体 */
    z-index: 9999;
    float: right;
    align-items: center; /* 垂直居中 */
    height: 100%; /* 占满导航栏高度 */
}

/* 注册链接 */
.register-link {
    text-align: center;
    margin-top: 15px;
    font-size: clamp(14px, 3vw, 18px); /* 响应式字体 */
    color: #666;
}

.register-link a {
    color: brown;
    text-decoration: none;
    margin-left: 5px;
}

.register-link a:hover {
    color: rgb(255, 157, 0);
    text-decoration: underline;
}

/* 登录提示 */
.login-tip {
    width: 90%;
    max-width: 400px;
    margin: 20px auto;
    padding: 12px;
    background-color: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 6px;
    text-align: center;
    font-size: clamp(14px, 3vw, 16px); /* 响应式字体 */
    color: #d85000;
    box-sizing: border-box;
}

.login-tip i {
    margin-right: 8px;
    font-style: normal;
}

/* 密码标签样式（修复隐藏时显示颜色的问题） */
.pass-tag {
    display: none; /* 优先隐藏，覆盖重复的display属性 */
    background-color: transparent; /* 隐藏时透明 */
    color: transparent; /* 文字也透明 */
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 10px;
}

/* 显示通关标签时的样式（通过JS动态添加） */
.pass-tag.show {
    display: inline-block;
    background-color: #2ed573;
    color: white;
}

/* 隐藏触发按钮 - 移动端适配位置 */
.hidden-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background-color: transparent;
    cursor: pointer;
    z-index: 9998;
}

/* 隐藏任务弹窗 - 适配移动端 */
.hidden-task-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.hidden-task-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 30px;
    width: 90%; /* 改为90%宽度，适配移动端 */
    max-width: 400px;
    text-align: center;
    box-shadow: 0 40px 40px rgba(0, 0, 0, 0.3);
    box-sizing: border-box; /* 内边距计入宽度 */
}

.task-title {
    font-size: clamp(16px, 4vw, 18px); /* 响应式字体 */
    color: #ff6b81;
    margin-bottom: 15px;
    font-weight: bold;
}

.click-target {
    width: clamp(80px, 25vw, 120px); /* 响应式大小 */
    height: clamp(80px, 25vw, 120px);
    background: linear-gradient(135deg, #ff7675 0%, #ff7979 100%);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: clamp(18px, 5vw, 24px); /* 响应式字体 */
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 107, 129, 0.4);
    transition: all 0.2s ease;
}

.click-target:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 129, 0.6);
}

.task-info {
    font-size: clamp(12px, 3vw, 14px); /* 响应式字体 */
    color: #666;
    margin-bottom: 10px;
}

.score-display {
    font-size: clamp(16px, 4vw, 20px); /* 响应式字体 */
    color: #333;
    font-weight: bold;
    margin: 15px 0;
}

.score-display span {
    color: #ff4757;
    font-size: clamp(20px, 5vw, 24px); /* 响应式字体 */
}

.hidden-reward {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(46, 213, 115, 0.1);
    border-radius: 10px;
    display: none;
}

.reward-title {
    font-size: clamp(16px, 4vw, 18px); /* 响应式字体 */
    color: #2ed573;
    margin-bottom: 10px;
    font-weight: bold;
}

.reward-content {
    font-size: clamp(14px, 3vw, 16px); /* 响应式字体 */
    color: #333;
    word-break: break-all;
}

.close-task-btn {
    background: linear-gradient(135deg, #ffa502 0%, #ff3838 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: clamp(14px, 3vw, 16px); /* 响应式字体 */
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.close-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 133, 51, 0.4);
}

/* 邀请码框 */
small {
    color: #666;
    font-size: clamp(10px, 2vw, 12px); /* 响应式字体 */
    display: block;
    margin-top: 5px;
}

/* 媒体查询：针对小屏幕手机（宽度小于768px）的额外优化 */
@media (max-width: 768px) {
    .form-row {
        justify-content: center; /* 表单行居中 */
    }
    .form-row label {
        text-align: center; /* 标签居中 */
        width: 100%; /* 标签占满一行 */
        margin-right: 0;
        margin-bottom: 5px;
    }
    .box {
        min-height: 350px; /* 缩小表单容器高度 */
        padding: 15px;
    }
    .btn-row input {
        width: 80px; /* 缩小按钮宽度 */
    }
}
