/* 登录页面主题样式 - 与主站保持一致 */

/* CSS变量定义 - 与主站同步 */
:root {
    --primary-color: rgba(205, 255, 5, 0.7);
    --primary-color-alpha-10: rgba(205, 255, 5, 0.1);
    --primary-color-alpha-20: rgba(205, 255, 5, 0.2);
    --primary-color-alpha-30: rgba(205, 255, 5, 0.3);
    --primary-color-alpha-70: rgba(205, 255, 5, 0.7);
    --primary-color-alpha-80: rgba(205, 255, 5, 0.8);
    --primary-color-solid: #cdff05;

    /* 链接颜色变量 */
    --link-color: #ffffff;
    --link-hover-color: var(--primary-color-solid);
    --link-active-color: var(--primary-color-alpha-80);
    --link-visited-color: #ffffff;

    /* 文本颜色变量 */
    --text-color-secondary: rgba(255, 255, 255, 0.8);
    --input-text-color: #ffffff;
    --input-placeholder-color: rgba(255, 255, 255, 0.4);
    --background-color-primary: #000000;
}

/* 登录页面背景 - 与主站完全一致 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: var(--background-color-primary);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-color-primary);
    position: relative;
    margin: 0;
    padding: 0;
}

/* 返回首页按钮 */
.back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color-alpha-20);
    border-radius: 25px;
    color: var(--input-text-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
    background: rgba(20, 20, 20, 0.9);
    border-color: var(--primary-color-solid);
    color: var(--primary-color-solid);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-btn span {
    transition: transform 0.3s ease;
}

.back-btn:hover span {
    transform: translateX(-2px);
}

/* 主容器布局 */
#mydiv {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 登录表单容器 */
.login-main {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 0 1px var(--primary-color-alpha-10),
        inset 0 1px 0 var(--primary-color-alpha-10);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--primary-color-alpha-20);
    position: relative;
}

.login-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 1px;
    background: linear-gradient(135deg, 
        var(--primary-color-alpha-30) 0%, 
        var(--primary-color-alpha-10) 25%, 
        transparent 50%, 
        var(--primary-color-alpha-10) 75%, 
        var(--primary-color-alpha-30) 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}

/* Logo区域样式 */
.logo-section {
    text-align: center;
    margin-bottom: 20px;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* 标题样式 */
.layui-elip {
    text-align: center;
    font-size: 24px;
    color: var(--primary-color-solid);
    margin-bottom: 30px;
    font-weight: 600;
    line-height: 1.4;
    text-shadow: 0 0 10px var(--primary-color-alpha-30);
}

.layui-elip .subtitle {
    font-size: 16px;
    color: var(--text-color-secondary);
    font-weight: 400;
}

/* 表单项样式 */
.layui-form-item {
    margin-bottom: 20px;
}

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

/* 普通输入框的图标定位 */
.input-item label {
    position: absolute;
    left: 15px;
    top: 50%;
    color: var(--primary-color-alpha-70);
    z-index: 10;
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* LayUI的input-inline类可能影响布局 */
.layui-input-inline {
    position: relative;
    display: block;
    width: 100%;
}

.input-item .layui-input {
    padding: 15px 15px 15px 45px;
    border: 1px solid var(--primary-color-alpha-20);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(30, 30, 30, 0.8);
    color: var(--input-text-color) !important;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.input-item .layui-input::placeholder {
    color: var(--input-placeholder-color);
}

.input-item .layui-input:focus {
    border-color: var(--primary-color-solid);
    box-shadow: 
        0 0 15px var(--primary-color-alpha-50),
        inset 0 1px 0 var(--primary-color-alpha-10);
    outline: none;
    background: rgba(30, 30, 30, 0.9);
}

.input-item .layui-input:focus ~ label,
.input-item:hover label {
    color: var(--primary-color-solid);
    text-shadow: 0 0 8px var(--primary-color-alpha-50);
}

/* 验证码特殊样式 */
.verify-box {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.verify-box .layui-input {
    flex: 1;
    min-width: 0;
    padding-left: 45px;
}

/* 验证码的label图标需要特殊定位 */
.verify-box label {
    position: absolute;
    left: 15px;
    z-index: 2;
    pointer-events: none;
    color: var(--primary-color-alpha-70);
    font-size: 16px;
    transition: all 0.3s ease;
}

.verify-box .captcha {
    height: 50px;
    border-radius: 8px;
    border: 1px solid var(--primary-color-alpha-20);
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-box .captcha:hover {
    border-color: var(--primary-color-solid);
    box-shadow: 0 0 10px var(--primary-color-alpha-30);
}

/* 登录按钮样式 */
.login-btn .layui-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color-solid) 0%, var(--primary-color-alpha-80) 100%);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn .layui-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;
}

.login-btn .layui-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px var(--primary-color-alpha-50),
        0 0 20px var(--primary-color-alpha-30);
    background: linear-gradient(135deg, var(--primary-color-solid) 0%, var(--primary-color-solid) 100%);
}

.login-btn .layui-btn:hover::before {
    left: 100%;
}

/* 复选框和链接样式 */
.layui-form-item a {
    color: var(--primary-color-solid);
    text-decoration: none;
    transition: all 0.3s ease;
}

.layui-form-item a:hover {
    color: var(--text-color-primary);
    text-shadow: 0 0 8px var(--primary-color-alpha-50);
}

/* LayUI复选框主题适配 */
.layui-form-checkbox[lay-skin="primary"] i {
    border-color: var(--primary-color-alpha-30);
    color: var(--primary-color-alpha-30);
}

.layui-form-checked[lay-skin="primary"] i {
    border-color: var(--primary-color-solid);
    background-color: var(--primary-color-solid);
    color: #000;
}

.layui-form-checkbox span {
    color: var(--text-color-secondary);
}

/* 星星装饰效果 */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color-solid);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--primary-color-solid);
    animation: twinkle 2s infinite;
}

