:root {
  --primary-color: #4db6ac; /* 更柔和的青绿色，降低饱和度 */
  --secondary-color: #aed581; /* 从亮黄色改为柔和的黄绿色 */
  --accent-color: #4db6ac; /* 与主色一致，使用柔和的青绿色 */
  --text-color: #424242; /* 使用更深一些但更柔和的文字颜色 */
  --light-bg: #eceff1; /* 更柔和的浅蓝灰背景 */
  --dark-bg: #cfd8dc; /* 更柔和的深蓝灰背景 */
  --white-transparent: rgba(255, 255, 255, 0.3); /* 提高透明度，减少对比 */
  --white-blur-border: rgba(255, 255, 255, 0.25);
  --shadow-color: rgba(130, 160, 170, 0.3); /* 更柔和的阴影颜色 */
  --card-text-color: rgba(66, 66, 66, 0.8); /* 更柔和的文字颜色 */
  --black-transparent: rgba(0, 0, 0, 0.08);
  --black-transparent-medium: rgba(0, 0, 0, 0.15);
  --black-transparent-light: rgba(0, 0, 0, 0.03);
  --black-transparent-heavy: rgba(0, 0, 0, 0.2);
  --accent-darker: #379387; /* 柔和的深青绿色 */
  --error-color: #d32f2f; /* 降低红色的饱和度 */
  --error-bg: rgba(211, 47, 47, 0.1);
  --footer-bg: rgba(77, 182, 172, 0.7); /* 匹配主色的绿色 */
  --gray-text: #757575;
  --gray-light: #e0e0e0;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', 'Microsoft YaHei', 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--dark-bg) 100%);
    overflow-x: hidden;
}

.background {
    position: fixed;
    display: block;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.login-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-width: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    background-color: var(--white-transparent);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 0.888889px solid var(--white-blur-border);
    -webkit-box-shadow: 0 8px 32px var(--shadow-color);
    box-shadow: 0 8px 32px var(--shadow-color);
    -webkit-border-radius: 16px;
    border-radius: 16px;
    color: var(--card-text-color);
    padding: 20px;
    transition: transform 0.1s ease; /* 修改过渡时间以更好地响应鼠标移动 */
}

.login-container:hover {
    transform: translate(-50%, -50%); /* 移除默认翻转，改为由JS控制 */
}

.login-card {
    width: 100%;
    padding: 30px;
    text-align: center;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-color);
    text-shadow: 0 2px 4px var(--black-transparent);
}

.favicon-link {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 3;
    text-decoration: none;
    display: block;
}

.favicon {
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
}

.favicon img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--black-transparent-medium);
    transition: transform 0.3s ease;
}

.favicon img:hover {
    transform: scale(1.1);
}

.favicon-icon {
    width: 32px;
    height: 32px;
    background-image: url(#);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    vertical-align: middle;
}

.inputbox {
    position: relative;
    margin: 25px 0;
}

.inputbox input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-color);
    box-sizing: border-box;
    box-shadow: 0 4px 12px var(--black-transparent-light);
    transition: all 0.3s ease;
}

.inputbox input:focus {
    box-shadow: 0 4px 16px var(--black-transparent);
    background: rgba(255, 255, 255, 0.95);
}

.inputbox::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12,4A4,4 0 0,1 16,8H8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z' /%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12,4A4,4 0 0,1 16,8H8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z' /%3E%3C/svg%3E") no-repeat center;
}

.submit {
    width: 100%;
    border: none;
    outline: none;
    padding: 15px;
    background: var(--accent-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
    transition: all 0.3s ease;
}

.submit:hover {
    background: var(--accent-darker);
    box-shadow: 0 6px 16px rgba(0, 120, 212, 0.4);
    transform: translateY(-2px);
}

.submit:active {
    transform: translateY(0);
}

.error-message {
    display: none;
    color: var(--error-color);
    font-size: 14px;
    text-align: center;
    margin: 10px 0;
    padding: 8px;
    background: var(--error-bg);
    border-radius: 4px;
    animation: shake 0.5s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

footer {
    display: flex;
    width: 100%;
    bottom: 0;
    position: fixed;
    justify-content: center;
    text-align: center;
    z-index: 2;
    background-color: var(--footer-bg);
    padding: 5px 0;
    color: white;
    font-size: 0.7rem;
}

footer p {
    color: white;
    text-decoration: none;
    font-size: 0.7rem;
    margin: 0 1rem;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.message {
    font-size: 0.7rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--gray-text);
}

.lottery-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.lottery-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--black-transparent-light);
}

.lottery-option:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--black-transparent-medium);
}

.lottery-option:active {
    transform: translateY(-1px);
}

.option-icon {
    font-size: 32px;
}

.option-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.contact {
    font-size: 0.7rem;
    color: white;
}

.contact a {
    color: white;
    /* Fluent yellow accent */
    text-decoration: none;
}

.contact a:hover {
    text-decoration: underline;
}

/* 响应式设计 - 平板设备 */
@media screen and (max-width: 768px) {
    .login-container {
        width: 90%;
        padding: 15px;
    }
    
    .login-card {
        padding: 20px;
    }
}

/* 响应式设计 - 手机设备 */
@media screen and (max-width: 480px) {
    .login-container {
        width: 95%;
        padding: 10px;
        top: 45%;
    }
    
    .login-card {
        padding: 20px 15px;
    }
    
    .login-title {
        font-size: 20px;
        margin: 0 0 15px 0;
    }
    
    .inputbox input {
        padding: 12px 12px 12px 40px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .submit {
        padding: 12px 20px;
    }
}

/* 针对小屏幕的优化 */
@media screen and (max-height: 600px) {
    .login-container {
        top: 40%;
        transform: translateX(-50%);
    }
}

/* 横屏手机适配 */
@media screen and (max-width: 736px) and (orientation: landscape) {
    .login-container {
        width: 60%;
        max-width: 400px;
    }
}
