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

body {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(-45deg, #6b7F73, #4fA7C1, #a78A7F, #4fA7C1);
    background-size: 400% 400%;
    animation: moveBg 15s ease infinite;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    font-size: 14px;
    -webkit-text-size-adjust: 100%; /* 防止iOS自动调整文本大小 */
}

@keyframes moveBg {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

.container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    max-width: 480px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* 设置下拉菜单样式 */
.form-select {
    width: 100%; /* 设置下拉菜单宽度为100% */
    height: 30px; /* 设置下拉菜单高度为30像素 */
    font-size: 18px; /* 增加字体大小 */
    color: #ffffff; /* 设置字体颜色为白色 */
    background: transparent; /* 设置背景为透明 */
    border: none; /* 移除边框 */
    border-bottom: 2px solid #ffffff; /* 设置底部边框为2像素白色实线 */
    outline: none; /* 移除默认轮廓样式 */
    margin-top: 5px; /* 在顶部留出5像素的外边距 */
}

/* 设置下拉菜单选项样式 */
.form-select option {
    background: rgba(255, 255, 255, 0.1); /* 设置选项背景为白色带透明度 */
    color: #000000; /* 设置选项字体颜色为白色 */
}
.layout {
    max-width: 480px;
    width: 100%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.layout:hover {
    transform: translateY(-5px);
}

.box {
    position: relative;
}

label {
    display: block;
    color: #ffffff;
    font-size: 18px; /* 增加字体大小 */
    font-weight: bold; /* 添加粗体 */
    margin-bottom: 8px; /* 增加与输入框的间距 */
}

input {
    width: 100%;
    height: 40px;
    outline-style: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: block;
    font-size: 18px; /* 增加字体大小 */
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    padding-right: 12px;
}

input:focus {
    border-color: #6CCFF3;
    box-shadow: 0 0 10px rgba(108, 207, 243, 0.3);
}

.form-group {
    width: 100%;
    margin: 20px 0;
}

h2 {
    text-align: center;
    font-size: 24px;
    color: #ffffff;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    border-radius: 2px;
}

#btn {
    width: 100%;
    max-width: 300px;
    height: 50px;
    font-size: 22px; /* 增加字体大小 */
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(45deg, #6CCFF3, #4fA7C1);
    border: none;
    border-radius: 8px;
    outline-style: none;
    display: block;
    margin: 20px auto 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#btn:hover {
    background: linear-gradient(45deg, #4fA7C1, #6CCFF3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#alert {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
}

.alert-success,
.alert-warning {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    color: #333;
    line-height: 1.6;
    font-size: 15px;
    white-space: pre-line;
}

.alert-success {
    background-color: rgba(238, 177, 64, 0.2);
    border: 1px solid rgba(238, 177, 64, 0.5);
}

.alert-warning {
    background-color: rgba(223, 71, 60, 0.2);
    border: 1px solid rgba(223, 71, 60, 0.5);
}

a,
a:hover {
    text-decoration: none;
    color: #ffffff;
}

#tishi {
    float: left;
    display: block;
    width: fit-content;
    margin: 15px 0 0 0;
    text-align: left;
}

#register {
    float: right;
    display: block;
    width: fit-content;
    margin: 15px 0 0 0;
    text-align: right;
}

#loading {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.6);
}

#loading .dialog {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    font-size: 18px;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#loading .dialog i {
    font-size: 40px;
    margin-bottom: 10px;
    animation: rotate 2s linear infinite;
}

#loading .dialog p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

#hint {
    max-width: 480px;
    width: 90%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

#hint:hover {
    transform: translateY(-5px);
}

#hint_title {
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
    border: none;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
}

#hint_title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    border-radius: 2px;
}

#hint_title i {
    color: #6CCFF3;
    margin-right: 8px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

#hint_content {
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    line-height: 2;
    text-align: left;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-top: 10px;
    letter-spacing: 0.5px;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

/* 修改重点提示样式 */
.important-notice {
    margin-top: 15px;
    padding: 15px 20px;
    background: rgba(108, 207, 243, 0.1);
    border-radius: 12px;
    border-left: 3px solid #6CCFF3;
}

.important-notice p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14.5px;
    line-height: 1.8;
    margin: 5px 0;
    padding-left: 5px;
}

/* 隐藏网址的链接样 */
#register, #tishi {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

/* 修改记住我复选框样式，让它更小 */
.remember-wrapper {
    margin: 5px 0;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-left: 22px;  /* 减小左边距 */
    cursor: pointer;
    font-size: 13px;     /* 减小字体大小 */
    user-select: none;
    color: #ffffff;
}

.remember-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 14px;        /* 减小复选框大小 */
    width: 14px;         /* 减小复选框大小 */
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.remember-label:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.2);
}

