.records-loading {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.records-loading .spinner {
    width: 32px;
    height: 32px;
    background: url('../img/spinner.svg') no-repeat center center;
    background-size: contain;
    animation: spin 1s linear infinite;
    filter: invert(25%) sepia(60%) saturate(740%) hue-rotate(240deg) brightness(85%) contrast(90%);
}

.records-section h2 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.record-list {
    list-style: none;
}

.record-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    transition: box-shadow 0.3s;
}

.record-item .record-checkbox {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.record-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.record-content-wrapper {
    flex: 1;
    margin-right: 10px;
    display: flex;
    flex-direction: column;
}

.record-content {
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
    margin-bottom: 8px;
    /* 确保与meta区域有间距 */
}

/* 记录中的图片样式 */
.record-content .record-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.record-content .record-image {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: transform 0.2s;
    max-width: 200px;
    max-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-content .record-image:hover {
    transform: scale(1.02);
}

.record-content .record-image img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    display: block;
}

.record-content .record-image .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.record-content .record-image:hover .image-overlay {
    opacity: 1;
}

.record-content .record-image .image-overlay span {
    color: white;
    font-size: 12px;
    font-weight: 500;
}

.record-content.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4.2em;
    /* 3行的高度 */
    line-clamp: 3;
    /* 标准属性 */
    text-overflow: ellipsis;
    /* 添加省略号 */
}

.record-meta {
    font-size: 0.8rem;
    color: #666;
    margin-top: 8px;
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.record-meta .expand-btn {
    background: none;
    color: #667eea;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    margin-left: auto;
}

.record-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}



/* 下载按钮样式 - 与复制按钮保持一致 */
.copy-btn,
.download-btn {
    background: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.copy-btn:hover,
.download-btn:hover {
    background-color: #F8F7FC;
    border-radius: 8px;
}

.copy-btn .icon,
.download-btn .icon {
    width: 16px;
    height: 16px;
    margin-bottom: 4px;
    filter: invert(35%) sepia(45%) saturate(1500%) hue-rotate(240deg) brightness(90%) contrast(90%);
}

.copy-btn .copy-text,
.download-btn .download-text {
    font-size: 12px;
    font-weight: normal;
    color: #705DBC;
}

/* 标签切换样式 */
.records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.records-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.refresh-btn {
    background: none;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #666;
}

.refresh-btn:hover {
    color: #667eea;
    background-color: #f8f9ff;
}

.refresh-btn:active {
    transform: scale(0.95);
    background-color: #e8ecff;
}

/* 手机版触摸反馈 */
@media (max-width: 768px) {
    .refresh-btn:active {
        background-color: #e8ecff;
        transform: scale(0.9);
    }

    .refresh-btn:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }
}

.refresh-btn .icon {
    transition: transform 0.3s;
}

/* 只有在非刷新状态下才应用hover效果 */
.refresh-btn:not(.refreshing):hover .icon {
    transform: rotate(180deg);
}

/* 刷新状态下的动画 - 使用最高优先级 */
.refresh-btn.refreshing .icon {
    animation: spin 1s linear infinite !important;
    transform: none !important;
    transition: none !important;
}

/* 确保刷新时hover不会干扰动画 */
.refresh-btn.refreshing:hover .icon {
    animation: spin 1s linear infinite !important;
    transform: none !important;
    transition: none !important;
}

.tab-container {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #333;
    font-weight: normal;
    border: 1px solid #F0F0F0;
    border-radius: 5px;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    font-weight: bold;
    border-color: #667eea;
    background-color: #FFFFFF;
}

/* 存档按钮样式 */
.archive-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.archive-btn:hover {
    background: #f8f9fa;
}

.archive-btn .archive-icon {
    color: #ffc107;
    transition: all 0.3s;
    flex-shrink: 0;
}

.archive-btn:hover .archive-icon {
    transform: scale(1.1);
}

.archive-btn .archive-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .records-header {
        /* 保持水平布局，不换行 */
        flex-wrap: nowrap;
    }

    .records-header h2 {
        /* 标题可以压缩 */
        flex-shrink: 1;
        min-width: 0;
    }

    .header-actions {
        /* 操作区域不压缩，保持在右侧 */
        flex-shrink: 0;
        gap: 8px;
    }

    .refresh-btn {
        width: 36px;
        height: 36px;
        padding: 8px;
        /* 增加触摸区域 */
        min-width: 44px;
        min-height: 44px;
        /* 确保触摸友好 */
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
    }

    .tab-container {
        gap: 8px;
    }

    .tab-btn {
        font-size: 13px;
        padding: 3px 6px;
    }

    /* 手机端优化record-meta布局 */
    .record-meta {
        font-size: 0.75rem;
        gap: 6px;
    }

    .meta-item {
        margin-right: 8px;
        gap: 3px;
    }

    .meta-icon {
        width: 12px;
        height: 12px;
    }

    .archive-btn {
        padding: 3px 5px;
        font-size: 11px;
    }

    .archive-btn .archive-text {
        font-size: 11px;
    }

    .expand-btn {
        font-size: 0.75rem;
        padding: 2px 5px;
    }
}

/* meta项目样
式 */
.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
}

.meta-icon {
    color: #999;
    flex-shrink: 0;
}

/* 下拉刷新指示器样式 */
.pull-refresh-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px 25px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    opacity: 0;
    min-width: 120px;
}

.pull-refresh-indicator.ready {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.pull-refresh-indicator.refreshing {
    opacity: 1 !important;
}

.refresh-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-icon {
    transition: transform 0.3s ease;
    color: #667eea;
}

.refreshing .refresh-icon {
    animation: spin 1s linear infinite;
}

.refresh-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.pull-refresh-indicator.ready .refresh-text {
    color: #667eea;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}