/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background-color: #409eff;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-brand {
    font-size: 20px;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.2);
}

.hidden {
    display: none !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    position: relative;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #666;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #409eff;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    height: 40px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background-color: #409eff;
    color: white;
}

.btn-primary:hover {
    background-color: #66b1ff;
}

.btn-success {
    background-color: #67c23a;
    color: white;
}

.btn-warning {
    background-color: #e6a23c;
    color: white;
}

.btn-danger {
    background-color: #f56c6c;
    color: white;
}

.btn-info {
    background-color: #909399;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* 任务列表 */
.task-list {
    display: grid;
    gap: 15px;
}

.task-item {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    border-left: 4px solid #409eff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.task-item.expired {
    border-left-color: #f56c6c;
    opacity: 0.7;
}

.task-item.paused {
    border-left-color: #e6a23c;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.task-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background-color: #ecf5ff;
    color: #409eff;
}

.badge-success {
    background-color: #f0f9ff;
    color: #67c23a;
}

.badge-warning {
    background-color: #fdf6ec;
    color: #e6a23c;
}

.badge-danger {
    background-color: #fef0f0;
    color: #f56c6c;
}

.badge-urgency {
    background-color: #fee;
    color: #f56c6c;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 待办按钮样式 */
.btn-todo-filter {
    background-color: #fdf6ec;
    color: #e6a23c;
    border: 2px solid #e6a23c !important;
    position: relative;
    font-weight: 500;
}

.btn-todo-filter:hover {
    background-color: #e6a23c;
    color: white;
}

.btn-todo-filter.active {
    background-color: #e6a23c;
    color: white;
}

.badge-todo-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f56c6c;
    color: white;
    border-radius: 10px;
    padding: 2px 7px;
    font-size: 11px;
    min-width: 18px;
    text-align: center;
    font-weight: bold;
}

/* 任务列表中的待办标识 */
.badge-todo-item {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 6px;
    vertical-align: middle;
    animation: todoPulse 2s infinite;
}

@keyframes todoPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 导航栏任务计数角标 */
.task-count-badge {
    background: #e6a23c;
    color: white;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    margin-left: 4px;
    vertical-align: top;
}

.task-meta {
    display: flex;
    gap: 20px;
    color: #909399;
    font-size: 13px;
    margin-top: 8px;
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 进度列表 */
.progress-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progress-item {
    background: #fafafa;
    border-radius: 6px;
    padding: 15px;
    border-left: 3px solid #409eff;
}

.progress-item.urgency {
    border-left-color: #f56c6c;
    background: #fff5f5;
}

.progress-item.milestone {
    border-left-color: #f56c6c;
    background: #fff0f0;
    border: 2px solid #f56c6c;
    border-left: 4px solid #d9363e;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-user {
    font-weight: 500;
    color: #409eff;
}

.progress-time {
    color: #909399;
    font-size: 12px;
}

.progress-content {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.replies {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.reply-item {
    background: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.reply-user {
    font-weight: 500;
    color: #67c23a;
    font-size: 13px;
}

.reply-time {
    color: #909399;
    font-size: 11px;
}

.reply-content {
    color: #666;
    font-size: 13px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.page-btn.active {
    background-color: #409eff;
    color: white;
    border-color: #409eff;
}

.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 25px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #909399;
}

/* 提示消息 */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: #f0f9ff;
    color: #67c23a;
    border: 1px solid #b3e0c3;
}

.alert-error {
    background-color: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.alert-warning {
    background-color: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #f5dab1;
}

/* 登录/注册页面 */
.auth-container {
    max-width: 450px;
    margin: 50px auto;
}

.auth-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.auth-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.wechat-login-btn {
    background-color: #07c160;
    color: white;
}

.wechat-login-btn:hover {
    background-color: #06ad56;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    color: #909399;
    font-size: 13px;
    margin-top: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #409eff;
        flex-direction: column;
        padding: 15px;
        gap: 10px;
    }

    .nav-menu.active {
        display: flex;
    }

    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .task-meta {
        flex-wrap: wrap;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
    }
}