.star-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.star-2 {
    top: 40%;
    left: 80%;
    animation-delay: 0.5s;
    width: 3px;
    height: 3px;
}

.star-3 {
    top: 70%;
    left: 15%;
    animation-delay: 1s;
}

.star-4 {
    top: 30%;
    left: 90%;
    animation-delay: 1.5s;
    width: 1px;
    height: 1px;
}

.star-5 {
    top: 80%;
    left: 70%;
    animation-delay: 2s;
    width: 2px;
    height: 2px;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 简洁的提示框样式 */
.layui-layer-tips {
    background: #dc3545 !important;
    border: 1px solid #dc3545 !important;
    border-radius: 4px !important;
}

.layui-layer-tips .layui-layer-content {
    background: #ffffff !important;
}

/* 删除冲突的白色文字设置 */

/* 错误提示箭头颜色 */
.layui-layer-tips .layui-layer-TipsG {
    border-top-color: rgba(220, 53, 69, 0.95) !important;
}

.layui-layer-tips .layui-layer-TipsB {
    border-bottom-color: rgba(220, 53, 69, 0.95) !important;
}

.layui-layer-tips .layui-layer-TipsL {
    border-left-color: rgba(220, 53, 69, 0.95) !important;
}

.layui-layer-tips .layui-layer-TipsR {
    border-right-color: rgba(220, 53, 69, 0.95) !important;
}

/* 确保错误提示文字可见 */
.layui-layer-tips *,
.layui-layer-tips .layui-layer-content * {

    background: transparent !important;
}

/* 针对特定的表单验证提示 */
.layui-form-tips {
    background: rgba(220, 53, 69, 0.95) !important;
    color: #cf0000 !important;
    border: 1px solid #dc3545 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
}

/* 移除过度的CSS规则以避免影响其他元素 */

/* 响应式设计 */
@media (max-width: 480px) {
    .back-home {
        top: 15px;
        left: 15px;
    }
    
    .back-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .login-main {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .layui-elip {
        font-size: 20px;
    }
    
    .layui-elip .subtitle {
        font-size: 14px;
    }
    
    .input-item .layui-input {
        padding: 12px 12px 12px 40px;
        font-size: 16px; /* 防止iOS缩载 */
    }
    
    .login-btn .layui-btn {
        height: 45px;
        font-size: 15px;
    }
}
