.pull-refresh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
    z-index: 1001;
    background: var(--background);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

/* Material Design 3 风格的加载动画 */
.refresh-indicator {
    width: 40px;
    height: 40px;
    position: relative;
    margin-right: 16px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.pull-refresh.visible .refresh-indicator {
    opacity: 1;
    transform: scale(1);
}

/* Material 3 圆形进度指示器 */
.indicator-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid;
    border-color: var(--primary-color) var(--primary-color) transparent transparent;
    box-sizing: border-box;
    transform: rotate(-45deg);
}

/* 响应式尺寸调整 */
@media (max-width: 768px) {
    .pull-refresh {
        height: 64px;
    }
    
    .refresh-indicator {
        width: 32px;
        height: 32px;
        margin-right: 12px;
    }
    
    .indicator-circle {
        border-width: 2.5px;
    }
}

@media (max-width: 480px) {
    .pull-refresh {
        height: 56px;
    }
    
    .refresh-indicator {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }
    
    .indicator-circle {
        border-width: 2px;
    }
}

/* 适配不同设备像素比 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .indicator-circle {
        border-width: 2.5px;
    }
}

@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
    .indicator-circle {
        border-width: 2px;
    }
}

/* Material Design 3 文字样式 */
.refresh-text {
    font-family: "Roboto", "SF Pro Text", -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

/* 响应式文字大小 */
@media (max-width: 768px) {
    .refresh-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .refresh-text {
        font-size: 12px;
    }
}

/* 适配刘海屏和动态岛 */
@supports (padding-top: env(safe-area-inset-top)) {
    .pull-refresh {
        padding-top: max(env(safe-area-inset-top), 12px);
    }
}

/* 适配折叠屏和平板 */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .pull-refresh {
        height: 72px;
    }
    
    .refresh-indicator {
        width: 36px;
        height: 36px;
    }
}

/* 适配横屏模式 */
@media screen and (orientation: landscape) and (max-height: 768px) {
    .pull-refresh {
        height: 56px;
    }
    
    .refresh-indicator {
        width: 28px;
        height: 28px;
    }
}

/* 动画优化 */
@media (prefers-reduced-motion: reduce) {
    .pull-refresh,
    .refresh-indicator,
    .refresh-text {
        transition-duration: 0.1s;
    }
}

/* 深色模式优化 */
@media (prefers-color-scheme: dark) {
    .pull-refresh {
        background: var(--background);
    }
    
    .indicator-circle {
        border-color: var(--primary-color) var(--primary-color) transparent transparent;
    }
    
    .refresh-text {
        color: var(--text-primary);
    }
} 