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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 120px;
    padding-bottom: 60px;
}

/* 容器样式 */
.auth-container {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 400px;
    max-width: 90%;
    margin: 0 auto;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标题样式 */
.auth-container h2 {
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.auth-container .subtitle {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-bottom: 30px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="tel"]:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮样式 */
button {
    flex: 1;
    padding: 14px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

button:active {
    transform: translateY(0);
}

/* 消息提示样式 */
.error-message {
    color: #f44336;
    margin-bottom: 20px;
    text-align: center;
    padding: 12px;
    background-color: #ffebee;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid #f44336;
}

.success-message {
    color: #4CAF50;
    margin-bottom: 20px;
    text-align: center;
    padding: 12px;
    background-color: #e8f5e9;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid #4CAF50;
}

.info-message {
    color: #2196F3;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    padding: 12px;
    background-color: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

/* 链接按钮样式 */
.auth-link-btn {
    padding: 14px 0;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    flex: 1;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.auth-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
}

/* 页脚样式 */
.footer {
    position: fixed;
    bottom: 20px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    width: 100%;
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* 获取验证码按钮样式 */
#send_sms_btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
    width: 120px;
    flex: none;
}

#send_sms_btn:hover {
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

#send_sms_btn:disabled {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    cursor: not-allowed;
    box-shadow: none;
}

/* 表单行样式（复选框和忘记密码链接在同一行） */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 忘记密码链接样式 */
.forgot-password {
    display: block;
    margin-bottom: 0;
}

.forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 自定义复选框样式 */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    justify-content: flex-start;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-wrapper input[type="checkbox"]:focus + label .custom-checkbox {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.checkbox-wrapper .custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #667eea;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + label .custom-checkbox {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.checkbox-wrapper input[type="checkbox"]:checked + label .custom-checkbox::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 8px;
    height: 4px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
}

.checkbox-wrapper label {
    margin: 0;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    font-weight: 400;
}

.checkbox-wrapper:hover .custom-checkbox {
    border-color: #764ba2;
    transform: scale(1.1);
}

/* 退出登录页面特殊样式 */
.logout-container {
    background-color: white;
    padding: 50px 60px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.logout-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
    }
}

.logout-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.logout-container h2 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
}

.logout-container .message {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.logout-container .btn {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.logout-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* 响应式设计 */
@media screen and (max-width: 480px) {
    body {
        padding-top: 40px;
    }

    .auth-container {
        padding: 30px 25px;
        width: 90%;
    }

    .logout-container {
        padding: 40px 30px;
        width: 90%;
    }

    .auth-container h2,
    .logout-container h2 {
        font-size: 24px;
    }

    .auth-container .subtitle {
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group input[type="tel"] {
        padding: 10px 14px;
        font-size: 16px;
    }

    button,
    .auth-link-btn,
    .logout-container .btn {
        padding: 12px 0;
        font-size: 15px;
    }

    .footer {
        font-size: 12px;
        bottom: 10px;
    }

    .error-message,
    .success-message,
    .info-message {
        font-size: 13px;
    }
}

@media screen and (max-height: 600px) {
    body {
        padding-top: 20px;
        padding-bottom: 20px;
    }
}