/* 基本样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9; /* 背景颜色更柔和 */
    color: #333; /* 默认字体颜色 */
}

header {
    background-color: #00796b; /* 医院主色：绿色系 */
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    border-bottom: 4px solid #004d40; /* 更深的绿色边框 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影，提升页面层次感 */
}

h1 {
    font-size: 32px;
    font-weight: bold;
}

.container {
    display: flex;
    flex-direction: column; /* 将整个容器设置为垂直排列 */
    justify-content: flex-start; /* 使元素从顶部开始排列 */
    align-items: center; /* 水平居中对齐子元素 */
    width: 95%; /* 或者设置一个固定宽度，如 1200px，根据需要调整 */
    margin-left: auto; /* 自动左右居中 */
    margin-right: auto; /* 自动左右居中 */
}

.sidebar {
    width: 250px;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    background-color: #ffffff; /* 背景颜色 */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 加入阴影让其更突出 */
}

.sidebar h3 {
    margin-top: 0;
    font-size: 20px;
    color: #00796b; /* 使用医院绿色系 */
}

button {
    background-color: #00796b;
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    margin: 10px 0;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px; /* 圆角按钮 */
    transition: background-color 0.3s ease; /* 平滑过渡效果 */
}

button:hover {
    background-color: #004d40; /* 按钮鼠标悬停时的颜色 */
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#calendar {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 日历边框阴影 */
}

/* 背景遮罩层（overlay） */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 半透明黑色背景 */
    z-index: 9998; /* 确保遮罩层在模态框下面 */
}

/* 弹出框（模态框） */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;  /* 宽度占屏幕的50% */
    height: 75%;  /* 高度占屏幕的60% */
    background-color: rgba(0, 0, 0, 0); /* 背景为透明 */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 确保弹出框在最上层 */
    border-radius: 8px;
}

.modal-content {
    background-color: white;
    padding: 15px;
    border-radius: 12px; /* 增加圆角 */
    width: 100%;
    height: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    overflow-y: auto;
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 24px;
    font-weight: bold;
    color: #00796b;
    text-align: center; /* 居中标题 */
}

/* 表单字段样式 */
label {
    display: block;
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

input, select {
    width: 95%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: #00796b;
    box-shadow: 0 0 8px rgba(0, 121, 107, 0.3);
    background-color: #ffffff;
}

/* 按钮组 */
.button-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

#saveButton {
    background-color: #00796b;
    color: white;
    border-radius: 6px; /* 圆角按钮 */
    padding: 12px 30px;
}

#saveButton:hover {
    background-color: #004d40;
}

#cancelButton {
    background-color: #f44336;
    color: white;
    border-radius: 6px; /* 圆角按钮 */
    padding: 12px 30px;
}

#cancelButton:hover {
    background-color: #d32f2f;
}

#deleteButton {
    background-color: #ff9800;
    color: white;
    border-radius: 6px; /* 圆角按钮 */
    padding: 12px 30px;
}

#deleteButton:hover {
    background-color: #f57c00;
}

/* 排班类型样式 */
.main-shift {
    background-color: #ffcccc; /* 主班背景色 */
}

.admin-night-shift {
    background-color: #ccffcc; /* 行政班+晚班背景色 */
}

.north-hospital-shift {
    background-color: #ccccff; /* 北院班背景色 */
}

/* 日历样式 */
.fc-toolbar {
    background-color: #00796b; /* 工具栏背景色 */
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 10px;
    margin-bottom: 20px;
}

.fc-toolbar h2 {
    font-size: 24px;
}

.fc-day-grid-event {
    font-size: 14px;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.fc-day-grid-event:hover {
    background-color: #004d40; /* 鼠标悬停时改变事件背景色 */
    color: white;
}

.fc-button {
    background-color: #004d40;
    color: white;
    border-radius: 4px;
    border: none;
    padding: 8px 16px;
}

.fc-button:hover {
    background-color: #00796b;
}

/* 设置下拉框容器的样式 */
.select-container {
    position: relative;
    width: 95%; /* 使其适应屏幕 */
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
}

/* 隐藏原生下拉框的样式 */
select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    appearance: none; /* 去除默认的下拉箭头 */
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s ease;
}

/* 自定义箭头样式 */
select::-ms-expand {
    display: none; /* 去除IE浏览器的箭头 */
}

select:focus {
    border-color: #00796b;
    box-shadow: 0 0 8px rgba(0, 121, 107, 0.3);
}

/* 为下拉框添加自定义箭头 */
select::after {
    content: '▼'; /* 下拉箭头 */
    font-size: 18px;
    color: #00796b;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* 阻止箭头点击 */
}

/* 设置下拉框弹出菜单的样式 */
.select-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px; /* 设置最大高度 */
    overflow-y: auto; /* 允许滚动 */
    background-color: white;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none; /* 初始隐藏 */
    transition: all 0.3s ease;
}

/* 改变下拉菜单项的背景颜色 */
.select-menu li {
    padding: 12px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.select-menu li:hover {
    background-color: #f0f0f0; /* 高亮背景色 */
}

/* 点击菜单项后的效果 */
.select-menu li.selected {
    background-color: #00796b;
    color: white;
}

/* 响应式优化：手机端优化 */
@media screen and (max-width: 600px) {
    select {
        font-size: 18px;
        padding: 14px 20px; /* 适当增加padding */
    }

    .select-menu {
        max-height: 250px; /* 在手机上设置较小的最大高度 */
    }
}

#visitorCount {
    font-size: 24px;  /* 字体大小 */
    font-family: 'Arial', sans-serif;  /* 字体 */
    text-align: center;  /* 居中对齐 */
    color: #fff;  /* 白色字体 */
    background: linear-gradient(90deg, rgba(255, 94, 77, 1) 0%, rgba(255, 159, 67, 1) 50%, rgba(52, 153, 219, 1) 100%);
    -webkit-background-clip: text; /* 只对文字背景应用渐变色 */
    background-clip: text;
    animation: rainbowText 4s linear infinite; /* 应用渐变动画 */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4); /* 添加文本阴影 */
}

/* 给访问者数字部分添加特别的效果 */
#visitorNumber {
    font-size: 32px;  /* 更大的数字字体 */
    font-weight: bold; /* 加粗 */
    color: #f0e68c;  /* 金黄色 */
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 255, 255, 0.7); /* 光晕效果 */
}

/* 渐变动画 */
@keyframes rainbowText {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}