/* styles.css */

/* 基础样式 */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    position: relative;
    padding-top: 10vh;
}

.background {
    position: absolute;
    inset: 0;
    background-image: url('backgrand.jpg');
    background-size: cover;
    background-position: center;
    transition: all 0.5s;
    filter: blur(0) brightness(100%);
}

.background.active {
    filter: blur(4px) brightness(75%);
}

.navigation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5rem;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 64rem;
}

/* 时间按钮样式 */
.time-button {
    font-size: 2rem;
    color: white;
    background: #216b94;
    border: none;
    border-radius: 10px;
    outline: none;
    cursor: default;
    user-select: none;
    pointer-events: auto;
    padding: 10px 20px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2),
                -5px -5px 15px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}
/* 禁用所有元素的默认光标样式 */
* {
    cursor: default; /* 或者是 none, 按需求设置 */
}
/* 禁用所有输入框和按钮的光标样式 */
input, textarea, button {
    cursor: default; /* 或者是 none */
}
/* 禁用输入框及外部光标样式 */
.search-wrapper, .search-wrapper * {
    cursor: default !important;
}


.time-button:hover {
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3),
                -2px -2px 10px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.05);
}

/* 搜索框和图标容器样式 */
.search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.75);
    padding-right: 0.5rem;
}

/* 搜索框输入样式 */
.search-input {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background-color: transparent;
    border: none;
    outline: none;
    transition: width 0.5s ease;
    width: 12rem;
    font-size: 1rem;
    color: black;
    text-align: left;
    cursor: text;
}

.search-input:focus {
    width: 24rem;
    background-color: rgba(255, 255, 255, 0.6);
}

/* 搜索图标按钮样式 */
.search-icon {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: green;
    margin-left: -2.5rem;
    outline: none;
    padding: 0;
}

/* 弹出导航框样式 */
.time-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.6);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    pointer-events: none;
    width: 24rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 1rem;
    text-align: center;
}

.time-popup.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

/* 导航项样式 */
.nav-item {
    background: #f0f0f0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.nav-item:hover {
    background: #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* 公告弹窗样式 */
.popup-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* Slightly more transparent */
    border-radius: 0.5rem; /* Smooth borders */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2); /* Shadow for 3D effect */
    padding: 20px;
    overflow-y: auto;
    display: none;
    z-index: 20;
}

.popup-content.active {
    display: block;
}

/* 关闭按钮样式 */
.close-button {
    background-color: #ff4d4f;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    float: right;
    margin-bottom: 10px;
}

/* 公告内容样式 */
.announcement-content {
    font-size: 1rem;
    color: #333;
    white-space: pre-wrap; /* Preserve whitespace and line breaks */
}

/* 任务表单和任务区块样式，增强视觉层次 */
.popup-content .task-form,
.popup-content .task-section {
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}

/* 输入框样式 */
.popup-content .task-form .input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.popup-content .task-form .input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

/* 按钮样式 */
.popup-content .button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.popup-content .button:hover {
    background-color: #0052a3;
}

/* 任务区块标题样式 */
.popup-content .section-title {
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
}

/* 折叠按钮样式 */
.popup-content .toggle-button {
    background: none;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    color: #007bff;
}

/* 回复表单样式 */
.reply-form {
    margin-top: 12px;
    margin-left: 24px;
    display: none;
}

.reply-form.active {
    display: block;
}

.reply-form .input-group {
    margin-bottom: 12px;
}

.reply-form .input-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.reply-form .input-group .input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.reply-form .input-group .input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.reply-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 8px;
}

.reply-form .button-container {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.reply-form .button-outline {
    background-color: white;
    color: #0066cc;
    border: 1px solid #0066cc;
    padding: 6px 12px; /* 缩小内边距 */
    font-size: 0.85rem; /* 缩小字体大小 */
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px; /* 调整图标与文字间距 */  
    transition: background-color 0.3s ease;
}

.reply-form .button-outline:hover {
    background-color: #f0f7ff;
}

.reply-form .error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 4px;
    display: none;
}

.reply-form .error.active {
    display: block;
}

/* 回复样式 */
.reply {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.reply .message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.reply .message-header svg {
    width: 16px;
    height: 16px;
}

.reply .author {
    font-weight: 600;
}

.reply .timestamp {
    color: #666;
    font-size: 0.875rem;
}

.reply .message-content {
    margin-bottom: 8px;
}

/* 任务项样式 */
.popup-content .task-item {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* 任务项状态样式 */
.popup-content .task-pending {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.popup-content .task-in-progress {
    background-color: #e7f5ff;
    border: 1px solid #d0ebff;
}

.popup-content .task-completed {
    background-color: #ebfbee;
    border: 1px solid #d3f9d8;
}

/* 任务内容和标题样式 */
.popup-content .task-title {
    font-weight: 500;
    margin-bottom: 3px;
}

.popup-content .task-time {
    font-size: 0.75rem;
    color: #666;
}

/* 操作按钮样式 */
.popup-content .task-actions .action-button {
    padding: 3px 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    color: white;
}

.popup-content .task-actions .btn-delete {
    background-color: #dc3545;
}

.popup-content .task-actions .btn-pending {
    background-color: #6c757d;
}

.popup-content .task-actions .btn-progress {
    background-color: #0066cc;
}

.popup-content .task-actions .btn-complete {
    background-color: #198754;
}

.popup-content .task-actions .action-button:hover {
    opacity: 0.9;
}

.collapsed {
    display: none;
}

/* 留言表单样式 */
.message-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.input, .textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.button-container {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex; /* 添加 Flex 布局 */
    flex-direction: column; /* 垂直排列内部元素 */
    position: relative;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.message-header svg {
    width: 16px;
    height: 16px;
}

.author {
    font-weight: 600;
}

.timestamp {
    color: #666;
    font-size: 0.875rem;
}

.message-content {
    margin-bottom: 16px;
}

.replies {
    margin-left: 24px;
}

/* 回复按钮样式调整 */
.message-card .button-outline {
    background-color: white;
    color: #0066cc;
    border: 1px solid #0066cc;
    padding: 6px 12px; /* 缩小内边距 */
    font-size: 0.85rem; /* 缩小字体大小 */
    align-self: flex-end; /* 右对齐按钮 */
    margin-top: 8px; /* 增加与内容的间距 */
    width: auto; /* 按钮宽度自适应内容 */
    display: inline-flex;
    align-items: center;
    gap: 4px; /* 调整图标与文字间距 */  
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.message-card .button-outline:hover {
    background-color: #f0f7ff; /* 悬停时背景色变为浅蓝色 */
}

/* 确保回复按钮容器使用 flexbox 布局 */
.message-card .button-outline {
    align-self: flex-end; /* 右对齐按钮 */
}

/* 调整回复按钮内 SVG 图标的对齐和间距 */
button svg {
    vertical-align: middle;
    margin-right: 4px; /* 增加图标与文字的间距 */
}

/* 使回复按钮宽度自适应 */
.button-outline {
    width: auto;
}

/* 其他按钮保持原样 */
.button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #0052a3;
}

/* 确保 SVG 图标与文本对齐 */
.category-icon {
    display: inline-block;
    vertical-align: middle;
}
