body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;

    /* 背景图片相关属性 */
    background-image: url('/static/ms_login.svg');
    background-size: cover; /* 图片按比例缩放，覆盖整个背景区域 */
    background-repeat: no-repeat; /* 禁止背景图片重复 */
    background-position: center center; /* 居中显示背景图片 */
    background-attachment: fixed; /* 背景固定，不随页面滚动 */
}

.container {
    width: 100%;
    max-width: 350px; /* 默认宽度 */
    margin: 50px auto;
    border-radius: 10px; /* 圆角 */
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.6); /* 半透明白色背景 */
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    transition: max-width 0.3s ease; /* 添加平滑过渡效果 */
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input, select, textarea, button {
    width: 100%; /* 使输入框和按钮宽度一致 */
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    box-sizing: border-box;
}

input, select, textarea {
    border: 1px solid #ccc;
}

textarea {
    resize: none; /* 禁用宽度和高度调节 */
    height: 200px; /* 固定高度 */
}

/* 按钮容器的样式 */
.button-container {
    display: flex;
    justify-content: center; /* 水平居中 */
    gap: 10px; /* 按钮之间的间距 */
    margin-top: 20px; /* 与上方内容的间距 */
}

/* 按钮的通用样式 */
button {
    color: white;
    background-color: #0078d4; /* Microsoft 365 蓝色 */
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

button:hover {
    background-color: #005a9e; /* 鼠标悬停效果 */
}

button:active {
    background-color: #e0e0e0; /* 点击效果 */
}


.message {
    margin-top: 20px;
    font-size: 16px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.error {
    color: red;
}

.success {
    color: green;
}

.hint {
    font-size: 12px;
    color: #555;
    margin-top: -10px;
    margin-bottom: 10px;
}

.instruction-card {
    width: 100%; /* 保持说明模块宽度与容器一致 */
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.instruction-card h3 {
    margin-top: 0;
    font-size: 18px;
}

.instruction-card p {
    margin: 5px 0;
}

/* 大屏优化 */
@media (min-width: 768px) {
    .container {
        max-width: 600px; /* 大屏时容器加宽 */
    }

    .instruction-card h3 {
        font-size: 20px; /* 大屏时标题稍微增大 */
    }
}


@media (max-width: 768px) {
    body {
        background-size: auto 100%; /* 在较小屏幕上，确保图片以高度为基准缩放 */
    }
}

/* 收款码弹窗 */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 320px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.qr-code {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 180px;
    margin: 10px 0;
    border-radius: 8px;
}
.button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.button-group button {
    padding: 10px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.confirm {
    background: #28a745;
    color: white;
}

.confirm:hover {
    background: #218838;
}

.later {
    background: #ffc107;
    color: black;
}

.later:hover {
    background: #e0a800;
}

.cancel {
    background: #dc3545;
    color: white;
}

.cancel:hover {
    background: #c82333;
}

/* home icon */
.home-icon {
    position: static;
    display: inline-block;
    margin: 10px 0 0 10px;
    color: #333;
    cursor: pointer;
    text-decoration: none;
}
.home-icon svg {
    width: 30px;
    height: 30px;
}
.home-icon:hover {
    color: #0078d4;
}
