/* 定时任务页面容器 */
.schedule-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面头部 */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.schedule-header h2 {
    color: #333;
    font-size: 20px;
    margin: 0;
}

.add-btn {
    padding: 10px 20px;
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-btn:hover {
    background-color: #1565c0;
}

/* 群组任务区块 */
.group-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.group-section h3 {
    color: #444;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 任务列表 */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.task-item:hover {
    background-color: #f0f1f2;
}

.task-info {
    font-size: 14px;
    color: #333;
}

.delete-btn {
    padding: 6px 12px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* 无任务提示 */
.no-tasks {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-content h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 20px;
}

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

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

.form-group select,
.form-group input[type="time"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.form-group select:focus,
.form-group input[type="time"]:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.2);
}

/* 表单按钮 */
.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.form-buttons button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
}

.cancel-btn:hover {
    background-color: #e9ecef;
}

.submit-btn {
    background-color: #1976d2;
    border: none;
    color: white;
}

.submit-btn:hover {
    background-color: #1565c0;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-item {
    animation: fadeIn 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .schedule-container {
        padding: 10px;
    }

    .schedule-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        margin-bottom: 20px;
    }

    .schedule-header h2 {
        text-align: center;
    }

    .add-btn {
        width: 100%;
        justify-content: center;
    }

    .group-section {
        padding: 15px;
    }

    .task-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .task-info {
        margin-bottom: 5px;
    }

    .delete-btn {
        width: 100%;
    }

    .modal-content {
        padding: 20px;
    }

    .form-buttons {
        flex-direction: column;
    }

    .form-buttons button {
        width: 100%;
    }
}

/* 加载状态 */
.loading {
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 操作反馈提示 */
.feedback-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    animation: slideInRight 0.3s ease;
    z-index: 1000;
}

.feedback-success {
    background-color: #28a745;
}

.feedback-error {
    background-color: #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 表单操作按钮容器 */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* 模态框按钮基础样式 */
.form-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

/* 提交按钮样式 */
.form-actions button[type="submit"] {
    background-color: #1976d2;
    color: white;
}

.form-actions button[type="submit"]:hover {
    background-color: #1565c0;
}

/* 取消按钮样式 */
.form-actions button[type="button"] {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.form-actions button[type="button"]:hover {
    background-color: #e0e0e0;
}

/* 按钮禁用状态 */
.form-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 时间输入组样式 */
.time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-inputs input {
    width: 60px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    text-align: center;
    transition: all 0.3s ease;
}

.time-inputs input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.2);
}

.time-inputs input::-webkit-inner-spin-button,
.time-inputs input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.time-inputs input[type=number] {
    -moz-appearance: textfield;
}

.time-inputs span {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

/* 表单组样式优化 */
.form-group {
    margin-bottom: 20px;
}

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

/* 下拉框样式统一 */
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background-color: white;
    transition: all 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.2);
}

/* 群组选择容器 */
.group-select-container {
    position: relative;
}

/* 搜索框容器 */
.search-box {
    position: relative;
    margin-bottom: 8px;
}

/* 搜索框样式 */
.search-box input {
    width: 100%;
    padding: 8px 12px;
    padding-left: 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.2);
}

/* 搜索图标 */
.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* 没有匹配结果时的样式 */
.no-results {
    display: none;
    padding: 8px 12px;
    color: #666;
    font-size: 14px;
    text-align: center;
    background-color: #f5f5f5;
    border-radius: 6px;
    margin-top: 8px;
}

/* 可搜索的选择框样式 */
.searchable-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background-color: white;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.searchable-select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.2);
}

/* 修改datalist下拉选项的样式 */
input::-webkit-calendar-picker-indicator {
    opacity: 0;
}

/* 选择框选项样式 */
.searchable-select option {
    padding: 8px;
}

/* 添加搜索时的样式 */
.searchable-select.searching {
    background-image: none;
}

/* 下拉列表样式 */
datalist {
    width: 100%;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 选项样式 */
option {
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    background: white;
    border-bottom: 1px solid #eee;
}

option:hover {
    background-color: #f5f5f5;
}

/* 美化下拉指示器 */
.searchable-select {
    position: relative;
}

/* 隐藏默认的下拉指示器 */
input::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* 自定义datalist下拉框样式 */
input[list]::-webkit-calendar-picker-indicator {
    display: none;
}

/* 自定义下拉列表容器 */
.group-select-container {
    position: relative;
    width: 100%;
}

/* 搜索输入框样式增强 */
.searchable-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background-color: white;
    transition: all 0.3s ease;
    outline: none;
}

.searchable-select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* 自定义下拉列表样式 */
datalist {
    position: absolute;
    max-height: 300px;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

/* 下拉列表显示状态 */
datalist:hover,
.searchable-select:focus + datalist {
    opacity: 1;
    transform: translateY(0);
}

/* 下拉选项样式 */
option {
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

option:last-child {
    border-bottom: none;
}

option:hover {
    background-color: #f5f8ff;
}

/* 滚动条样式 */
datalist::-webkit-scrollbar {
    width: 8px;
}

datalist::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

datalist::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

datalist::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 选项激活状态 */
option:active {
    background-color: #e8f0fe;
}

/* 下拉框打开时的输入框样式 */
.searchable-select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
    }
    to {
        box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
    }
}

/* 选项悬停动画 */
option {
    position: relative;
    overflow: hidden;
}

option::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(25, 118, 210, 0.1);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    transition: all 0.2s ease;
}

option:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 下拉框展开/收起动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 添加焦点轮廓动画 */
.searchable-select:focus {
    outline: none;
    border-color: #1976d2;
    animation: outlineGlow 2s ease-in-out infinite;
}

@keyframes outlineGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.2);
    }
}

/* 机器人离线提示 */
.bot-offline-notice {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.offline-content {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
}

.offline-icon {
    width: 64px;
    height: 64px;
    fill: #dc3545;
    margin-bottom: 20px;
}

.offline-content h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.offline-content p {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.error-message {
    color: #dc3545 !important;
    font-size: 14px !important;
    background-color: #fff5f5;
    border: 1px solid #ffebeb;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0 20px;
    text-align: left;
}

.refresh-btn {
    padding: 10px 20px;
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background-color: #1565c0;
}