/* 通用样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f2f2f7; /* 苹果风格浅灰背景 */
    color: #333;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 侧边栏样式 */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 250px;
    background: linear-gradient(135deg, #ffffff, #f2f2f7); /* 柔和渐变 */
    border-right: 1px solid #ccc;
    overflow-y: auto;
    transform: translateX(-250px); /* 默认隐藏 */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    z-index: 1000;
    border-radius: 0 15px 15px 0; /* 圆角过渡 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
#sidebar.open {
    transform: translateX(0); /* 展开 */
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
}
#toggleSidebar {
    position: fixed;
    left: 10px;
    top: 10px;
    background: #007aff;
    color: white;
    padding: 10px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1100;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
#sidebar h3 {
    padding: 15px;
    margin: 0;
    background: #949698;
    color: white;
    text-align: center;
    font-size: 18px;
    border-radius: 0 15px 0 0; /* 顶部圆角 */
}
#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#sidebar ul li {
    padding: 10px 15px;
    border-bottom: 1px solid #e5e5ea;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s ease-in-out;
}
#sidebar ul li:hover {
    background-color: #e5e5ea; /* 鼠标悬停效果 */
    cursor: pointer;
}

/* 页面内容样式 */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    transition: margin-left 0.3s ease-in-out;
    padding: 20px;
}
.container.sidebar-open {
    margin-left: 270px; /* 当侧边栏展开时，内容右移 */
}

.flex-container {
    background-color: white;
    padding: 30px;
    border-radius: 20px; /* 圆角设计 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.note {
    background-color: #e7f3ff;
    color: #005bb5;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #cce7ff;
    font-size: 14px;
}

.form-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    text-align: left;
}

input, select {
    width: 95%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    outline: none;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: box-shadow 0.2s;
}
input:focus, select:focus {
    box-shadow: 0 0 5px rgba(0, 122, 255, 0.5);
}

button {
    width: 100%;
    padding: 12px;
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 25px; /* 圆角按钮 */
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
button:hover {
    background-color: #005bb5;
}
button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.result-container {
    margin-top: 20px;
    text-align: left;
    font-size: 14px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .flex-container {
        margin: 0 10px;
    }
    input, select, button {
        font-size: 14px;
        padding: 10px;
    }
    #toggleSidebar {
        font-size: 14px;
        padding: 8px;
    }
}

.modal {
    display: none; /* 隐藏 */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
