/* NFC页面自定义样式 */

:root {
    --primary-color: #FF6B81;
    --secondary-color: #FFF0F5;
    --accent-color: #FFC0CB;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #E9ECEF;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8f9fa;
}

/* Logo 样式 */
.logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.main-logo {
    height: 120px;
    width: auto;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-link:hover .main-logo {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.logo-link {
    text-decoration: none;
    display: inline-block;
}

/* 主内容区域 */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    /* 自适应布局：当侧边栏展开时自动调整宽度 */
    transition: margin-right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow-x: hidden; /* 防止水平滚动条 */
}

/* 侧边栏展开时的主内容区域调整 */
.main-content.sidebar-expanded {
    margin-right: 320px;
}

/* 确保内容在不同布局状态下都能正确显示 */
.main-content .container {
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* 当侧边栏展开时，调整容器最大宽度以避免内容被挤压 */
.main-content.sidebar-expanded .container {
    max-width: calc(100% - 2rem);
}

/* 防止内容在动画过程中出现布局问题 */
.main-content.sidebar-animating {
    overflow: hidden;
}

.main-content.sidebar-animating * {
    pointer-events: none;
}

/* Logo 展示区 */
.logo-section {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

/* NFC徽章卡片 */
.nfc-badge-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nfc-badge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* ===== 可折叠侧边栏样式 ===== */

/* 侧边栏主容器 */
.calendar-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 320px;
    background: white;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

/* 收起状态：侧边栏向右移动，只显示展开按钮 */
.calendar-sidebar.collapsed {
    transform: translateX(calc(100% - 60px));
}

/* 展开状态：侧边栏完全显示 */
.calendar-sidebar.expanded {
    transform: translateX(0);
}

/* 侧边栏切换按钮容器（收起状态显示） */
.sidebar-toggle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 120px;
    background: var(--primary-color);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #FF5A73;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.15);
}

/* 展开状态时隐藏切换按钮 */
.calendar-sidebar.expanded .sidebar-toggle {
    opacity: 0;
    pointer-events: none;
}

/* 切换按钮样式 */
.toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.toggle-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.toggle-text {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 侧边栏内容区域 */
.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 收起状态时隐藏内容 - 修复：只在真正收起时隐藏 */
.calendar-sidebar.collapsed .sidebar-content {
    opacity: 0;
    pointer-events: none;
}

/* 展开状态时显示内容 */
.calendar-sidebar.expanded .sidebar-content {
    opacity: 1;
    pointer-events: auto;
}

/* 侧边栏头部 */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px; /* 与导航栏高度一致 */
}

.sidebar-title {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.sidebar-title i {
    color: var(--primary-color);
}

/* 关闭按钮 */
.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    transform: rotate(90deg);
}

.close-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 侧边栏主体内容 */
.sidebar-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #fafafa;
}

/* 自定义滚动条 */
.sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
}

.badge-placeholder {
    background: linear-gradient(135deg, #FF6B81, #FFC0CB);
    color: white;
    padding: 2.5rem;
    border-radius: 20px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(255, 107, 129, 0.3);
}

.nfc-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 0.5rem 0;
}

.feature-item i {
    margin-bottom: 1rem;
    color: #FF6B81;
}

/* 知识卡片 - matches badge page styling exactly */
.knowledge-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

/* Let Bootstrap handle card-header and card-body styling */
.knowledge-card .card-header {
    border-radius: 20px 20px 0 0;
}

.knowledge-card .card-body {
    border-radius: 0 0 20px 20px;
}

.knowledge-content {
    padding: 2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.knowledge-item {
    text-align: center;
}

.knowledge-item h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.knowledge-item p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 感谢墙 */
.thanks-wall {
    background: #FFF0F5;
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem 0;
    border: 1px solid #FFE0E6;
}

.wall-header {
    margin-bottom: 2rem;
}

.message-form .card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: none;
}

.message-form .card-body {
    padding: 2rem;
}

.messages-list {
    max-height: 600px;
    overflow-y: auto;
}

.message-item {
    background: var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease;
}

.message-item:hover {
    transform: translateX(5px);
}

.message-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.message-author {
    font-weight: 600;
    color: var(--primary-color);
}

.message-time {
    font-size: 0.8rem;
}

