/* 全局样式 - 使用圆润可爱的风格 */
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 50%, #fff3e0 100%);
    color: #333;
    min-height: 100vh;
}

/* 底部导航空间 */
.mb-20 {
    margin-bottom: 100px;
}

/* 卡片样式 - 3D悬浮效果 */
.task-card {
    background: white;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 
        0 4px 6px rgba(0,0,0,0.05),
        0 10px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 15px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.task-card.text-center {
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.task-card[data-bs-toggle="modal"] {
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 2px dashed #667eea;
    background: linear-gradient(135deg, #f8fffe 0%, #e8f8f5 100%);
    cursor: pointer;
}

/* 优化任务卡片内容布局 */
.task-card .task-header {
    margin-bottom: 10px;
}

.task-card .task-amount {
    margin: 10px 0;
}

.task-card .task-footer {
    margin-top: 10px;
}

/* 底部悬浮导航菜单 */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    background: white;
    border-radius: 40px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    width: 320px;
    margin: 0 auto;
}



.nav-container {
    display: flex;
    background: #e0f7fa;
    border-radius: 30px;
    padding: 4px;
    width: 100%;
    justify-content: space-between;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 60px;
    flex: 1;
}

.nav-item.active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.nav-item:hover:not(.active) {
    background: #f0f9ff;
}

.nav-text {
    font-size: 14px;
    font-weight: 600;
}

.nav-item .badge {
    position: absolute;
    top: 2px;
    right: 10px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: #ff5252;
    color: white;
    text-align: center;
    line-height: 1;
    box-sizing: border-box;
}

/* 页面容器 */
.page-container {
    min-height: calc(100vh - 100px);
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4, #45B7D1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 12px 24px rgba(0,0,0,0.12),
        0 20px 40px rgba(0,0,0,0.15);
    border-color: rgba(78, 205, 196, 0.3);
}

.task-card:hover::before {
    opacity: 1;
}

/* 添加任务卡片特殊样式 */
.task-card[data-bs-toggle="modal"] {
    border: 3px dashed #4ECDC4;
    background: linear-gradient(135deg, #f8fffe 0%, #e8f8f5 100%);
}

.task-card[data-bs-toggle="modal"]:hover {
    border-color: #FF6B6B;
    background: linear-gradient(135deg, #fff8f8 0%, #ffe8e8 100%);
}

/* 按钮样式 - 彩虹渐变 */
.btn-primary {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255,107,107,0.5);
}

.btn-outline-primary {
    border: 2px solid #4ECDC4;
    color: #4ECDC4;
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #4ECDC4 0%, #45B7D1 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

/* 状态标签样式 - 彩色胶囊 */
.task-card {
    position: relative;
}

.status-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.status-pending {
    background: linear-gradient(135deg, #FFD93D 0%, #FF6B6B 100%);
    color: white;
}

.status-confirmed {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    color: white;
}

.status-completed {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

/* 统计卡片样式 - 玻璃拟态效果 */
.stat-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255,255,255,0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 5px;
    border: 2px solid #e8e8e8;
    padding: 14px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-control:focus, .form-select:focus {
    border-color: #4ECDC4;
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15);
    background: white;
    transform: translateY(-2px);
}

/* 模态框样式 */
.modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    color: white;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    padding: 20px 24px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: none;
    padding: 20px 24px;
}

/* 徽章样式 */
.badge {
    border-radius: 12px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 13px;
}

/* 通知卡片样式 */
.notification-card {
    position: relative;
    height: 100px;
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 4px 6px rgba(0,0,0,0.05),
        0 10px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    align-items: stretch;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-content {
    flex: 1;
    padding: 15px;
    background: white;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-actions {
    position: absolute;
    top: 0;
    right: -80px;
    height: 100%;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff5252;
    z-index: 1;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.delete-btn {
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.delete-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 左滑时的样式 */
.notification-card:active {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notification-content p {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-content .text-sm {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .notification-card {
        height: 110px;
    }
}

.bg-danger {
    background: linear-gradient(135deg, #FF6B6B 0%, #ee5a5a 100%) !important;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.bounce {
    animation: bounce 2s infinite;
}

/* 任务金额显示 */
.task-amount {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 任务类型选择容器 */
#taskTypeGrid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #4ECDC4 #f0f0f0;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

#taskTypeGrid::-webkit-scrollbar {
    height: 6px;
}

#taskTypeGrid::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

#taskTypeGrid::-webkit-scrollbar-thumb {
    background: #4ECDC4;
    border-radius: 10px;
}

#taskTypeGrid::-webkit-scrollbar-thumb:hover {
    background: #45B7D1;
}

#taskTypeGrid > div {
    flex: 0 0 auto;
    width: 140px;
    margin-bottom: 0;
    white-space: normal;
}

/* 任务类型选择卡片样式 */
.parent-task-item {
    border: 2px solid #4ECDC4;
    border-radius: 20px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    height: 120px;
    text-align: center;
}

.parent-task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.3);
}

.parent-task-item.active {
    border-color: #FF6B6B;
    background-color: #fff5f5;
}

.parent-task-item h4 {
    margin: 10px 0 0 0;
    font-size: 14px;
    font-weight: 600;
}

.parent-task-item .icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 8px;
}

/* 统计卡片样式 */
.stat-card.gradient-pink {
    padding: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.gradient-blue {
    padding: 15px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card h5 {
    margin: 0;
}

.stat-card p.h4 {
    margin: 5px 0;
}

/* 模态框样式 */
.modal-dialog.max-height {
    max-height: 90vh;
}

.modal-content.max-height {
    max-height: 90vh;
    overflow-y: auto;
}

/* 添加任务卡片样式 */
.add-task-icon {
    font-size: 36px;
}

/* 数量按钮样式 */
.quantity-btn {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.quantity-input {
    height: 56px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .task-grid {
        grid-template-columns: 1fr !important;
    }
    
    .header {
        padding: 20px 15px;
        border-radius: 0 0 30px 30px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .nav-pills .nav-link {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .task-card {
        padding: 18px;
    }
    
    .stat-card {
        padding: 18px;
        margin-bottom: 15px;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ee5a5a 0%, #3dbdb4 100%);
}