.remember-label input:checked ~ .checkmark {
    background-color: #6CCFF3;
    border-color: #6CCFF3;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;          /* 调整对勾位置 */
    top: 1px;           /* 调整对勾位置 */
    width: 3px;         /* 减小对勾大小 */
    height: 7px;        /* 减小对勾大小 */
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-label input:checked ~ .checkmark:after {
    display: block;
}

.remember-label i {
    margin-right: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;    /* 减小图标大小 */
}

/* 移除输入框的清除按钮 */
.clear-input {
    display: none !important;  /* 完全隐藏清除按钮 */
}

/* 移除输入框右侧内边距，因为不再需要为清除按钮留空间 */
input {
    padding-right: 12px !important;  /* 恢复正常的右侧内边距 */
}

/* 修改自定义 alert 样式 */
.custom-alert {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: alertFadeIn 0.3s ease;
}

.custom-alert-title {
    padding: 16px 20px;
    text-align: center;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    letter-spacing: 1px;
}

.custom-alert-content {
    padding: 25px;
    text-align: left;
    color: #444;
    font-size: 15.5px;
    line-height: 1.8;
    white-space: pre-line;
    max-height: 65vh;
    overflow-y: auto;
    margin: 0 2px;
    letter-spacing: 0.5px;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.custom-alert-buttons {
    display: flex;
    padding: 12px 20px;
    gap: 8px; /* 减小按钮之间的间距 */
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    justify-content: flex-end;
    flex-wrap: wrap; /* 允许按钮换行 */
}

.custom-alert-button {
    min-width: 80px; /* 设置最小宽度而不是固定宽度 */
    max-width: 100px;
    flex: 0 1 auto; /* 允许按钮缩小但不放大 */
    padding: 8px 12px; /* 调整内边距 */
    border: none;
    color: #fff;
    font-size: 14px; /* 稍微减小字体大小 */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    background: linear-gradient(45deg, #6CCFF3, #4fA7C1);
    text-align: center;
    letter-spacing: 1px;
    margin: 4px 0; /* 添加垂直方向的外边距，优化换行后的显示效果 */
}

.custom-alert-button:hover {
    background: linear-gradient(45deg, #4fA7C1, #6CCFF3);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.custom-alert-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.custom-alert-content::-webkit-scrollbar {
    width: 6px;
}

.custom-alert-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.custom-alert-content::-webkit-scrollbar-thumb {
    background: rgba(108, 207, 243, 0.5);
    border-radius: 3px;
}

.custom-alert-content::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 207, 243, 0.7);
}

.tutorial-button {
    display: block;
    width: 100%;
    max-width: 300px;
    height: 50px;
    font-size: 22px; /* 增加字体大小 */
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(45deg, #6CCFF3, #4fA7C1);
    border: none;
    border-radius: 8px;
    outline-style: none;
    margin: 20px auto;
    text-align: center;
    line-height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.tutorial-button:hover {
    background: linear-gradient(45deg, #4fA7C1, #6CCFF3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .layout {
        width: 95%;
        padding: 15px;
    }

    h2 {
        font-size: 24px;
    }

    .form-select, input, #btn, .tutorial-button {
        font-size: 18px; /* 保持移动端字体大小 */
    }

    label {
        font-size: 18px; /* 保持移动端字体大小 */
    }
}

@media (max-width: 480px) {
    .layout {
        width: 100%;
        padding: 10px;
    }

    h2 {
        font-size: 22px;
    }

    .form-select, input, #btn, .tutorial-button {
        font-size: 16px; /* 小屏幕设备的字体大小 */
    }

    label {
        font-size: 16px; /* 小屏幕设备的字体大小 */
    }
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 5px;
    display: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.clear-btn:hover {
    color: #ffffff;
}

/* 确保输入框侧有足够空间放置清除按钮 */
.input-wrapper input {
    padding-right: 30px;
}

/* 设置输入框placeholder的颜色 */
input::placeholder {
    color: rgba(255, 255, 255, 0.5); /* 使用半透明的白色 */
}

/* 兼容不同浏览器 */
input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

input, select, textarea {
    font-size: 16px; /* 确保字体大小至少为16px */
}

/* 当只有一个按钮时的样式 */
.custom-alert-buttons:only-child,
.custom-alert-buttons:has(> :only-child) {
    justify-content: flex-end;
}

/* 添加响应式样式 */
@media (max-width: 360px) {
    .custom-alert-buttons {
        padding: 8px 12px; /* 在小屏幕上减少内边距 */
        gap: 6px; /* 进一步减小间距 */
    }
    
    .custom-alert-button {
        min-width: 70px; /* 更小的最小宽度 */
        font-size: 13px; /* 更小的字体 */
        padding: 6px 10px; /* 更小的内边距 */
    }
}

/* 确保弹窗本身也能适应小屏幕 */
.custom-alert {
    width: 92%;
    max-width: 460px;
    margin: 0 10px; /* 确保两边有边距 */
    max-height: 90vh; /* 限制最大高度 */
    display: flex;
    flex-direction: column;
}

.custom-alert-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    margin: 0;
}