/* 页脚 */
.footer {
    margin-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        margin-top: 70px;
    }
    
    .nfc-badge-card {
        padding: 2rem 1rem;
    }
    
    .knowledge-content {
        padding: 1.5rem;
    }
    
    .thanks-wall {
        padding: 1.5rem;
    }
    
    .message-form .card-body {
        padding: 1.5rem;
    }
    
    .navbar-text {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .nfc-badge-card {
        padding: 1.5rem 1rem;
    }
    
    .feature-item {
        padding: 0.5rem;
    }
    
    .knowledge-content {
        padding: 1rem;
    }
    
    .thanks-wall {
        padding: 1rem;
    }
    
    .message-form .card-body {
        padding: 1rem;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 按钮样式 */
.btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B81, #FFC0CB);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 129, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* 卡片样式 - only apply to non-knowledge cards */
.card:not(.knowledge-card) {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 15px;
}

/* 表单样式 */
.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 129, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 徽章样式 */
.badge {
    border-radius: 6px;
    font-weight: 500;
}

/* 滚动条样式 */
.messages-list::-webkit-scrollbar {
    width: 6px;
}

.messages-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.messages-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.messages-list::-webkit-scrollbar-thumb:hover {
    background: #e55a6b;
}
/* ========================================
   可折叠侧边栏样式
   ======================================== */

/* 主布局调整 - 已移动到主内容区域部分，避免重复定义 */

/* 侧边栏容器 */
.calendar-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 320px;
    background: white;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* 侧边栏状态 */
.calendar-sidebar.expanded {
    transform: translateX(0);
}

.calendar-sidebar.collapsed {
    transform: translateX(calc(100% - 60px));
}

.calendar-sidebar.animating {
    pointer-events: none;
}

/* 收起状态的展开按钮 */
.sidebar-toggle {
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 120px;
    background: white;
    border-radius: 12px 0 0 12px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-toggle.collapsed {
    opacity: 1;
    visibility: visible;
}

.sidebar-toggle.expanded {
    opacity: 0;
    visibility: hidden;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.toggle-btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

.toggle-text {
    font-size: 0.8rem;
    font-weight: 500;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* 侧边栏内容区域 - 重复规则已移除，使用上方的主要规则 */

/* 侧边栏头部 */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--secondary-color);
    flex-shrink: 0;
}

.sidebar-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background-color: rgba(255, 107, 129, 0.1);
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* 侧边栏主体 */
.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* 侧边栏中的月经日历小部件样式调整 */
.sidebar-body .menstrual-calendar-widget {
    position: static;
    transform: none;
    width: 100%;
    height: 100%;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

.sidebar-body .widget-header {
    display: none; /* 隐藏重复的头部 */
}

.sidebar-body .widget-body {
    padding: 1.5rem;
    height: auto;
}

/* 悬浮图标状态同步 */
.menstrual-calendar-icon.sidebar-active {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.menstrual-calendar-icon.sidebar-active::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    border: 2px solid white;
}

/* ========================================
   响应式布局断点设计
   ======================================== */

/* 大屏幕 (≥1200px): 完整侧边栏功能 */
@media (min-width: 1200px) {
    .calendar-sidebar {
        width: 320px;
    }
    
    .main-content.sidebar-expanded {
        margin-right: 320px;
    }
    
    /* 大屏幕上确保内容有足够空间 */
    .main-content.sidebar-expanded .container {
        max-width: calc(1140px - 2rem); /* Bootstrap xl container width minus padding */
    }
    
    /* 大屏幕上的内容区域优化 */
    .main-content.sidebar-expanded .knowledge-card,
    .main-content.sidebar-expanded .nfc-badge-card,
    .main-content.sidebar-expanded .thanks-wall {
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }
    
    /* 大屏幕上侧边栏默认展开 */
    .calendar-sidebar.default-expanded {
        transform: translateX(0);
    }
    
    .calendar-sidebar.default-expanded .sidebar-content {
        opacity: 1;
    }
    
    .calendar-sidebar.default-expanded .sidebar-toggle {
        opacity: 0;
        visibility: hidden;
    }
    
    /* 大屏幕上的悬浮图标 */
    .floating-calendar-icon {
        bottom: 2rem;
        right: 2rem;
    }
    
    .float-btn {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }
}

/* 中屏幕 (768px-1199px): 默认收起的侧边栏 */
@media (max-width: 1199px) and (min-width: 768px) {
    .calendar-sidebar {
        width: 300px;
    }
    
    .main-content.sidebar-expanded {
        margin-right: 300px;
    }
    
    /* 中屏幕上的内容区域调整 */
    .main-content.sidebar-expanded .container {
        max-width: calc(100% - 3rem); /* 留出更多边距 */
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* 中屏幕上的卡片布局优化 */
    .main-content.sidebar-expanded .knowledge-card,
    .main-content.sidebar-expanded .nfc-badge-card,
    .main-content.sidebar-expanded .thanks-wall {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* 中屏幕上侧边栏展开时的文字大小调整 */
    .main-content.sidebar-expanded .lead {
        font-size: 1rem;
    }
    
    .main-content.sidebar-expanded h2 {
        font-size: 1.75rem;
    }
    
    .sidebar-toggle {
        left: -55px;
        width: 55px;
        height: 100px;
    }
    
    /* 中屏幕上侧边栏默认收起 */
    .calendar-sidebar.default-collapsed {
        transform: translateX(calc(100% - 55px));
    }
    
    .calendar-sidebar.default-collapsed .sidebar-toggle {
        opacity: 1;
        visibility: visible;
    }
    
    .calendar-sidebar.default-collapsed .sidebar-content {
        opacity: 0;
    }
    
    /* 中屏幕上的悬浮图标 */
    .floating-calendar-icon {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .float-btn {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    /* 中屏幕上的主内容区域调整 */
    .main-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .knowledge-card,
    .nfc-badge-card {
        margin: 1.5rem 0;
    }
}

/* 小屏幕 (<768px): 底部抽屉或全屏模态框 */
@media (max-width: 767px) {
    /* 底部抽屉模式 */
    .calendar-sidebar {
        width: 100%;
        height: 70vh;
        max-height: 600px;
        min-height: 400px;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }
    
    .calendar-sidebar.expanded {
        transform: translateY(0);
    }
    
    .calendar-sidebar.collapsed {
        transform: translateY(calc(100% - 60px));
    }
    
    /* 底部抽屉的拖拽手柄 */
    .sidebar-toggle {
        position: absolute;
        left: 50%;
        top: -60px;
        transform: translateX(-50%);
        width: 120px;
        height: 60px;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-toggle::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background-color: var(--border-color);
        border-radius: 2px;
    }
    
    .toggle-text {
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        margin-top: 0.5rem;
    }
    
    /* 小屏幕上主内容区域不需要边距调整 */
    .main-content.sidebar-expanded {
        margin-right: 0;
    }
    
    /* 小屏幕上确保内容在侧边栏展开时仍然可见 */
    .main-content.sidebar-expanded .container {
        max-width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* 小屏幕上侧边栏展开时添加遮罩效果 */
    .main-content.sidebar-expanded::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 999;
        opacity: 0;
        animation: fadeInOverlay 0.35s ease forwards;
    }
    
    @keyframes fadeInOverlay {
        to {
            opacity: 1;
        }
    }
    
    /* 小屏幕上的内容调整 */
    .main-content {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .knowledge-card,
    .nfc-badge-card {
        margin: 1rem 0;
        padding: 1.5rem;
    }
    
    /* 小屏幕上的侧边栏内容调整 */
    .sidebar-header {
        padding: 1rem 1.5rem;
    }
    
    .sidebar-body .widget-body {
        padding: 1rem;
    }
    
    /* 小屏幕上的悬浮图标 */
    .floating-calendar-icon {
        bottom: 1rem;
        right: 1rem;
    }
    
    .float-btn {
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
        box-shadow: 0 6px 20px rgba(255, 107, 129, 0.4);
    }
    
    .float-btn:hover {
        transform: scale(1.05) translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 107, 129, 0.5);
    }
    
    /* 移动设备触摸优化 */
    .float-btn:active {
        transform: scale(0.9);
    }
    
    /* 工具提示在小屏幕上的调整 */
    .tooltip {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        right: -0.5rem;
    }
}

/* 超小屏幕 (<480px): 进一步优化 */
@media (max-width: 479px) {
    .calendar-sidebar {
        height: 75vh;
        max-height: 500px;
    }
    
    .floating-calendar-icon {
        bottom: 0.75rem;
        right: 0.75rem;
    }
    
    .float-btn {
        width: 52px;
        height: 52px;
        font-size: 1.1rem;
    }
    
    /* 在超小屏幕上隐藏工具提示 */
    .tooltip {
        display: none;
    }
    
    .main-content {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .knowledge-card,
    .nfc-badge-card {
        padding: 1rem;
    }
    
    .sidebar-toggle {
        width: 100px;
        height: 50px;
    }
    
    .toggle-btn {
        font-size: 1rem;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .calendar-sidebar {
        height: 90vh;
        max-height: none;
    }
    
    .floating-calendar-icon {
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .float-btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
}

/* 高分辨率屏幕优化 */
@media (min-width: 1400px) {
    .calendar-sidebar {
        width: 360px;
    }
    
    .main-content.sidebar-expanded {
        margin-right: 360px;
    }
    
    .sidebar-body .widget-body {
        padding: 2rem;
    }
    
    /* 高分辨率屏幕上的内容区域优化 */
    .main-content.sidebar-expanded .container {
        max-width: calc(1320px - 2rem); /* Bootstrap xxl container width minus padding */
    }
    
    /* 高分辨率屏幕上保持合适的内容宽度 */
    .main-content.sidebar-expanded .col-lg-8 {
        max-width: 85%;
    }
    
    .main-content.sidebar-expanded .col-lg-6 {
        max-width: 75%;
    }
}

/* 平板设备特殊处理 */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .calendar-sidebar {
        width: 280px;
    }
    
    .main-content.sidebar-expanded {
        margin-right: 280px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .calendar-sidebar {
        width: 320px;
    }
    
    .main-content.sidebar-expanded {
        margin-right: 320px;
    }
}

/* 动画性能优化 */
.calendar-sidebar {
    will-change: transform;
}

.sidebar-content {
    will-change: opacity;
}

.main-content {
    will-change: margin-right;
}

/* 内容自适应优化 */
.main-content .row {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 确保图片和媒体内容在布局变化时保持响应式 */
.main-content.sidebar-expanded img,
.main-content.sidebar-expanded .main-logo {
    max-width: 100%;
    height: auto;
    transition: all 0.35s ease;
}

/* 确保按钮组在侧边栏展开时保持可用性 */
.main-content.sidebar-expanded .btn-group,
.main-content.sidebar-expanded .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 表单元素在侧边栏展开时的优化 */
.main-content.sidebar-expanded .form-control,
.main-content.sidebar-expanded .btn {
    font-size: 0.9rem;
}

/* 卡片内容在侧边栏展开时的间距调整 */
.main-content.sidebar-expanded .card-body {
    padding: 1.5rem;
}

.main-content.sidebar-expanded .nfc-badge-card {
    padding: 2rem;
}

.main-content.sidebar-expanded .thanks-wall {
    padding: 2rem;
}

/* 防止内容溢出 */
.main-content * {
    box-sizing: border-box;
}

.main-content.sidebar-expanded .text-break {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 无障碍支持 */
.toggle-btn:focus,
.close-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 暗色模式支持（预留） */
@media (prefers-color-scheme: dark) {
    .calendar-sidebar {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .sidebar-header {
        background: #4a5568;
        border-bottom-color: #4a5568;
    }
    
    .sidebar-toggle {
        background: #2d3748;
        color: #e2e8f0;
    }
}

/* ========================================
   右下角悬浮日历图标样式
   ======================================== */

/* 悬浮图标容器 */
.floating-calendar-icon {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1001; /* 确保悬浮按钮在侧边栏之上 */
    font-family: var(--font-family-primary);
}

/* 悬浮按钮 */
.float-btn {
    position: relative;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 129, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(10px);
    font-size: 1.5rem;
}

.float-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 悬停效果 */
.float-btn:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 35px rgba(255, 107, 129, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.float-btn:hover::before {
    opacity: 1;
}

.float-btn:hover i {
    transform: scale(1.1);
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* 激活状态 */
.float-btn:active {
    transform: scale(0.95) translateY(-2px);
    transition: transform 0.15s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 129, 0.6);
}

/* 聚焦状态 */
.float-btn:focus {
    outline: none;
    box-shadow: 0 8px 25px rgba(255, 107, 129, 0.4), 0 0 0 4px rgba(255, 107, 129, 0.3);
    border-color: var(--accent-color);
}

/* 图标样式 */
.float-btn i {
    transition: transform 0.3s ease;
    z-index: 1;
    position: relative;
}

/* 状态指示器 */
.status-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
}

.status-indicator.show {
    opacity: 1;
    transform: scale(1);
}

/* 不同经期状态的颜色 */
.status-indicator.menstrual {
    background-color: #FF6B6B;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.6);
}

.status-indicator.follicular {
    background-color: #4ECDC4;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.6);
}

.status-indicator.ovulation {
    background-color: #45B7D1;
    box-shadow: 0 0 8px rgba(69, 183, 209, 0.6);
}

.status-indicator.luteal {
    background-color: #96CEB4;
    box-shadow: 0 0 8px rgba(150, 206, 180, 0.6);
}

.status-indicator.unknown {
    background-color: #BDC3C7;
    box-shadow: 0 0 8px rgba(189, 195, 199, 0.6);
}

/* 工具提示 */
.tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.95), rgba(255, 192, 203, 0.95));
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
    pointer-events: none;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(255, 107, 129, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 1rem;
    border: 6px solid transparent;
    border-top-color: rgba(255, 107, 129, 0.95);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.floating-calendar-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 侧边栏激活状态 */
.floating-calendar-icon.sidebar-active .float-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    transform: scale(1.05);
}

/* 当侧边栏展开时，调整悬浮按钮位置避免被遮挡 */
body:has(.main-content.sidebar-expanded) .floating-calendar-icon {
    right: calc(320px + 2rem); /* 侧边栏宽度 + 原始右边距 */
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 备用方案：使用JavaScript类控制 */
.floating-calendar-icon.sidebar-expanded-mode {
    right: calc(320px + 2rem);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 在较小屏幕上，侧边栏展开时隐藏悬浮按钮 */
@media (max-width: 1199px) {
    body:has(.main-content.sidebar-expanded) .floating-calendar-icon,
    .floating-calendar-icon.sidebar-expanded-mode {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease, right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

.floating-calendar-icon.sidebar-active .float-btn::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* 脉冲动画 */
.floating-calendar-icon.pulse .float-btn {
    animation: pulse-ring 2s infinite;
}

.floating-calendar-icon.pulse .float-btn::before {
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ========================================
   悬浮图标响应式行为优化
   ======================================== */

/* 大屏幕 (≥1200px): 标准悬浮图标 */
@media (min-width: 1200px) {
    .floating-calendar-icon {
        bottom: 2rem;
        right: 2rem;
        /* 安全区域适配 */
        bottom: max(2rem, env(safe-area-inset-bottom));
        right: max(2rem, env(safe-area-inset-right));
    }
    
    .float-btn {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
        /* 大屏幕上更明显的悬停效果 */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .float-btn:hover {
        transform: scale(1.15) translateY(-6px);
        box-shadow: 0 15px 40px rgba(255, 107, 129, 0.5);
    }
    
    /* 大屏幕上的工具提示更详细 */
    .tooltip {
        font-size: 0.8rem;
        padding: 0.6rem 0.9rem;
        white-space: nowrap;
    }
}

/* 中屏幕 (768px-1199px): 适中的悬浮图标 */
@media (max-width: 1199px) and (min-width: 768px) {
    .floating-calendar-icon {
        bottom: 1.5rem;
        right: 1.5rem;
        /* 安全区域适配 */
        bottom: max(1.5rem, env(safe-area-inset-bottom));
        right: max(1.5rem, env(safe-area-inset-right));
    }
    
    .float-btn {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
        /* 中屏幕上适度的悬停效果 */
        transition: all 0.3s ease;
    }
    
    .float-btn:hover {
        transform: scale(1.1) translateY(-4px);
        box-shadow: 0 12px 30px rgba(255, 107, 129, 0.45);
    }
    
    .tooltip {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* 中屏幕上的触摸优化 */
    .float-btn:active {
        transform: scale(0.95) translateY(-2px);
        transition: transform 0.15s ease;
    }
}

/* 小屏幕 (<768px): 移动设备优化的悬浮图标 */
@media (max-width: 767px) {
    .floating-calendar-icon {
        bottom: 1rem;
        right: 1rem;
        /* 移动设备安全区域适配 */
        bottom: max(1rem, calc(env(safe-area-inset-bottom) + 0.5rem));
        right: max(1rem, calc(env(safe-area-inset-right) + 0.5rem));
    }
    
    .float-btn {
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
        /* 移动设备上更强的阴影以提高可见性 */
        box-shadow: 0 8px 25px rgba(255, 107, 129, 0.5);
        /* 触摸友好的最小尺寸 */
        min-width: 44px;
        min-height: 44px;
        /* 移动设备上的触摸反馈 */
        -webkit-tap-highlight-color: rgba(255, 107, 129, 0.3);
    }
    
    .float-btn:hover {
        /* 移动设备上减少悬停效果，因为主要是触摸交互 */
        transform: scale(1.05) translateY(-2px);
        box-shadow: 0 10px 30px rgba(255, 107, 129, 0.6);
    }
    
    /* 移动设备触摸优化 */
    .float-btn:active {
        transform: scale(0.9);
        transition: transform 0.1s ease;
        box-shadow: 0 4px 15px rgba(255, 107, 129, 0.7);
    }
    
    /* 移动设备上的工具提示调整 */
    .tooltip {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        right: -0.5rem;
        /* 移动设备上工具提示显示时间更短 */
        transition: all 0.2s ease;
    }
    
    /* 移动设备上的状态指示器调整 */
    .status-indicator {
        width: 16px;
        height: 16px;
        top: -1px;
        right: -1px;
        border-width: 1.5px;
    }
}

/* 超小屏幕 (<480px): 进一步的移动优化 */
@media (max-width: 479px) {
    .floating-calendar-icon {
        bottom: 0.75rem;
        right: 0.75rem;
        /* 超小屏幕安全区域适配 */
        bottom: max(0.75rem, calc(env(safe-area-inset-bottom) + 0.25rem));
        right: max(0.75rem, calc(env(safe-area-inset-right) + 0.25rem));
    }
    
    .float-btn {
        width: 52px;
        height: 52px;
        font-size: 1.1rem;
        /* 超小屏幕上保持足够的触摸目标大小 */
        min-width: 48px;
        min-height: 48px;
    }
    
    /* 超小屏幕上隐藏工具提示以节省空间 */
    .tooltip {
        display: none;
    }
    
    /* 超小屏幕上的状态指示器进一步调整 */
    .status-indicator {
        width: 14px;
        height: 14px;
        border-width: 1px;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .floating-calendar-icon {
        bottom: 0.5rem;
        right: 0.5rem;
        /* 横屏模式下的安全区域适配 */
        bottom: max(0.5rem, env(safe-area-inset-bottom));
        right: max(0.5rem, env(safe-area-inset-right));
    }
    
    .float-btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
        /* 横屏模式下减小尺寸以节省垂直空间 */
    }
    
    .tooltip {
        display: none; /* 横屏模式下隐藏工具提示 */
    }
}

/* 高分辨率屏幕优化 */
@media (min-width: 1400px) {
    .floating-calendar-icon {
        bottom: 2.5rem;
        right: 2.5rem;
    }
    
    .float-btn {
        width: 72px;
        height: 72px;
        font-size: 1.6rem;
    }
    
    .tooltip {
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
    }
}

/* 平板设备特殊处理 */
@media (min-width: 768px) and (max-width: 1024px) {
    .floating-calendar-icon {
        bottom: 1.25rem;
        right: 1.25rem;
    }
    
    .float-btn {
        width: 58px;
        height: 58px;
        font-size: 1.3rem;
        /* 平板设备上的混合交互优化 */
        transition: all 0.25s ease;
    }
    
    /* 平板设备上同时支持悬停和触摸 */
    .float-btn:hover {
        transform: scale(1.08) translateY(-3px);
    }
    
    .float-btn:active {
        transform: scale(0.92);
    }
}

/* 可访问性增强 */
@media (prefers-reduced-motion: reduce) {
    .float-btn,
    .tooltip,
    .status-indicator {
        transition: none !important;
        animation: none !important;
    }
    
    .float-btn:hover {
        transform: none;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .float-btn {
        border: 2px solid currentColor;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    }
    
    .tooltip {
        border: 1px solid currentColor;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    }
}

/* 暗色模式下的悬浮图标调整 */
@media (prefers-color-scheme: dark) {
    .float-btn {
        box-shadow: 0 8px 25px rgba(255, 107, 129, 0.6);
    }
    
    .float-btn:hover {
        box-shadow: 0 12px 35px rgba(255, 107, 129, 0.7);
    }
    
    .tooltip {
        background: linear-gradient(135deg, rgba(255, 107, 129, 0.98), rgba(255, 192, 203, 0.98));
        border-color: rgba(255, 255, 255, 0.3);
    }
}
/* =
==== 悬浮日历图标样式 ===== */

/* 悬浮图标容器 */
.floating-calendar-icon {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 悬浮按钮 */
.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #FF5A73);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 129, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.float-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 107, 129, 0.5);
    background: linear-gradient(135deg, #FF5A73, var(--primary-color));
}

.float-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.float-btn:focus {
    outline: 3px solid rgba(255, 107, 129, 0.3);
    outline-offset: 3px;
}

/* 侧边栏激活状态 */
.floating-calendar-icon.sidebar-active .float-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
}

.floating-calendar-icon.sidebar-active .float-btn:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.5);
}

/* 状态指示器 */
.status-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-indicator.show {
    opacity: 1;
    transform: scale(1);
}

/* 经期状态颜色 */
.status-indicator.menstrual {
    background: #FF6B6B;
}

.status-indicator.follicular {
    background: #4ECDC4;
}

.status-indicator.ovulation {
    background: #45B7D1;
}

.status-indicator.luteal {
    background: #96CEB4;
}

.status-indicator.unknown {
    background: #BDC3C7;
}

/* 工具提示 */
.floating-calendar-icon .tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

.floating-calendar-icon:hover .tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* 脉冲动画 */
.floating-calendar-icon.pulse .float-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* 触摸设备优化 */
.float-btn.touch-optimized {
    min-width: 44px;
    min-height: 44px;
}

.float-btn.touch-active {
    transform: scale(0.95);
}

/* 响应式设计 */
@media (max-width: 767px) {
    .floating-calendar-icon {
        bottom: 20px;
        right: 20px;
    }
    
    .float-btn {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
    
    .floating-calendar-icon .tooltip {
        display: none; /* 移动设备上隐藏工具提示 */
    }
}

@media (max-width: 480px) {
    .floating-calendar-icon {
        bottom: 16px;
        right: 16px;
    }
    
    .float-btn {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }
}

/* 横屏模式调整 */
.floating-calendar-icon.landscape-mode .float-btn {
    transform: scale(0.85);
}

/* 不同断点模式 */
.floating-calendar-icon.mobile-mode .float-btn {
    width: 56px;
    height: 56px;
}

.floating-calendar-icon.tablet-mode .float-btn {
    width: 58px;
    height: 58px;
}

.floating-calendar-icon.desktop-mode .float-btn {
    width: 60px;
    height: 60px;
}/* ====
= 侧边栏中的月经日历小部件样式 ===== */

/* 小部件容器 */
.menstrual-calendar-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.menstrual-calendar-widget.active {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 天数选择器容器 */
.day-selector-container {
    padding: 1rem 0;
}

.day-selector-container p {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* 天数按钮容器 */
.day-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* 天数按钮 */
.day-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    width: 100%;
}

.day-btn:hover {
    border-color: var(--primary-color);
    background: #fff5f7;
    transform: translateX(2px);
}

.day-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), #FF5A73);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 129, 0.3);
}

.day-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 天数数字 */
.day-number {
    background: #f8f9fa;
    color: var(--text-dark);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.day-btn.active .day-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 天数标签 */
.day-label {
    font-size: 0.85rem;
    font-weight: 500;
    flex: 1;
}

.day-btn.active .day-label {
    color: white;
}

/* 内容容器 */
.day-content-container {
    padding: 1rem;
    min-height: 200px;
    background: #fafafa;
    border-top: 1px solid #e9ecef;
}

/* 欢迎消息 */
.welcome-message {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
}

.welcome-message.sidebar-welcome {
    padding: 1.5rem 1rem;
}

.welcome-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-message h6 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.welcome-text {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.welcome-decoration {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.decoration-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.3;
    animation: decorationPulse 2s infinite;
}

.decoration-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.decoration-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes decorationPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 天数内容样式 */
.day-content {
    animation: fadeInUp 0.4s ease;
}

.day-content.sidebar-optimized {
    padding: 0;
}

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

/* 天数头部 */
.day-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.day-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.day-icon {
    font-size: 1.1rem;
}

.day-number {
    font-size: 0.9rem;
}

.day-theme {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* 内容区块 */
.content-section {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section h6 {
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-section h6 i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.content-section p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    color: var(--text-dark);
}

/* 特殊区块样式 */
.core-task {
    border-left-color: #FF6B6B;
}

.body-signal {
    border-left-color: #4ECDC4;
}

.warm-message {
    border-left-color: #FFD93D;
    background: #fffbf0;
}

.warm-message .message-text {
    font-style: italic;
    color: #8B4513;
    font-weight: 500;
}

.action-guide {
    border-left-color: #6C5CE7;
}

/* 行动列表 */
.action-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.action-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.action-list li:last-child {
    margin-bottom: 0;
}

.action-list li i {
    color: #28a745;
    font-size: 0.75rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* 响应式调整 */
@media (max-width: 1199px) {
    .calendar-sidebar {
        width: 280px;
    }
    
    .main-content.sidebar-expanded {
        margin-right: 280px;
    }
    
    .sidebar-toggle {
        width: 50px;
        height: 100px;
    }
    
    .calendar-sidebar.collapsed {
        transform: translateX(calc(100% - 50px));
    }
}

@media (max-width: 767px) {
    .calendar-sidebar {
        width: 100%;
        height: 60vh;
        top: auto;
        bottom: 0;
        transform: translateY(100%);
        border-left: none;
        border-top: 1px solid var(--border-color);
        border-radius: 16px 16px 0 0;
    }
    
    .calendar-sidebar.collapsed {
        transform: translateY(100%);
    }
    
    .calendar-sidebar.expanded {
        transform: translateY(0);
    }
    
    .main-content.sidebar-expanded {
        margin-right: 0;
    }
    
    .sidebar-toggle {
        display: none; /* 移动设备上隐藏切换按钮，只通过悬浮图标操作 */
    }
    
    .sidebar-header {
        min-height: 60px;
        padding: 1rem 1.5rem;
    }
    
    .sidebar-body {
        padding: 1rem 1.5rem;
    }
    
    .day-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .day-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        padding: 0.5rem;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .day-label {
        font-size: 0.75rem;
    }
    
    .content-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .content-section h6 {
        font-size: 0.8rem;
    }
    
    .content-section p {
        font-size: 0.8rem;
    }
    
    .action-list li {
        font-size: 0.8rem;
    }
}/* 智能留言组
件样式 */
.smart-message-component {
    margin-bottom: 2rem;
}

.smart-message-component .login-status {
    margin-bottom: 1rem;
}

.smart-message-component .identity-options,
.smart-message-component .privacy-options {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.smart-message-component .form-check {
    margin-bottom: 0.75rem;
}

.smart-message-component .form-check:last-child {
    margin-bottom: 0;
}

.smart-message-component .form-check-label {
    font-weight: 500;
}

.smart-message-component .form-check-label small {
    font-weight: normal;
    color: #6c757d;
    margin-top: 0.25rem;
}

.smart-message-component .privacy-indicator {
    display: flex;
    align-items: center;
}

.smart-message-component .privacy-indicator small {
    color: #6c757d;
    font-size: 0.875rem;
}

.smart-message-component .alert {
    margin-bottom: 1rem;
}

/* 字符计数样式 */
.smart-message-component .form-text {
    text-align: right;
    font-size: 0.875rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .smart-message-component .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .smart-message-component .privacy-indicator {
        justify-content: center;
    }
}/* 留言
历史管理组件样式 */
.message-history-component {
    margin-bottom: 2rem;
}

/* 统计卡片样式 */
.stats-section .stat-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.stats-section .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-section .stat-icon {
    font-size: 2rem;
    color: #FF6B81;
    margin-bottom: 1rem;
}

.stats-section .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.stats-section .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
}

/* 筛选器样式 */
.filters-section .card {
    border: none;
    background: #f8f9fa;
}

.filters-section .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* 留言项样式 */
.message-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.message-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.message-item:last-child {
    margin-bottom: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.message-meta span {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
}

.badge-info {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
}

.privacy-info {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
}

.message-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #FF6B81;
}

.message-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
}

/* 编辑模态框样式 */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #FF6B81, #FFC0CB);
    color: white;
    border-radius: 15px 15px 0 0;
}

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

.privacy-options {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.privacy-options .form-check {
    margin-bottom: 0.75rem;
}

.privacy-options .form-check:last-child {
    margin-bottom: 0;
}

/* 空状态样式 */
.empty-state {
    color: #6c757d;
}

.empty-state i {
    opacity: 0.5;
}

/* 加载状态样式 */
.loading-state {
    color: #6c757d;
}

/* 分页样式 */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #FF6B81;
}

.pagination .page-link:hover {
    background-color: #FF6B81;
    border-color: #FF6B81;
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: #FF6B81;
    border-color: #FF6B81;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .message-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .message-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .message-actions {
        align-self: stretch;
    }
    
    .message-actions .btn {
        flex: 1;
    }
    
    .stats-section .row {
        gap: 1rem;
    }
    
    .filters-section .row {
        gap: 1rem;
    }
}